RAM Usage Help!

My app has 1 main scene and on that scene there are many actors and a lot of sound is involved. But the app is using up 300 MB of RAM and after a while the device heats up a lot and takes long time to load too. How can I decrease RAM usage in my app???

Comments

  • davidsalomondavidsalomon Member Posts: 136
    I don't know if this has anything to do but if my actors go away from the screen and will never appear again, I destroy them.
    Maybe destroy anything that will not be used or seen again?
  • Right, I'll try doing that. Thanks for the advice :)
  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    To completely understand this you need to know what RAM does. RAM stands for Random Access Memory. It stores and loads files (actors, scenes, sounds, etc.) and uses them in the application. So the more entities you have the more the RAM has to work to load them. Also as I said before sounds/music count too. So to reduce RAM usage, delete unused actors and/or make one actor that does the job of many. (An example might be one actor plays music and controls entities) Hope this helps! :D
  • pierrenilssonpierrenilsson Member, PRO Posts: 28
    I would also need some advice in this direction. Many actors/prototypes = always bad? many actors vs one actor heavy with rules? I have not really found something about "optimization RAM" if you understand me..except standard ones as "dont use music" and such.. not really an option always.
    But some questions on this topic: Is many prototypes a bad idea? Better to have one prototype and unlock versions? is there a difference? How about rules, do they affect RAM? is more rules = more ram usage?
    If someone have seen a post about this i really would like to read it :)
  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    @pierrenilsson Because the more actors you have the more RAM it uses. Therefore you can't have too many or it will crash or severely slow down your game. I believe that 170 actors is the max before a crash/meltdown. What I recommend is putting all that you can into one actor. Also I understand your point about the music and how not having it isn't always and option. I agree. Also on the point of prototypes and unlocked versions, I believe that prototypes don't need as much ram because they aren't accessing scene attributes. So I recommend trying to put as much as possible into the prototype. :D
Sign In or Register to comment.