I have a game that I am currently developing that is a sort of open-world game. The map in it is a pretty decent size and I’m looking to optimize it anywhere possible.
One optimization I’m looking to do is to independently load different “regions” terrain into the game
For example, lets say we have an Overworld region and an Ice region. There’s no reason to load the Ice Region because the player isn’t in it at all, so I’d remove the terrain from the game entirely. If the player passes through a threshold, say for example a cave, I want to load in the Ice Region and unload the Overworld region in the same way.
I’ve looked into region3 and removing terrain a bit, but i’m not entirely sure on what to do with this. Of course I’m doing this all entirely client side.
Side note: If this is extremely inefficient and there’s another option please let me know
I would honestly let Roblox handle it. Clearing and loading large chunks can be laggy. If you have like a tunnel in between the two and the player can’t see both while they are in it then you could have some detection zones and slowly loop through the entire thing and load the new terrain and clear the old. You could also copy it all far out of render distance if you don’t have an easy method for saving it.
Would it be better to have the entire map loaded in with stuff to hide different regions from the player or to load each region individually when a player enters?
For ease of use, lag, and updates, I would have each section of land between a tunnel be its own section and spawn/move all the terrain over in 100 chunks(for x=0, 100, 10 do for z=0, 100, 10 do) and wait between you spawn/load each chunk.
Do you have the StreamingEnabled setting activated under workspace settings?
It will handle loading / unloading of terrain and parts for you when players come in/out of your set range.
I do believe the streaming is quite optimized out of the box. It makes sure only terrain and parts are loaded in a certain area around the player so I don’t think you should have to do a custom system that pretty much does the same thing.
Hi, I’m still looking for a custom Terrain Loading system. As the OP mentioned, the Roblox terrain system has issues with control. My use case is that only terrain needs to be streamed for a niche issue.