Sunday, February 14, 2010

CPU and Memory Usage

One pair of issues I am having troubles resolving are

1) CPU usage, doing nothing the game uses about 50% CPU usage on my older system (3GHz P4 single core) Now common thing that use CPU are
- playing MovieClips, more CPU for high framerate - I have scanned the game to find any I have not stopped and found a few, but still running around the 40-50% mark
- running actionscript routines like intervals, filters, array accessing, but the game is event driven so if you are not clicking buttons or pressing keys, nothing is running

I have no good resolution for this an Google searches are not helping so far.

2) The game uses 100Mb to just run through the intro. Loading the list of assistants to pick one loads 7 assistants swf into memory, taking almost 200Mb more. This is sort of ok but once you pick I unload the swf files, but the memory usage does not decrease. I am unsure what is happening here. It could be a reference issue but I am sure I have deleted all references and unloaded all movieclips


  1. You tried Looking at this?

    I dont know if you are using AS3.

  2. Hmm. You couldn't just load all the info you needed on the assistant selection screen from txt files like the current slave selection screen? Or perhaps use some sort of list that you would select one at a time to look at or something like that? Aesthetically, it may look nice with 7 at a time, but if it doesn't work, it doesn't work.

  3. Nikesh
    I use AS2 so no particular help there. Thanks anyway

    I would prefer to avoid doing one assistant at a time as it is nicer to see many and compare. If I cannot resolve the issue I may do as you say

  4.'re using Flash to develop the game and flash is all good's infamous for eating a lot of CPU time.

    It's not your fault, it's the way Flash works. Go blame Adobe for it.

    Btw, they are working on GPU-accelated animation for the future. Interesting read >

    With love. Rikko


Note: Only a member of this blog may post a comment.