/jps-explained

Code for a "Jump Point Search, Explained" post on zerowidth.com

Primary LanguageCoffeeScriptMIT LicenseMIT

Jump Point Search Explained

There here mess o' coffeescript is for a blog post on zerowidth.com 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
coffee app.coffee

and open http://localhost:3000.

Released under the MIT license.