I'm working on a pathfinding package for Terrarium developers. However, it'll be a while before it's ready for prime time. In the mean time, you might want to check out this site which has a very good tutorial on A*: http://www.policyalmanac.org/games/aStarTutorial.htm After you have read the tutorial, you can either roll your own or you can use an A* package from the Animal Farm. It's available in the .chm file at http://www.yllemo.com/terrarium.
Having said that, A* works great if you know where you're going. My herbivores use Dykstra which allows them to search for the "best" place that they can get to. The down side to my approach is that it is much slower than A*. My pathfinding package will contain both methods. |