I am trying to create a relatively simple game with 2D graphics that has some complex animations. I tried to develop a game with the core graphics libraries Core Graphics and Core Animation, but the performance of the animation of the game objects is not satisfactory (i.e., jerky / delayed).
So now I look at Cocos2D, which looked very promising until I tested the high resolution support for iPhone 4. This does not seem to work very well, but again, I just started to peek into it.
The only thing the documentation talks about the problem is that it's easy to use CCDirector to set the scale factor, which can be done as follows:
if( [[UIScreen mainScreen] respondsToSelector:@selector(scale)]) { [[CCDirector sharedDirector] setContentScaleFactor: [[UIScreen mainScreen] scale] ]; }
However, this does not give the expected behavior. It just doubles the number of pixels to work, that is, I have to take into account the "double pixel" coefficient in all my code.
In the Core Graphics / Animation libraries, the coordinate space we are working with does not change. Behind the curtains, he simply doubles everything to fill the high-resolution screen of the iPhone 4 and uses @ 2x images, if any. This really works very well, and the game logic does not require device accounting. Cocos2D seems to have implemented this rather poorly, making me not want to go on board Cocos2D.
I found some other topics on this subject, but there were no real answers that didn't deal with workarounds. Is this fixed? Am I doing it wrong or is Cocos2D just not ready? Are there any alternatives to Cocos2D that can give me what I need?
source share