Allegro.cc
Projects
Action252
Adventure22
Arcade216
Board Games30
Demos24
Emulators10
Other68
Puzzle139
Role Playing40
Sports25
Strategy58
Utilities46
Resource Directory
Code Gallery3
Compilers12
Help & Documents13
Libraries63
Media2
Tools8
IOTD: Path finding algo
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.



The Gallery | Add your own image!
Poll
Is grammer and spelling important?
No weigh! 13.30
-
Absilootly, Yes. 64.83
-
I'm a looser with no onion. 21.87
-