Hacker News new | past | comments | ask | show | jobs | submit login
Pathfinding Demystified (2014) (gabrielgambetta.com)
103 points by mooreds on Feb 4, 2020 | hide | past | favorite | 11 comments



So weird to open Hacker News in the morning and find my own writing on the front page :) Happy to answer any questions.

Shameless plug I: check out these Client Side Prediction articles, they tend to be well received! https://gabrielgambetta.com/client-server-game-architecture....

Shameless plug II: check out my Computer Graphics textbook, https://gabrielgambetta.com/computer-graphics-from-scratch Coming soon as a real, actual book, with pages and stuff, in collaboration with No Starch Press :)


It's weird to open Hacker News and see how far the author of Betty's Beer Bar has come :)


Now I'm literally blushing.


Nice and simple, but I’m a big fan of Amit Patel / Red Blob Games articles on the subject, and more. The interactive visualisations really drive the point home, and also tackle less usual stuff like hex grids and circular objects in dedicated articles.

Introduction:

https://www.redblobgames.com/pathfinding/a-star/introduction...

Much, much more, with in depth notes, variants, optimisations, moving targets and obstacles...:

http://theory.stanford.edu/~amitp/GameProgramming/

And other intriguing articles:

https://www.redblobgames.com/


Amit's articles are fantastic. I devoured them in my early gamedev days (late 90s / early 00s). I finally got to meet Amit at GDC in 2017, I hope I didn't go into fanboy mode too much! He's the nicest guy. Worth following on Twitter too: https://twitter.com/redblobgames


Oh, thanks for the twitter link! Followed. I also found his site in my early programming years (2000) but took many years before I finally actually implemented A* and found it’s actually not hard (at least not for a toy implementation).


Amit Patels site made A* finally click for me. I’ve implemented breadth first search before and it was a nice moment when I realised that Dijkstra’s is a minor change to BFS and A* is just a one line change (plus the heuristic function) to Dijkstas’s. Very well written with nice interactive illustrations.


Additional info (known to most, but might be useful for someone): A* is not at all specific to path finding; it's a general strategy for optimized search across a problem space.



If you want to understand A* , just watch this animation.

I had to do better than A* recently. Didn't have enough memory for all the data A* needs. Used "head for goal, hit wall, follow wall both ways until fail or can head for goal again". Examines fewer cells than A* .

(I hate this implementation of Markdown.)


Great instructions




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: