Home
Reviews
Forums
New Games
Podcast
• submit tip •
  #1  
Old 12-13-2008, 06:03 PM
Galen Galen is offline
Junior Member
 
Join Date: Dec 2008
Posts: 14
Question Framerate issues

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
Reply With Quote
  #2  
Old 12-13-2008, 09:40 PM
drunknbass drunknbass is offline
Senior Member
 
Join Date: Nov 2008
Posts: 128
Default

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
Reply With Quote
  #3  
Old 12-14-2008, 06:00 AM
Frand's Avatar
Frand Frand is offline
Senior Member
 
Join Date: Oct 2008
Posts: 1,006
Default

Music streaming causes semi-random performance hits in our experience. Experiment with other music formats and/or lower bit rates.
Reply With Quote
  #4  
Old 12-15-2008, 04:54 AM
darwiniandude darwiniandude is offline
Senior Member
 
Join Date: Oct 2008
Location: 127.0.0.1
Posts: 383
Default

Quote:
Originally Posted by Frand View Post
Music streaming causes semi-random performance hits in our experience. Experiment with other music formats and/or lower bit rates.
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

Last edited by darwiniandude; 12-15-2008 at 04:00 PM..
Reply With Quote
  #5  
Old 12-15-2008, 05:37 AM
Frand's Avatar
Frand Frand is offline
Senior Member
 
Join Date: Oct 2008
Posts: 1,006
Default

Quote:
Originally Posted by darwiniandude View Post
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
SPiN uses XM, but the observations regarding streaming audio come from the development of Zen Bound.
Reply With Quote
  #6  
Old 12-15-2008, 03:48 PM
Galen Galen is offline
Junior Member
 
Join Date: Dec 2008
Posts: 14
Default

Thanks for the ideas. Unfortunately we still get the framerate drops even without music playing. It must be something else.
Reply With Quote
  #7  
Old 12-16-2008, 10:21 AM
Hippieman's Avatar
Hippieman Hippieman is offline
Senior Member
iPhone 4, iOS 5.x
 
Join Date: Nov 2008
Location: San Francisco
Posts: 385
Default

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.
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


iPhone Game Reviews | iPhone Apps

All times are GMT -5. The time now is 03:40 PM.