A* pathfinding in 2D?
Posted: Fri Jul 14, 2006 1:09 am
Anyone know/has a script that does the A* pathfinding?
My needs are quite low:
Got a maze (size could be various). There are only fields You can go throught (1) and fields You can`t (0). You got to go from starting point A to ending point B. No diagonales are allowed.
The script should give out "true" (meaning there is a way to go from A to B). No need to output the correct way (of course if it`s possible, it could be good). Perfect would be that I can change the A's and B's coordinates.
Read some basic tutorials but even they are too hard fro me.
Searched the forum and found this one:
http://www.artplastique.free.fr/nrx/PHP ... php?code=1
But don`t know how it works and how to implement it.
My needs are quite low:
Got a maze (size could be various). There are only fields You can go throught (1) and fields You can`t (0). You got to go from starting point A to ending point B. No diagonales are allowed.
Code: Select all
A
10000
11111
01010
01011
00101
11111
BRead some basic tutorials but even they are too hard fro me.
Searched the forum and found this one:
http://www.artplastique.free.fr/nrx/PHP ... php?code=1
But don`t know how it works and how to implement it.