PDA

View Full Version : pathfinding helpppp



hammer
04-03-2004, 11:37 AM
soo here is the situation i have an array in which i have stored the map
0 is for unpassable
1 is for passable
S is for start
E is for end

Example:

0000000000
0111111110
01S1111110
0000100000
0011101110
0110001010
01100E1010
0110001010
0111111110
0000000000


what algorith should i use in my situation.
I need the shortest way to the End point

TheLion
04-03-2004, 08:48 PM
I'm no expert, but check out the A* algorithm, you can find more info on it here:

http://terraqueous.f2o.org/dgdev/viewtopic.php?t=348