Game-DijkstraMap
view release on metacpan or search on metacpan
lib/Game/DijkstraMap.pm view on Meta::CPAN
The Dijkstra Map, presently an array reference of array references of
numeric values. Do not change this reference unless you know what you
are doing. It can also be assigned to directly, for better or worse.
Most method calls will fail if this is not set; be sure to load a map
first e.g. with B<map> or B<str2map>.
=item B<iters>
This is set during the B<normalize>, B<map>, and B<recalc> method
calls and indicates how many iterations it took the B<normfn> to
stabilize the map.
=item B<max_cost>
Cost for non-goal (B<min_cost>) non-wall (B<bad_cost>) cells. C<INT_MAX>
by default. These are reduced to appropriate weights (steps from the
nearest goal point) by the B<normfn>.
=item B<min_cost>
lib/Game/DijkstraMap.pm view on Meta::CPAN
=head1 GRID BUGS
New code that is not much battle-tested, especially B<norm_8way_euclid>.
Also a first implementation that suffers from "hmm, how should this
work?" design. Something much more efficient should likely be written,
possibly with fewer features.
B<norm_4way> is not very good with long and mostly unconnected
corridors; this might be improved on by considering adjacent unseen
cells after a cell changes in addition to full map iterations?
=head1 SEE ALSO
L<Game::TextPatterns> may help generate or modify data that can be then
fed to this module.
There are various other graph and path finding modules on CPAN that may
be more suitable to the task at hand.
=head1 AUTHOR
( run in 0.505 second using v1.01-cache-2.11-cpan-71847e10f99 )