Sorry for the subject line. I’m not sure how to word this question concisely.
I’m working on a game that uses a procedurally generated maze. The game will start out with a very small maze, 4x4 cells, and each subsequent level will be 1 or 2 rows and columns bigger than the last. There will be a goal, consisting of a few random “sacred” objects that have to be collected in order to win the game, but even with collecting them, I will give the player the option to continue onto the next level. I’ve tested the algorithm to 60,000 x 60,000 cells and it’s quite stable. I’d like to give the players the option to continue until they run out of memory.
I haven’t researched PCG just yet, but even then, from what I’ve seen, Unreal seems to rely on the fact that there is one level. I have seen nothing in regards to loading levels, much less creating new ones on the fly. Is what I’m wanting to do even possible?
1 Spawning and destroying blueprints. The blueprints contain the relevant level part, but only exist when the player is near.
2 Level instances. Very much like the blueprint concept, but without code. You can load and unload maze sections from a selection of ‘level pieces’. To be clear: that would be using the node ‘load level instance’, because there is a lot of different ways to instance levels in the engine.
With both of these methods, you can change the level at runtime, during play. That’s what I assumed you meant by procedural, rather than spawning the whole play area at once. If its the second, then you can just use world partition.
A note that you don’t need the to store whole level on a scene or even in memory.
Scene’s part: blocks too far from you may be destroyed when not needed
Memory’s part: you may offload map to the file and read it by parts.
It would still be limited by hardware, but the limit would be higher than doing it in a simple way