I am attempting to reduce lag and optimize performance for a game, but I am unsure how to go about doing this. I’ve tried looking around dev forums and following suggestions to reduce use of unnecessary textures, etc, but I’m not sure where to keep going from here. Any suggestions on reducing further lag is appreciated!
workspace:
Parts: 15999
Unions: 1122
Meshes: 8816
BaseParts: 205
Misc: 13900
6 Likes
-
I think the Lua Heap and the Script is excessively large is probably because of memory leaks and other flaws in your scripts. Look through your code and see if you used loops in an inefficient way, have too many functions connected to events (so disconnect them), etc.
-
The PhysicsParts is definitely from anchored parts. Try anchoring the parts that you don’t need physics in (i.e. very little objects should not have physics if they’re very minor, the walls should be anchored, etc.).
-
And of course, the GraphicTexture is most likely because you might be using textures in the wrong way. Here are some tips:
- Don’t texture parts that are not visible to the player at all (like something facing the void).
- For little or minor objects try to reduce the resolution of your textures (in pixels of course).
- Try to reuse textures, and avoid introducing too many distinct ones. The more different textures there are, the higher the memory usage is.
- If you have too many animated textures (using the OffsetU and OffsetV properties), then try to limit that the best you can.
- There are additional tips provided in this post (which, in addition, says that you should avoid using semi-transparent textures since the engine needs to compute the resulting color of the object and the texture).
-
Also I see that Graphics Parts (I think materials), GUIs, and Sounds have quite lot MB held in hostage. Try limiting them each in the same way I told you with the textures (i.e. not ridiculously many GUI animations).
In all, looking at the numbers there, I believe that you have finished or close to finished game (or at least very large). So, you have to go through it yourself and apply the tips above.
I hope you got what you were looking for!
7 Likes