Hints to Better Memory Usage (800+ Memory Usage in game)

  1. What do you want to achieve?
    To optimize Memory to get better performance

  2. What is the issue?

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

All my unions/Meshparts were set to renderfidelity = precise,
I changed to automatic

all/most humanoids I set all their character parts to off…

all moving parts are local scripts.
GUI is not that advanced…
I don’t have much Terrain
is there a way I can find out my part count to send?(would that even give a big impact to memory like that…

2 Likes

How many parts is your map? How complex are your unions and meshes? Optimizing on both of those can reduce memory usage.

3 Likes

how would I find my part counter via studio?

and tbh I would like to go for a high detailed game as other big games have and don’t have insane memory numbers…

1 Like
count = 0
for _, part in pairs(workspace:GetDescendants()) do
         if part:IsA("BasePart") then
                count = count + 1  
         end
end
print(count)

Run that on the command line and check output.

Also, you don’t need to have crazy high part counts to have a high detail game. You just need to know how to optimize on part/union/mesh count effectively

2 Likes

Oh its only 35K, which not bad…I would think

1 Like

See if you can remove or change anything to make them less objects.

1 Like

It depends. Considering you have unions and meshes included, you should consider the tris count of the meshes and number of negations you use.

35k is not a low part count by any means, to be honest. It’s definitely optimizable, but you’re going to have high memory usage regardless.

3 Likes

I took my game into studio and deleted every part outside of spawn, all meshes etc, it dropped from 3.5K memory to around 2.9K Memory… could not bad that.

Not a bad start. Could you send some sample images of the meshes in your map? I can tell how complex they are and recommend some further actions you can take to optimize.

I have way to many to sample… trees, etc but even when deleted the memory doesn’t drop dramastic.

but I also deleted my scripts as well so I can’t find the exact issue…

take a look into your scripts

for example if you have a ton of while wait() do to change your cash try using .Changed function if it dodesnt need to be constantly refreshing, this csn help with game lag drastically if there is alot of them

1 Like

only around like 10 in each teleport, but nvm I should be okay… I just need to adjust CPU… was testing big games and most have 700+ memory

1 Like

idk how good you are at scripting but you could create your own rendering system that deletes parts that are too far away and replicates them back when you are close

1 Like

would this really be less laggy?? if I send players to different levels and they have to wait for parts… I wanted the full version of my game to be speed runnable and if they have to wait would kill the fast aspect of it.

nono, sorry for the misunderstanding it wouldnt be a teleport

as they move it deletes and generates parts. some friends said this helped massively on previous games with high part count

would you say 35K is a high part count game?

for low end devices yes, you could look at optimising how parts are placed;

for example if you have built 1 wall with 4-5 different parts, after 35k parts this is alot of extra parts.

this can be a tedious task but may be worth looking at

don’t mind the tedious part, would it better to build a house with 1 union using negative parts or just 4 parts?

Read more about it in this thread:

800mb isn’t bad for a game, it’s pretty decent.


Briefly, the more RAM you have on your device, the more Roblox uses for better experience. Test the same game on a low RAM device, and you’ll see it uses less.

3 Likes

your better off using parts opposed to unions as theyre know to cause performance lag,

if your building houses that cant be entered just build it as 1 part , no union, although if theyre not exactly block shaped this would be difficult.

tldr; dont use unions use parts theyre far better

1 Like