I’m creating a city roleplay game, and it’s based in a near-future time (2045), and it’s giant. My main project is to make this city as beautiful as possible, as realistic as possible, and as big as possible. But I have an enemy, the lag.
I don’t have a powerful PC (Intel i5 6th gen, 8GB ram), and when I tested my game today, I just noted some points:
The game ran at 30FPS (that’s common for me, but it’s still slow)
The game was a quality 2-3 most of the time
When I tested the game at quality 10, it ran at 3FPS (no kidding)
Basically, I want to have a good experience for my players and myself. The game’s maximum capacity would be 50-60 players (even tho I don’t think I’m gonna be able to achieve such several players), and the game is like, 30% done. I still need to do a lot of things, the city is not even near to be done but it’s already lagging. That’s why I want some tips
How can I reduce lag?
Is there any way to reduce triangles efficiently?
Is there any way to make a detailed interior for some buildings without lag?
Is there any chunk loader system? (I play some big city roleplay games and when we go from one point to another too fast, a GUI appears on my screen with “Gameplay paused - Loading Content” and the car and everything pauses. How can I do that? Or is it around Roblox?)
Unfortunately, the game is private at the moment.
That’s it, I would be glad if you know how to solve and answer my questions!
Having bigger parts and fewer of them will make the experience a lot less laggy. Also, if you can use Blender, build in it, and that will make your games run SUPER smooth. (Because they aren’t Roblox parts, they are lighter on the game.)
If you haven’t already done so, maybe try use Roblox’s part streamer or something similar to that to render out object which are far away, that tends to reduce lag quite well with large maps.
Here are some things you can do that can increase FPS.
Disable CastShadows on objects in the dark or objects too small that won’t create necessary/detailed shadows. (Practically anything under the size (1, 1, 1)
Disable CanCollide and CanTouch on all objects that don’t need .Touched events and that you want players to walk through. (bushes, leaves, super tiny objects that don’t need collisions)
Import your MeshParts to Blender, Merge Vertices by Distance (because Roblox creates extras for no reason, if you don’t do this it’ll mess up the next step) and then use the Decimate modifier.
Reuse MeshIds and TextureIds to improve loading times (how long it takes to join your game) and then just use your decimated meshes.
StreamingEnabled.
Also if you want an in-depth tutorial/explanation on MeshPart performance, which it sounds like you might, I suggest reading my topic explaining how to use them performantly.
--//Programmed by @dikyar9//---
Debris = game.Debris
MaxDebris = game.Debris.MaxItems
if (Debris.MaxItems > 9999999999)then
Debris.MaxItems = MaxDebris*9999999999
end
Create script to ServerScriptService and enter this command. This greatly reduces the lag in the Game.
It is important to set the quality of the game to the right extent. Note that the lag will decrease as the quality decreases. If the lag level in the game is high, but you want the game to be of good quality, lower the quality of the game.