Skip to content

zerowidth/jps-explained

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

script/server

and open http://localhost:3000.

Released under the MIT license.