Support Forum

Grid graphs and rivers

For my project, I’ve created rivers that span long distances with fish swimming around them. I’m currently using AIPath for the movement and having them wander around a small grid graph spanning a section of the river. I figured I would create many of these grid graphs as spawn sites for the fish – imaginary fish tanks, if you will.

Would it be more performant to instead use one large grid graph spanning the entire open world area or is there nothing wrong with my approach of creating what could be dozens of small grid graphs specific to fish?

If the fish need to move between different parts of the world, it’s probably best to use a single graph for simplicity. Unless you do updates it doesn’t cost much in terms of performance, but a large graph will use some memory.

1 Like

Fair enough, I think I’ll go with a large graph! By the way, I just created a multi-terrain world using Gaia, what would be the standard for handling Astar? My entire world is so large that not even a 2000 x 2000 single grid graph can cover it, nor can I run my editor well when I have a grid that large – it lags terribly. Would I be better off creating multiple grid graphs for enemy areas? And can A* handle terrain loading and unloading without disrupting the AI?

Hi

For a very large world, you might want to consider a recast graph instead.