Reducing Lag in a **huge** map

Hello, fellow people of DevForum!
Recently, I’ve noticed that my game lags a lot, mainly because it has quite a huge map (Approximately 20K studs on both sides), and after trying to remove a few things, I’ve noticed that it’s because of the buildings, I was thinking of adding a draw distance/Chunk based loading, but well, I am not really sure how to do that. And I was wondering if there are any simpler ways to reduce the lag. And I’ve in fact tried to reduce the part count. However, it didn’t really work both in performance nor the look of the building.

2 Likes

Fortunately for you, ROBLOX thought of this and there’s a feature you can enable called “StreamingEnabled” in the workspace of your game and set the render distance.
https://developer.roblox.com/en-us/api-reference/property/Workspace/StreamingEnabled

4 Likes

I have that in fact on, however, it doesn’t really help unless the distance is like really close.

1 Like

Have you been using a lot of unions?
You can also add less laggy graphics modes, that change the Lighting to Compatibility or something.

Make sure the StreamingEnabled mode is set to Opportunistic.

2 Likes

I don’t use a lot unions, in fact, I don’t think there are any.
And the lighting is already set to Compatibility.

Then your game may have a virus intentionally causing lag.

I’ve already checked. And there aren’t any scripts apart from mine own.

Make sure you have buildings, trees, etc… Anchored cause to many moving parts can also cause immense lag.

too many data leaks can also cause lag, try to check if there is any errors

There aren’t any errors, actually. The scripts seem to work as intended, with no issues.

Everything’s anchored, I’ve checked that several times.

You can still have data leaks without any errors. Are you doing any garbage collection to make sure items that are no longer needed are being deleted?

Do you have any screenshots of the map? So we can get an idea of how many parts there actually are.

I would try using more SmoothPlastic material. Disable shadows on those parts on which aren’t needed. If the map has several areas, like city, village etc… try to do it so when you are out of the city (for example) the trees will disappear and some other things. I would also recommend using the latest lightning technology. Some high end PCs struggle with older lightning. If they reduce the graphics then the game will look prob same as compatibility or so.

Yeah, sure



There’s already a script that removes interiors of buildings when you’re not in them, the shadows are off, and the lighting is in fact set to compatibility.

1 Like

Then I have no idea what’s wrong. Maybe scripts are not optimized or something with the place. I would try looking in scripts. But firstly, try creating a new place, export the game there and try if there it lags.

The scripts should be optimised.

I am pretty sure that if it lags here, it’ll also lag there.

1 Like

OK. Well, I don’t know what’s the issue. Does something use a lot of Physics? I would also try to monitor script usage.

Everything is anchored, nothing except the player moves.