+2 votes

I'm in the beggining of the development of a 2d jrpg like ff6 of snes for mobile, even through the game is only now ~5% developed, it already takes ~80K of memory, this is not much for a complete game but it's still in the begining, so I fear the game can start having memory issues later.

what I need is a basic 'package' of tips of how manage better the memory in godot, for example:

calling get_node("node") a bunch of times for the same node takes more memory than creating a reference for it?

what is better: calling the instances of a node and adding it to the tree and deleting them from the tree after, or put in the editor all scenes at once, because after load the scene it will take memory usage anyway(or its possible 'unload' it from its reference?

Does ending the scene(which the script belongs to it) will cause the scene loaded to disapear too? (and them freeing space)

What other 'simple' good pratices i can use in godot for not consume memory?

in Engine by (23 points)

I assume you mean RAM with memory and not diskSpace.

Concerning your scene Problem, look at that thread: https://godotengine.org/qa/22328/how-to-optimize-memory-usage

Otherwise, use the monitoring systems that are available in godot, to see when the RAM usage goes up.
Also keep in mind that sprites eat up a lot up RAM.
But as far as I know most smartphones have more than 1Gb of RAM, so 80K should never be a problem.

Also keep in mind that premature optimaztation can be misleading, time consuming and might result in a minisculeamount of peroframce gained. So don't overdue it.
If all else fails, start using GdNative for the parts that you are performance bottlenecks.

Thankyou very much my friend, sorry for answer so late, I'll take your advice

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.