Hey all!
I’m working on a way to infinitely stream in levels. That way as the player explores the world it never ends. Since all my levels are pre-made and being streamed in they all have identical sizes.
So mathematically I should be able to just generate in a rowxcolumns. But the unfortunate part is you feasibly can’t generate an infinite amount of levels at start.
I’m really not smart or skilled enough to think of a way to make the levels generate more as you go even if I start with a small grid and then just have them load/unload as the player moves.
So my idea right now is to have a simple blueprint generate using the exact same formula, and so the bp would be at the exact spot a level “should” be. Then put a large large collision sphere on the player. When it overlaps with one, spawn a level. When the collision leaves the bp unload the level.
Now my problem is essentially the same thing but this is a way to I guess procrastinate on the real issue. I can do this simply enough but sooner or later a player will reach the edge and I can’t spawn an infinite amount of a level.
The only other idea I have is that somehow we detect where the player’s current coordinates are and then use that to figure out how much level they have gone through and then use that to despawn stuff the player has left while spawning new stuff.
Any ideas or tips appreciated, I’m just looking for a better solution to this problem. I’m not sure how other games handle this and it’s a more niche problem as there is absolutely no voxels, noise generation or minecraft stuff happening. Just premade levels.