How to optimize my game the best it can be?

  1. What do you want to achieve? Keep it simple and clear!
    i want to to optimize my game to ensure that every one have a great experience
  2. What is the issue? Include screenshots / videos if possible!
    i want to know
    if using many script better or merge them in few script ?
    if using many remote event better or use one or two but these two remotes will be called from many different scripts ?
    is making many screen gui bad ? or it is just like folder but for ui elements ?
1 Like

if those many scripts will do the same thing then its better to merge them into 1 script

i donot exactly know what is better but its good to not send remote events frequently or pass very large data into the remotes i think that is more important

i think its fine as long as they arnot all enabled at the same time

1 Like

no the scripts saving and loading different data

1 Like

its fine having a separate script for saving/loading data
what i mean is like you making an obby and want to add a killbrick so you add a script into each part while they are doing the same thing this is bad for 2 things → performance/debugging/organizations
rather than that its fine using scripts that doesnot do the same thing like saving/loading data

1 Like

no for this i would use collection service and tags

1 Like

what about remote events ?
my remote event have like maximum 4 parameters

yes that is what i mean
the things that you should consider are having complicated meshes with alot of faces/having unoptimized scripts
this topic is great for optimizations that will go in depth on how to optimize a pet sim game
Real world building and scripting optimization for Roblox - Resources / Roblox Staff - Developer Forum | Roblox

1 Like

So, before any big explanation, always you’re creating a game, the more you have, the laggier it can be

Obviously this doesn’t count a lot with the new devices that can handle a lot of information, but it’s always good to remind that, being on Roblox, or other game engine.


What I would recommend, is to make a Module Script with the main game functions
You can also create 1 script for multiple parts at the same time!

For example, you have a kill brick:
Instead of doing 1 script in each part to kill the player, make just a block and add a tag to it, like “Kill Brick”

Then, you create a script which gets every block on the game with the tag “Kill Brick” and handles all the kill blocks in the same script.
That can be done for everything, weapons, objects, and more

It’s always better to don’t use a lot of remote events, it’s easy to exploit with them
But if it’s really needed, it won’t change a lot if it’s different ones or not, Roblox will use the same data amount if I’m not mistaken

Well, screenGui are like “complex folders”, but at the end, it can be considered as a folder, where it won’t do such difference at the performance.


What I would recommend more, is to do a Module Script that could handle a lot from the game, both local and server side

If you’re able to make a “perfect” module for your game, it will improve a lot how fast you work on your game, because you don’t need to be always scripting the same thing, just require the module and start the function.
And that will save performance too!

Remote Events aren’t a big problem (unless it’s for real a lot of them), if you use them just when you need, it’s all fine at the performance
but remember that each remote event, is one more way to get hacked!

2 Likes

i have like shops in my game and the player can buy items from the shop
i made 1 remote event and when the player buys something from any of these shops
this remote event get fired

it isnot about how many arguments you have its how many bytes are they
for example
“THIS STRING IS TO LONG AAAA LONG STRING” passing this string frequently isnot good
(this is abit advanced) if you are sending numbers/integers you may use buffers to reduce the data sent

1 Like

ok just make sure that your not sending the price of the item because exploiters can exploit that and get inf currency in your game

1 Like

yeah sadly players can access client side and call these remote events

1 Like

yes iam not sending the price from the client side the server side gets the price by the item name

1 Like

hmm then mechs is a big problem ?
like i use mechs to make things look nicer rather than blocks

1 Like

From my experience, it will really depends on the meshes

~10 meshes with +7k triangles being rendered should be enough to cause lag in most of the devices

If it’s optimized meshes, with a low triangle count, it should be fine to have a lot


But also, remember that meshes are way better than unions in most of the cases!

1 Like