Code for a "Jump Point Search, Explained" post on
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Jump Point Search Explained

There here mess o' coffeescript is for a blog post on explaining how JPS works. The code ain't pretty, but I tried to make certain pieces reusable for both static and interactive diagrams.

index.html contains draft versions of most of the diagrams I ended up using.

I wouldn't suggest dropping this wholesale into your own javascript project, as the search algorithm implementation was designed with visualization in mind, not efficiency. Also there's some pretty tight coupling between all the objects here. However, I hope it can serve as a reference, especially the JumpPointSuccessors bit. For another take, this time in questionable clojure code, see my hansel project. If you need a real javascript pathfinding library, see PathFinding.js.

This code is symlinked into my jekyll blog (currently private) for inclusion in the final post.

To run this thing:

npm install

and open http://localhost:3000.

Released under the MIT license.