Navmesh disk cache
Based on this forum post.
Building navmesh requires CPU power and time. There are multiple complaints in Discord about loading screens being long due to that fact. And it's a waste to spend it every game session for the same result. A solution to this is to have navmesh pre-built out of the game session and stored out the process memory (e.g. user disk or some filesystem). Basically to have a disk cache that can be used to load navmesh from the game session. Load time should be significantly less than building it.
There are multiple things to keep in mind:
- Users can change a set of used content files, models that can affect how navmesh would be like. If a cached navmesh is different from a generated for a specific location it should not be loaded. Instead it should be generated as it is now.
- Changing a set of used content files should not automatically invalidate pregenerated cache. It should be possible to store multiple revisions of navmesh for the same location.
- If navmesh is already generated the offline generation process should not repeat the work even if rerunned multiple times for the same content.
- Users should be able to pre build navmesh by a single button click potentially from the launcher. Cancelling the process should not corrupt the cache.
- Disk cache can be updated from the game session. Users may skip cache pregeneration but benefits of the feature are still available to them unless they disable it.
- Users should be able to disable disk cache completely.