0
Not a bug

Map and/or texture loading/streaming can't keep up with the rover

norritt 6 years ago updated by Tyler Owen (Lead Developer) 6 years ago 5

When taking out the rover for a spin I noticed that the game quite often freezes for a moment and displays the message "Loading...", which I assume is due to the game fetching another part of the map and/or textures. I'm not sure anymore if I have ever noticed this when exploring on foot, however using the rover this definitly happens a lot. While this is not gamebreaking it immediately breaks the immersion for the player. Since Lacuna Passage heavily lives from its atomsphere of lonely, dreary, intimidating beauty I believe this should be fixed before release.


Both my OS and the game itself are installed on seperate SSDs. Therfore I assume that those freezes will be a lot worse for players still using HDDs.


I don't know how buffering of map/texture data is done in LP, but assuming that the map is subdivided into sectors and the next sector is loaded once the player reaches a point within distance X of a sector border, this distance would need to be increased when using the rover, simply because the rover will travel this distance way faster than the player would.

Not a bug

That freeze is currently unavoidable. It happens regardless of your mode of locomotion. You should see the same screen even while exploring on foot, though obviously much less often since you are traveling much more slowly. This is as you guessed, where the map is loading in sectors. 16 of them to be precise. This is just how I have to do it with Unity, though there may be some small changes I can make to have the load be quicker. Unity's options for multithreading for loading are limited. Trust me, it's one of those things that I absolutely wish I could fix. The amount of work required to fix it versus the benefit puts this pretty low on the priority list.

Such engine issues can be a pain. Unfortunately I don't know unity, so this is a shot in the dark but does this info maybe help to mitigate the problem without too much effort?

Yeah, that's actually pretty close to a solution I have in mind. Basically I want to eventually have a coroutine that enables each game object in the scene one at a time, one per frame. This would probably completely eliminate the load, but the way each sector is built right now is very complicated to do such a coroutine. So yes, it is something I would like to do, but it could cause all kinds of problems. I'll look at it again before the final release for sure.

Another way to decrease the length of loading periods would be to reduce the amount of data needed to be loaded in one resouce load session by reducing the size of terrain they represent; instead of loading a large section of the map and all model and texture data associated with it less frequently, smaller chunks loaded more frequently migh give shorter individual loading times, possibly down to the point of not being noticeable at all.


The primary problem or drawback of this might be related to view distance; if the terrain data is split up to chunks so small that the next one being loaded is within view distance, it'll cause "terrain pop in" of various degree. Another Unity game with a huge explorable terrain I'm playing these days has this very issue: there you don't have dedicated "loading freezes" like here as the game world is split into very small tiles with at least 2 LOD levels each, so moving around in the game world is seamless, at the price of the tiles being visibly loaded / swapped from the low quality version with no detailing to the high quality version with all the small details (and sometimes even lagging behind so that there are "voids" where the low quality terrain is not loaded at all for a few seconds while the game tries to catch up with the movement of the player, even on an SSD) since they are well within view distance when the loading / swapping happens.


However, the terrain in Lacuna Passage is a lot less detailed than in that game (simply because what that terrain is, not having to deal with a lot of very complex terrain features, animated vegetation, etc.), so maybe with a similar approach the smaller amounts of data for the smaller tiles could load so fast that would be near unnoticeable.


I suppose changing the streaming of terrain data like this would require a huge amount of terrain / texture re-authoring, and likely coding, so it's another question if it would be feasible at all in terms of added development time.

I certainly admit that this would likely improve the situation, but it would indeed be a massive undertaking, likely requiring at least a couple months of dev time to implement. Almost everything in the game code is built upon the understanding that there are 16 distinct terrain tiles. Reauthoring the map itself would certainly take a long time, but just refactoring the code to accommodate a larger number of tiles has my brain swimming at the scope of it. Not something I can likely tackle at this stage of development. I really want to shift more focus to adding more gameplay features rathering than making minor improvements to performance.