To all experienced developers out there! I’ve been trying to make my game less laggy and not take a heavy toll on client side. My game currently depends on the power of the device and internet that the player is using. I want to prevent that, however I am not sure what’s the best way to do it. Is it better using a server side script with remote functions? If not, what’s another best way to do it? Also does the amount of parts being loaded in game also affect the game? I recently came upon a post from @asimo3089 about converting a vehicle just to 4 parts but it looks almost the same exact thing as the one with more parts, but better. Thank you guys in advanced!
It’s a very broad question you’re asking, with very little information about your game.
--Is it better using a server side script with remote functions?
- Unable to answer that without more information.
-- Also does the amount of parts being loaded in game also affect the game?
- Yes it does. You could turn on streaming enabled which will to some extend improve performance on the client.
--about converting a vehicle just to 4 parts but it looks almost the same exact thing as the one with more parts, but better.
- Vehicles can be transformed into it’s most basic form. Chassis, Wheels & Seats. The rest can be done with tools within studios like VehicleSeat, Attachment ect.
Client side should NOT be taking so much of a toll to the point where it actively bothers the game experience. If anything, the server should be doing some suffering more then the client with it’s free server hosting?
- Identify what is taking so much performance from the client, turn these things on. (under view)
- Press play and check for multiple repeated scripts. (if there is 100 scripts of the same name, there is something wrong with that script, it should be slimmed down to 1 using whatever you need to use, collectionservice, object orientated programming with lua, etc)
- Check for scripts that run on a rate of 60+/s as they are using runservice functions which if they are performing intense enough operations or called throughout many scripts many times will cause lag.
- Delete these scripts causing severe client lag or any script that isn’t required or recognized causing a big % chunk of performance to be taken away.
- Check your game for viruses, using the find function type these keywords and scan them thoroughly.
- loadstring (SHOULD BE REMOVED BASICALLY INSTANTLY)
- require (investigate diligently before removing, especially with require(number))
- Check the other things like task scheduler.
- Repeat on the serverside too
Luau and the Roblox Engine should not be having such a hard time, as they are both surprisingly fast and efficient (for the most part)
Also does the amount of parts being loaded in game also affect the game?
Yes, it does. It’s deprecated but every “thing” is measured by data cost (I think in KB). You can check the datacost of something by pressing play and in the command bar
As a test, type
and press enter, you can do this for any instance as well, serverstorage, repstorage, game, etc. The more parts, well, the more THINGS, the more datacost. You want to keep this number as low as possible and optimize as much as you can like 100s of the same script into one. Removing unnecessary parts, decals, textures, and more.
Also, enable StreamingEnabled by clicking on workspace and enabling that on the bottom, if it bricks your game then undo it.
Thanks @TortenSkjold and @AIIusi_onist, I will try these suggestions.