First off, let me apologize for the open ended question, but I am at my wits end here. For about a week I have been trying to work around periodic performance problems in my game. Every once in a while when I run my game it is “jerky” for lack of a better word. The rest of the time it runs perfectly smooth. The odd thing is, when the game is choppy, I am still getting 30 fps (based on turning on the display in Director or averaging it out myself). I am certain the game can keep up with 30 fps. In fact, it can average around 52 fps.
I am using Chipmunk, so I thought I might have an issue with Chipmunk performance or keeping the sprites in sync with my shapes. Like I said though, most of the time the game runs perfectly fine. From what I can tell it is totally random, I am not running into any leaks as some times it happens as soon as the game starts.
I also thought it might be due to a bug on the 3GS (apparently there is a common problem with OpenGL games), but it seems to happen on my 2nd gen iPod running 3.0 as well (though it is not nearly as pronounced as on the 3GS). I did most of my development on the iPod running 2.2 and I do not recall having this problem. I am going to revert the iPod tomorrow and see if it happens.
I have also tried using various profiles in Instruments to see if anything jumps out at me but have found nothing (though I am certainly no master in Instruments). For the life of me I cannot get Shark to work with my game.
Oh, and I am using cocos2d 0.8
Like I said, I apologize for the very vague request for help, but can anyone give me any suggestions as to what I could look into?
Thanks,
Mike