Massive terrain map

so, im making a really big roblox map… (the goal is 50k x 50k studs) for it to be a open world game with the immersion of traveling with mounts or walking if you crazy… but i made like 10k studs and it already take like 10mins to load the game… my pc is a bit better than average so i dont think it would be the problem but also if it is, all other possible players with a lower pc would be worst.

anyways, i just want to know exactly what could i do for optimizing it… (whenever i take off the terrain (for now its just a huge terrain baseplate and it already lags as hell) it loads faster again, theres no much things on it)

what i could do to optimize terrain rendering? and i know thats probably some of Streaming, but i dont know how to use it

2 Likes

Split the world into chunks and only load what’s visible

2 Likes

Terrain isn’t your right choice to do this, due to each voxel requiring some memory.
In your case, just flat plane of voxels will consume (material bit + occupancy bit + water bit) x 12500 x 12500 = ~55.8 MB
Ofc your map won’t be just flat! Let’s assume that you did it with avg depth of 10-20 voxels (if it has caves, mountains, etc) - 55.8 MB * 20 = 1.09 GB
Alright, for now such memory usage not that big of deal, but let’s don’t forget all images, meshes, instances, which will be used alot on your map. This will stack ontop of terrain memory. And the problem not only in clients loading all that, server needs to load and initialize all that too!
In short - your ambitions are too big.

To solve this, you have 3 approaches:

  1. Use meshes for terrain. Will work ONLY if you don’t need to modify terrain in any way, until EditableMesh release.
  2. Use parts for terrain. Less effective than meshes, but will have more customization. Will work better than terrain cuz 1 part can cover big zone.
  3. Use procedural generation. As player go, world will generate. The only problem is repetativity of the generated world. About being it every time diffirent, you can use same seed.

That’s all I can really tell you…

1 Like

To add onto what others said. I made a bit of an experiment with infinite plasma noise terrain a long time ago. It worked great in Studio, but I realized quickly that it just won’t work that well in multiplayer.

Any terrain created on the server will be replicated to the clients no matter what, resulting in floating islands of terrain as players walk around. This can be hidden using fog, but it doesn’t solve wasted network and performance.

The only 2 solutions I found were to either make the game singleolayer / co-op with players teleporting back if they get too far from each other, or to make terrain 100% client-sided and to completely remove any server-sided interactions, which introduces a lot of lag and flinging on contact.

Another issue I forgot to mention is that you’ll have to sync chunks if you go with the 2nd option. If 2 players want to generate a chunk, you’ll have to make sure only one does so and have the other one wait for the data.

I think making a map that big will cause a lot of performance issues so try to either use smaller sizes or go for optimizing tools in #resources:community-resources you could find good tools for optimization there.

2 Likes