1

I am finished my cocos2d project, which uses the accelerometer to rotate the current CCLayer for a particular game mechanic. I've always noticed a 10-15 fps drop of which I couldn't find and decided to take look now. I thought it would have something to do with iterating over objects but it doesn't.

The drop occurs when the CCLayer is not rotated at 90/270 degrees, so as it approaches 0 degrees I lose 10 - 15 frames...super annoying.

I don't use the CCLayer for anything unusual, does anyone have any idea?

TL; DR: fps drops when CCLayer is rotated 90 degrees...Why?

Kara
  • 6,115
  • 16
  • 50
  • 57
user876197
  • 11
  • 2
  • are you setting the rotation in the accelerometer method? Don't, make a scheduler, that checks some instance variables (you set them in the accelerometer method), you scheduler could run 30 times a second, and would still rotate smoothly, but would happen alot less frequently in the game tick, giving you more fps perhaps – Bongeh Jan 25 '12 at 09:34

0 Answers0