A* Pathfinding in an isometric world with Flex

07.12.2007

I’m having way too much fun with Flex.. It didn’t take me more than a few nights to put together a small test of an isometric world and implement an A* algorithm for pathfinding. It’s not nearly done yet, particularly the motion is bad, but you can check it out here:

isopathfinder11.png

http://www.topholt.com/Flex/bin-release/IsoPathfinder.html

Perhaps I could spend some time this holiday season making it into a small game or something. Who knows.

If anyone are interested in the implementation details, let me know. The screen-to-tile-space conversion took me a while to figure out, and A* can be tricky as well.

Edit: I’ve added the ability to fire small pieces of cheese at the cursor, to test collision with walls. Just press ‘A’ and you’ll see it in action!

Edit: View Source is now available.