|
Allegro.cc
Projects
Resource Directory
|
IOTD: Path finding algo
Path finding algo, by Johan Halmén
I wrote a simple recursive algorithm for path finding in a 2D array. The zero labeled cell is the end of all paths. The numbers in each cell tell the number of steps, the arrows show the direction to follow. About 20000 calls to the recursive function were needed to traverse the 25 by 25 cell field above. If anyone is interested, I'll be glad to put up a page somewhere that shows the code. Sorry about the jpeg format, my graphic editor couldn't do png.
Seems I can comment my own IOTD. Just wanted to say I'm working on an 8 direction version. The one above is a 4-direction thing, as you can see. - Johan Halmén
This section is only available to registered Allegro.cc members.
:: Join Allegro.cc The Gallery | Add your own image! |
Poll
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||