Xodius Studios Blog #9 - Oh, The Joys of Level Streaming! - By Justin Palmer
Xodius Studios Blog #9
Oh, The Joys of Level Streaming!
The Problem:
The main problem this week was lag due to frame rate. When playing on the Steam Deck the issue becomes a lot more apparent than a PC. The Tutorial Level was too large with only 8 rooms! I tried to keep the rooms small without minimal processing power, but the lag was still too great. Lag is never a good thing in a game (unless you are playing against somebody that has lag with no compensation!). It reduces the feel of the game and makes the player not want to play anymore.
Problem Solution:
The solution the team decided on, was to convert the Tutorial Level into multiple levels that can level stream (like the rest of the game). Although it sounds fairly simple when they explained it, it turned out to be a bigger problem than originally thought, but in the end the level turned out much better.
To turn the level into level streaming, you have to have split the level into MULTIPLE levels, and then add a level streaming volume to each level. When you enter a level you load the streaming volumes touching the level you are in and unload any streaming volumes 2 rooms away.
This was fine for most of the level, but we had portals, treasure chests, and locked doors requiring keys. This required making a 'persistent level' with all the assets we don't want to forget/respawn. This persistent level will ALWAYS be loaded, but this causes a new issue, as the enemies will be spawned and start navigating the world with no floors! We ended up having to add variable logic on the enemies so they know when they can start moving and make the portals stay in the persistent level.
Comments
Post a Comment