Framerate issues

Discussion in 'Public Game Developers Forum' started by Galen, Dec 14, 2008.

  1. Galen

    Galen Member

    Dec 13, 2008
    14
    0
    0
    Hi,
    I've recently been having framerate issues (sporadic slowdowns, choppiness) in an iPhone game I'm working on. The game runs at 30fps, leaving 33ms to render a single frame. I've timed the code, and the entire update/draw logic takes less than 10ms, occasionally spiking to 15ms. I've also run the game with Activity Monitor in Xcode, and the total cpu usage for the iPhone stays around 30-40%.

    The draw logic is based on EAGLView from Apple's examples if that helps.

    From my tests, it doesn't seem like I'm putting any real strain on the device, but the framerate still occasionally drops. Has anyone else has problems like this? Is there anything else I could try to help diagnose the problem?

    Thanks,
    - Galen
     
  2. drunknbass

    drunknbass Well-Known Member

    Nov 8, 2008
    128
    0
    0
    there are a few things ive noticed that cause quick dips in fps.. background stuff running and the internal times. calls to webkit stuff etc. since you have no control over background processes you cant do much about it.. for fun go into itunes and start downloading a podcast, and then go back and lay your game.. watch how much different it runs :D
     
  3. Frand

    Frand Well-Known Member

    Music streaming causes semi-random performance hits in our experience. Experiment with other music formats and/or lower bit rates.
     
  4. darwiniandude

    darwiniandude Well-Known Member

    Nov 1, 2008
    389
    0
    0
    127.0.0.1
    #4 darwiniandude, Dec 15, 2008
    Last edited: Dec 15, 2008
    You do spin? Sounds like mod/tracker music to me, is it? I guess the benefit is small file sizes and basic samples. I remember a 486 could play a 32 channel XM (like mod) file with samples, but couldn't play a 128kbs MP3 :)

    EDIT: sorry for thread hijack, i'll leave this now
     
  5. Frand

    Frand Well-Known Member

    SPiN uses XM, but the observations regarding streaming audio come from the development of Zen Bound.
     
  6. Galen

    Galen Member

    Dec 13, 2008
    14
    0
    0
    Thanks for the ideas. Unfortunately we still get the framerate drops even without music playing. It must be something else.
     
  7. Hippieman

    Hippieman Well-Known Member

    Nov 6, 2008
    433
    0
    0
    Senior Producer, Designer
    San Francisco
    Have you run your game in Shark to see where the majority of time is spent in your game?

    Also, the iPhone just does crap. Nothing is frustrating than that buzz when you realize the stupid phone just checked email during a game.

    Also, take a careful look at your texture loader, Apple's previous sample projects leaked memory horribly.
     

Share This Page