PDA

View Full Version : pathfinding in flash actionscript


whizkid1990
06-22-2007, 10:01 PM
Im sort of interested in developing a game like desktop tower defence(just for fun/learning etc etc, not for any school assignment or anything)

My question here is: How do you do the pathfinding algorithm where the creeps can get the shortest possible path all the time??
Also when you block the path of the creeps, how to use actionscript to recompute the closest path ??
Im sort of confused on this topic .... would appreciate it if someone could direct me to a good tutorial on flash actionscript pathfinding
(preferably with step by step instructions if possible, something simple enough for a novice in flash)
or give me some clues/hints on how to do this. thx.

BTW heres a link to the game: its pretty addictive
http://www.handdrawngames.com/DesktopTD/

wyat
06-24-2007, 10:19 PM
This looks like it's related to BFS (Bread first search) in this tutorial.

http://www.tonypa.pri.ee/tbw/tut22.html

whizkid1990
06-26-2007, 01:17 PM
thanks very much. The link you referred me to has helped a lot in facilitating my understanding for the concept of pathfinding in games.