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

4 comments:

  1. You tried Looking at this?

    http://www.kirupa.com/developer/as3/removeMovieClipAS3.htm


    I dont know if you are using AS3.

    ReplyDelete
  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.

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

    Someone1001
    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

    ReplyDelete
  4. Cmacleod....you're using Flash to develop the game and flash is all good but....it'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 > http://www.anandtech.com/video/showdoc.aspx?i=3678



    With love. Rikko

    ReplyDelete

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