Reputation: 2827
I've built a game with cocos2d and all works fine but after adding an AdMob banner, touches get sometimes delayed for some seconds. It looks like the game is lagging on touchMove but the frames are stable at 60.0 FPS. Another thing I recognized is that the touches dont get swollowed or lost. They are only delayed.
This happens even if:
userInteractionEnabled = NO;
Changing touch priority of touchdispatcher didn't help. I've tested it on several devices (ipad, iphone).
Any ideas how to fix it (without removing ads)?
Upvotes: 2
Views: 417
Reputation: 2827
I don't understand why this happens only after adding AdMob but the solution is to decrease accelerometer updateInterval! it was set to 1/60 (Kobold2d default settings)
[UIAccelerometer sharedAccelerometer].updateInterval = 0;
I hope this helps someone. I've spent some days for it
Upvotes: 2