Best way to handle huge maps?

I’m making a game and I’m using maps that are ~50k parts in size. The maps themselves don’t lag for many people (including me) but for some people they do lag (especially game loading while transferring the map data for the first time the player enters the game - since I think Roblox is caching it). Currently what I do is just have the maps loaded onto the client via compressed map data module scripts and whenever a change is made the server tells it to all the clients.

Also I store all of the maps in modulescripts on the client from the start (I don’t pass the maps when that map is selected).

I don’t do any chunk loading (just let Roblox handle it however they do because once when I tried making a chunk loader it ended up lagging more than not using it at all), but I have streaming enabled (doubt it does anything though since everything is already loaded on the client?)

What am I doing wrong and how can I improve?

Some questions:

  • Is it better to load the map on the client side locally or have it be on the server and synced across clients?
  • Should I be using a chunk loader or try parenting parts to nil at all / reusing parts and not loading parts of the map?

Loading it on the server while having StreamingEnabled on is probably your best bet.


When I tried that (I just retried it today as well) it lags quite a bit while its loading (I’m incrementally loading the map with a certain amount of parts per second) and probably about a minute afterwards too, (this is on ipad) whereas when I have it locally it only lags when joining the game - I’m going to try sending the client the map modules incrementally as well.

Why would server be better though?

Maybe you could try using universes and having the player(s) teleport to a specific universe with the map pre-loaded in.

*I accidentally replied to the wrong person lol

theres ur problem
i never build above 10k parts even with large scale maps
anything above 10k is guaranteed to lag for anyone with a low end pc


Something to keep in mind is that the more parts that are on the client the more ram it takes up. If you run out of ram the game crashes.

how does apoc rising do it? @WhoBloxedWho
I’m guessing custom streaming (i.e. not the default StreamingEnabled option)


Yea we use a custom streaming set up for AR2. I wouldn’t recommend doing it unless you can’t get streaming to work in your favor. You also need to rely on a bit of a hack to keep your load times down since the servers version of the map needs to be hidden to clients so its not loaded by clients. AFAIK the only way to do this is to parent it to the servers camera.

Apoc 2s map is built up into Terrain and Elements. Elements are similar in function to terrain chunking, but have more complicated behaviors.

Terrain is anything that can’t be built from a palette of models. Roads, grass, dirt, sand, ect. These parts get sorted into chunks that get used by a chunking system in game.

Elements are things like trees, buildings, rocks, ect. They’re all copies of a model from a “palette” of all models on the map, and each element is made up of Core, Detail, and Sync models. Just like terrain all elements are grouped up as chunks but instead of being saved as a model, they’re replaced and represented by a CFrameValue.

As far as rebuilding the map goes terrain is as simple as placing the chunks into the workspace, and Elements are cloned from the palette and moved into place via the CFrameValue from the chunking process. Map elements when they’re placed are stripped of their detail models and have their sync models stripped clearn expect for some decals to hide holes for things like windows and doors. If the element is in the “detail” range of the camera those detail and sync models are restored.

Sync models are for things like doors and windows that aren’t static. Since your client map and server map are different now you’ll need to come up with a way to find and link models between the server and client. So when somebody opens a door, they send do the server some way of locating that door, the server flips the state, and tells all clients to again, find the door, and set its new state.

Anyways, 50k parts isn’t much these days. We do chunking for AR2 because with the 2 islands we’ve built so far we’re in the neighborhood of 250k parts with all the detail models loaded in. Playing with that much map geometry is really expensive, and like I said earlier I would avoid it unless you feel it’s absolutely necessary.


Edit: I think I came with a solution for you. I made a script that compresses details that are used too much like trees, rocks and grass, and you can load that compression where you want. Here is the link for it and inside is also a tutorial on how to use it: MapCompressor V1 - Roblox

1 Like

I’d recommend not storing parts in other parts or keeping parts in the same model far away from each other, as this can mess up streaming.