Implemented A* pathfinding on TileMap, example included #61

merged 3 commits into from Dec 31, 2012


None yet

2 participants


I've implemented a basic pathfinding algorithm to the TileMap class, example14.html shows how to use it.

I've added the code to both jaws.js and src/tile_map.js but I HAVE NOT updated the minified version as I don't know what minifier is used, so I didn't want to mess in there.

it's fairly quick, much quicker than redrawing a large sprite list!

I did my best to follow the style guidelines, happy to make any changes necessary. Hopefully it's useful.

MalphasWats added some commits Dec 27, 2012
@MalphasWats MalphasWats initial implementation of A-star path finding for TileMap
algorithm not fully implemented, has a few quirks
@MalphasWats MalphasWats Final implementation of A-Star Pathfinding
Appears to work correctly, new example file provided with assets
demonstrating it working. jaws-min.js not updated here.
@MalphasWats MalphasWats Left working title in title tag 3e2f017

Hi, back from skitrip. Nice work. Adding the code to tile_map.js is correct, jaws.js (and jaws-min.js) is compiled from the sourcefiles. I like that you made an example too.. would it be possible with some simple testcases to make it even clearer exactly what the new pathfinding-methods does?

@ippa ippa merged commit 96aecc6 into ippa:master Dec 31, 2012

Yeah, I realised that when I looked in the build script, not being a rubyist, I'd been ignoring it!

I'll have a go at some tests, although I'm criminally inexperienced with writing them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment