A* is a very famous algorithm for games-programmers which efficiently finds routes from one point to another, intelligently avoiding obstacles and looking for the shortest possible path. Using @redblobgames‘s tutorials and code, I’ve added it to GoA. It’s quite fun to play with, so here’s an interactive demo:





Click here for demo – opens in new page



Instructions:

Move the mouse to choose a start point (previewed by a white hemi-sphere)

Left click to set start point

Move the mouse to path-find to wherever the mouse is

Path will be drawn as fast as possible Green line: indicates direct path start to end White spheres: show the on-the-ground “best” path Blue outlines: show the “frontier” of how far A* had explored in other directions before finding the perfect solution



Customizing it: