RAM usage

4 posts

Flag Post

Hi everyone!

I have a question regarding RAM usage.

I’m using Flash CS6 pro and I’m working on a little card game (very simple, not intended to be published).
The board has 100 32X32 pixels “cards” on it, which are blitted bitmaps (each is 18 KB), additionally there are few MovieClip menues (for score, ect…).

I decided to monitor RAM using System.totalMemory, and I was very suprised to find out that it’s using ~ 70 MB (considering nothing moves all the time is seems a lot…)
Additionally, RAM climbs and drops ~ 5 MB every 15-20 secs even though no new objects are created (I guess the drop is Flah GC, but why is it climbing I have no idea….).

My question is – why is the RAM usage so high? (or perhaps it’s normal..?)
And what can cause RAM to go up like that, even though nothing is created..? (or perhaps it’s normal too..?)
One last thing, what is the desired RAM usage for publishing for moblie devices assuming ~ 25 fps?

Thank you!

 
Flag Post

When you say that you are using Flash CS6, in what way exactly? Are you designing the game inside the stage and coding stuff on the timeline? Because when you don’t follow good programming practices like using external classes and such, you lose much of the control you have over what objects are being created and destroyed.

 
Flag Post

Just note that I’m pretty sure those memory statistics also take into account any Flash running in the background, such as Youtube videos, adverts, etc.

 
Flag Post

Drakim, maybe I wasn’t clear, I dont’t just throw stuff on the stage and let it fly :) My little game has 22 classes supporting it…Actaully there is no code in the Timeline……Thought I am in fact a begginer dev, I do know what I’m doing lol (removing stuff from stage and memory, removing EventListeners to triggher GC, etc…)

Dealmaster – Yes, System.totalMemory do show the total memory used by Flash for everything that is using flash in any way, but I dont have such things running in the background, so I guess that this is roughly a good estimate. I tried coding myself stuff to cheack the memory used in the past, but i kinda messed it up, so i’ll stick with what flash can offer for now at least :)

Anyone else? :)