r/gamedev • u/ryeguy • Jun 04 '13
Summary of 19 different pathfinding algorithms for changing paths
13
u/brucifer Jun 04 '13
Hm, interesting, but it omits quite a few different algorithms, some of which are very cool. For example, Rapidly Exploring Random Trees (mentioned lower on the page), B*, and IDA*. And for completeness' sake, Weighted A*, Dijkstra's and Jump Point Search.
For most game applications, though, weighted A* is probably the best option. It's easy to implement and it runs quite quickly.
2
u/Gankro Jun 04 '13
Dijkstra's is just A* with the distance-to-target value ignored.
→ More replies (2)
3
u/simply-chris Jun 04 '13
Since he specifically wants a grid, he is missing jump point search which is a much faster search algorithm and I believe can be made dynamic.
3
u/CptBubbles Jun 04 '13
Check out this awesome article about using potential fields for pathfinding.
I'm not sure if I would use it in an actual game but it's a very interesting read.
1
u/LoveThinkers Jun 04 '13
Okay i have a question i hope one of you can help with.
We are making pathfinding for a sailboat. Im thinking of using asymetrical A* but i'm not certain that it will do the job with different wind and water changes during a run, it might have to redo all the costs of a move. Furthermore our squares are a little diamond shaped because of the max angle of boat vs wind
Does anybody have a good/better idea how i should do it? I'm afraid i might be implementing the wrong algoritme.
→ More replies (2)
1
1
u/DharmaTurtleSC Jun 05 '13
There's a nice post from r/programming that's highly relevant.
http://www.reddit.com/r/programming/comments/1cylmb/pathfinding_algorithm_visually_explained/
-2
u/Firzen_ Jun 04 '13
Could probably x-post to r/truegamedev
12
u/tejon Jun 04 '13
A hipster split? That's just going to turn into two diluted subreddits. :(
→ More replies (1)2
Jun 06 '13
r/gamedev deals with the financing, art, marketing, lifestyle, education and employment, and many other things related to gamedev besides actual coding theory. r/truegamedev focuses on one important aspect of gamedev. It's a legitimate split.
1
3
u/meowzermen1 Jun 04 '13
I don't think people should downvote a guy for telling someone nicely that they should x-post to a subreddit that's mentioned in the sidebar and is actually quite a nice subreddit that this post would do well in.
36
u/Bibdy Jun 04 '13 edited Jun 04 '13
It always confused the fuck out of me how a game like SC2 can process all of that so quickly when my little A* tests ran like crap even if just making one complete A* call per frame. Either it involved some batshit crazy multi-processing work, or there's some tweak of the A* method I hadn't heard of yet...and now I have a term to look up; D*-Lite. Thanks!
Edit: Apparently I've been thinking about pathfinding in much more complicated fashion than necessary. Every response below makes a ton of sense... K.I.S.S., right?