pathfinding algorithm
I am designing a path finding algorithm. I don't if it already exists, but I thought of it on my own. Here's my idea. I create a "pathmap" ie a list of vectors showing how to get from one node to another. Also i need a list of indexes to show what nodes are connected to other nodes. Then I could setup a recursive loop to find all possible ways to get from point a to point b. Then I could add all the vectors of the node to get from point a to point b and find the shortest path. Is this a good path finding algorithm? I haven't done much research on pathfinding, and am wondering if this is a fast method to implement in realtime. Thanks in advance, ProgrammingNerd
all possible ways= bad, you will get loops in your paths and you will get an infinite number of possible paths, but such algorithms exist already, they solve this problem by marking points that where already visited and dont 'revisit' them... then there are different methods to go through the 'graph', one for example is (using a stack)/*cant remember the name*/ and it visits the closest points first, then the next closest to that etc... the fastest you can get (AFAIK) is A* (Astar) there you 'predict' which of the possible ways from the current point to the points it got a direct path to is the most probable to get to the resulting point (for example dotproduct of (target-start) with (nextpoint-point), both normalized will be close to 1 for a good candidate)...
i hope i explained A* correct...
T2k
i hope i explained A* correct...
T2k
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement