In my game, I want to have it be as efficient as possible. The problem is that I think I have too much client memory usage. I had over 1100MB on my phone. What’s the best way to reduce memory usage?
To decrease memory usage, you might aswell decrease the amount of loops in scripts. If you have too much unwanted scripts or other scripts delete them if they’re too much! Also, turn down the quality a little and if you can, lock the graphics to 0. That’s all the advice I have today, I hope I’ve helped you! Just a few tips that I know.
I believe there is a tab in settings that shows how much memory specific scripts are using. If I’m mistaking, here are a couple things you can do:
You could try checking how long certain tasks take to run. The bulk of memory usage should be at the beginning, when everything is loading in. After that, most tasks should take at most a couple seconds (this can very depending on said task).
Check that while true do loops aren’t present in your code. Events are always the way, bindable events, Roblox provided events. These are all important.
Lastly, be sure that you aren’t spending processing power on small details, or assets that are far away. While this can usually be solved using step two, maybe switch out that fancy character with a low poly one once they are far away. Unloading rooms when they aren’t needed. A lot of client memory usage is usually spent on graphics, not scripts, so this might be another issue.
There are some times where I don’t know what else to use besides a while loop. How would I make something repeat every 3 seconds without a while loop?