I’m working on a very large scale game world. I’m planing on using additive level streaming and was wondering what the best graph option for this would be?
I can’t find any documentation on how using multiple graphs can be implemented.
Is it possible to have an answer for this question?
i also plan on having one main scene and use streaming for different areas, i would like to know what is the best, i should use recast but
should i have one big graph? multiple smaller?
can i save in editor then load them each time i enter region?
I have a similar question posted and haven’t seen an answer for it yet. A bit disappointed with support since other assets I’ve purchased for less or similar price ranges have had stellar support so far.
Regarding multiple graphs:
It took me a while to find the answer to this but I found this post from 2012:
Method #2 in Aron’s post seems to work but it doesn’t seem to work for Grid Graphs, as it throws an exception stating “GridNodes do not have support for adding manual connections”.
I guess you could place empty game objects at entry/exit points on each Grid Graph and manually calculate it but then you might need to pathfind to each of those to work out the shortest route.
Regarding procedural generation:
There’s an example scene called Example12_Procedural that might have some answers.
Sorry for not answering sooner.
Depends on how “massive” it is.
For the kinds of worlds where it is possible to hold the whole navmesh in memory at once, I strongly recommend using a single (tiled) recast graph which you calculate during development and then store it as a file and load it at the start of the game.
See http://arongranberg.com/astar/docs/save-load-graphs.php
That will give you the most stable solution.
Another option is as @panetta said, to use a moving grid graph around the player to recalculate the world around it as it moves around. This assumes however that you only need pathfinding in close proximity to the player.
I do not recommend the usage of multiple graphs with connections between them because it is really hard to get stable pathfinding when they are at the border between two graphs, there are all kinds of edge cases.