Skip to content

zerowidth/jps-explained

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published