I went back to the Lab (cause I needed to get my mind off the job). I decided to write a path finding algorithm in javascript.
I used my typical map setup. I found some pseudo-code for the A* path finder. I did the best I could (there was a heuristic in that pseudo code that I could not quite duplicate)
Anyway, it seems to work nicely. It does not find the shortest path, but it does find a path.
Feel free to use it for your own usage.
One Note: It uses a recurring function, I limited it to 40 loops. If you have a large map, you may need to up this a bit.
Take a Look
Source Code
Thursday, October 30
Followers
Copyright 2009 mobeamer. Powered by Blogger
Blogger Templates created by Deluxe Templates
Wordpress by Nattywp