Avoiding lag when making a Tycoon map

Lets say you want to make a Tycoon game with servers that can let up to 20 people join.

How would you avoid lag? For example if the point of the game is building a village on an island… that would be a ton of models used in game (because you need all of them times 20).

Roblox has been improving the LOD system a lot. So, could you just spread the islands apart from each other and to prevent the client from loading in the entire map upon joining the game? So only the island you’re on would be loaded in unless you get closer to any of the other player islands.

Or would this require a self made system? If so, I guess I gotta make a follow up scripting support post about this.

Yes, by default the RenderFidelity property adjusts the detail of meshes and objects based on distance, if your’e within 250 studs the detail is high, 250-500 medium and anything over 500 is low.

If your tycoons have moving parts, it’s best to handle animations on the client side. Lots of static models usually won’t lag the client, but once they start moving, they go through the physics engine every frame, which can hit performance. So for any effects or animated instances, run them locally on the client and you should be good.

1 Like

Thank you.
One more question… When the visibility of an object is blocked by something else standing in front of it…It also won’t get loaded in, right?

So for example if the game is all about interiors (so a ton of different objects) those wouldn’t really cause a lot of lag because they get blocked by the walls of the house, right?

-Avoid using too many unanchored parts.
-All tweens/animations or effects must be on the client.
-Physics is actually better than setting the CFrame of a part, for reference see video of Suphi Kaner.
-avoid loops, use events.
-avoid accidentally causing memory-leaks by disconnecting any events that are unnecessary.

By the way, in developing your game, performance should be one of the last things to do. So first focus on your system in general, then the performance.

1 Like

You can space out the islands and use Workspace.StreamingEnabled with the right settings, but for the best performance and memory efficiency, especially with large models as it is smarter to manage visibility yourself. Just parent the island models of nearby players or the local player to the workspace, and keep the rest in replicated storage or server storage until you need them. This way, you have complete control over what loads and when, allowing you to unload far-off player islands and greatly cut down on client-side lag

1 Like

The avoiding memory leak part is the hardest for me because I don’t really know how to script.

I focus on building and modeling.

Usually when I script something by myself I just let AI check it for memory leak.
Though lately I lost my trust in AI regarding that because ChatGPT somehow manages to turn mostly functioning scripts into a lag causing, twice as long abomination that doesn’t even manage to do half of what the initial script that only had some minor issues was able to do.

Hmm alright well sounds like this is mostly done using a system you need to script.

But simply placing the island or another player so far away that you can’t see it should also do the job, right?
So even if all of them are in the workspace.
Let’s say the game got no script. Just the map so far.

Found this here: Best Practices Handbook

I also have not trusted AI for coding since around 2 years ago. AI is handy for literature though.

By the way, I found that post by typing this into my search engine

avoiding memeory leaks site:devforum.roblox.com

Using site:[your site] will cause only a specific site to show up. I use it all the time and helps me to solve almost all developing problems pretty quickly.

1 Like

Well basically yeah that’s the best option I can think of which doesn’t require any coding skills

1 Like

AI is good for scripting but only at certain points. Not AIs like ChatGPT or DeepSeek or anything similar but the Roblox one. I’ve used it quite a few times now and it’s been really helpful for both fixing scripts and debugging to me