I would like to start by thanking the cocos2d community as a whole for all the knowledge they have made available in this forum. I am about a week away from submitting my first game, and I wouldn't have made it nearly this far without all the great info on this site.
Anyway, on to the question:
My game uses box2d and follows a b2body moving fast through the world I created. In the world I have three background layers scrolling at different speeds for a parallax effect. The layers are .png images that I put in a sprite sheet with texture packer, as well as a CCLayerColor. Normally, when I run the application on my 3gs or in non-retina mode on the iPhone 4 everything runs smoothly at 60fps. However, as soon as I switch to retina my frame rate drops to 40fps.
I figured the drop was just because the hd graphics were taking up too much memory, but even when I turned the pixel format to RGBA4444 and tried using non-hd graphics scaled 200% I was getting 40fps. Also, in instruments, my cpu use is only at about 30% during the most tasking parts of the game. I have thumb turned off for armv6 and on for armv7. If I remove the CCLayerColor and one of the sprites my fps jumps up to 50, but I need both of those elements in my game and 50fps still isn't great. When I test the game on the iPad 2 (universal app) it never drops below 60fps and it uses most of the same -hd graphics that I am trying to use on the iPhone 4. Is the difference in performance really that great between the iPad 2 and iPhone 4?
Does anyone have any suggestions on how I could boost the frame rate in retina mode? Is there a build setting that I could be missing? I"m running in release mode, I did the stuff on the cocos2d best practices page... I am out of ideas at this point. Ideally I would just be able to switch retina mode off for this one scene because it would run smoothly if I could do that, but unfortunately as far as I know you have to commit to either having retina mode on or off. Using smaller images stretched 2x hasn't seemed to help much.
I'm so close to being finished but this fps problem is really vexing me. I never thought I would be having performance issues on the iPhone 4!
Thanks so much in advance for any suggestions!