The game world I’m working on is quite large. In order for my game to easily save game, I am forced to always bring my game levels into the core of my game, my main Persistent level and turn them on and off.
This sounds logical, but as I approach forty and fifty levels it gets more complicated and the worst part is dealing with rendering shadows. It isn’t enough to turn off let’s say twenty levels and then render only the first twenty levels with shadows, because it will give errors for all the rest instead here is my strategy.
My main persistent level has a core of let’s say ten levels that get loaded and unloaded to keep things moving. I render the shadows.
MyGamePersist
Land
GlobalFX
Lighting
AreaA
AreaB
AreaC
AreaD
AreaE
etc…
So let’s say that above is the basic layout of my game level, and the gameplay is controlled at the MyGamePersist. I render shadows and all is well. On the side I am developing various other levels. A Jump Level let’s say which has it’s own ten levels, a Blue Level, a Lava Level, but each of these may have ten “levels” that get loaded with it.
JumpPersist
Land (the same land just loaded to work out the jump level not rendered with shadows)
GlobalFX
JumpLighting
JAreaA
JAreaB
JAreaC
JareaD
etc…
If I render my JumpPersist, with my JumpLighting, i get clean lighting. Then I can go back to MyGamePersist, and load in JumpPersist and all the sub levels it needs to work properly and my lighting still is error free because i am rendering my lighting for each level area separately. This reduces loads of rendering time an as i bring on a small team to work on this game is essential.
As Mark Watney says, here is the rub.
In my MyGamePersist level, I have to then unload all my sub levels (which could be a hundred by the time I’m done here) every time i want to render. This is easy when I’m working in a sublevel like JumpPersist or BluePersist, because they are contained.
However when I delete all the sub levels that are not part of my core level to render my shadows, I then have to rebuild all my Levels in my core game, adding existing level individually.
Here’s how I think it should work (and incidentally I think this did work this way with UDK)… If I have a Level like JumpPersist loaded up, it automatically loads up all the associated sublevels that are in my JumpPersist file, so that I don’t have to keep loading tens and maybe even hundreds of levels each time i need to render.
I know bigger game companies must have a better strategy than this for working with the many levels and sub levels needed to make a game, as well as big teams.
Do I need to make a Blutility for this? Can I make a Blutility for loading up all my sub levels (and I’m not talking about doing this in game play but rather into the editor).
I know this sounds complicated, but honestly that’s the problem it shouldn’t be this complicated. The problem in my mind is that the word LEVELS implies leveling up, and the fact that a Level does not seem to bring in it’s own levels (which I’ll refer to as sub levels).
there must be a better way than tediously deleting and reloading levels over and over.
I want my game to have the MyGamePersist and it’s core levels and then every time a Persistent level is loaded it automagically loads the sub levels associated with it. I know someone will say that i can merely turn off levels, but this results in ERRORS galore because it will see anything loaded as missing updated shadows, so I’ll get the error on my screen saying hundreds of object shadows are out of date… which is untrue but still also slows the engine down.
Additionally, if there is a way to KEEP my levels (sub levels) in my Core game, then by the act of turning them off the shadow render should IGNORE them completely not give off errors that they aren’t built. Again the only way to get rid of those errors is to delete all sub levels that I don’t want to render and then bring them back after rendering.
there must be a better way.