How would i implement an A star algorithm for a game that i'm making on the android in java? i'm looking for a pre-made A star API in java with classes and methods to call. i don't want to have to code from scratch.
Like others have commented, it might be easier (not to mention fun) to write your own implementation of A* (use the link jhocking provided, I learned it from there, and highly recommend it - Link).
However if you definitely want a pre-existing library, here are some alternatives:
- http://www.stackframe.com/software/PathFinder (scroll to the bottom for the download)
- http://www.ludumdare.com/compo/2011/12/16/java-pathfinding-library/ (probably not an ideal solution, but it would help you in writing your own)
But the one I like best is Critter AI, which is a port of Recast for .NET and Java. The one for Java is more intended for study, but is still awesome. http://www.critterai.org/
Good luck! :)
Ignore, if you are done.
I have implemented "8-puzzle" using pure A* implementation. You can follow the same searching pattern for your game.