I have a 10000x10000 terrain and Iamusing A* by aron granberg, I need to scan the terrain at runtime (Because it is procedural), my problem is that the Astar grid nodes gets to big if I stretch it over the whole terrain, but I can't use the procedural grid mover, because the server needs to calculate all the AI movement, so it has to load the whole terrain. (Around 200-250 AIs) How can I maybe bypass the max of 1024 (Can't remember what it was) width/height limit to get a more detailed AI terrain? Could I attach the AStar grids to the animals instead and then have a 25x25 instead of one 1024x1024. Would there be a better way to do this?
It's seems ok, mathematical speaking. 250 * (25*25) < 1024*1024, less calculations 250 - creatures 25*25 grid I'm for independent creatures AI = easy debuging. I don't like a bigger brain who rules them all, lots of calculations and if there is a bug .. i don't wanna think about that.
25x25 grids does however limit calculating paths that are not close to the animal. Of cause this might not be a problem for your game. This is really a classic example of space partitioning. Large worlds needs to be put into chunks most of the time some way or another. What i would do is probably making a "grid of grids". So use a 20x20 grid containing 64x64 A* grids or something like that and then stitch together calculations when needed.
I have made it so that the animals can only see an 25 nodes distance, and the tile is updated, so that it follows the animals (Say that the animal move more than 2 nodes to the left, the current generated nodes will be moved and the new nodes that isn't known will be calculated)