Search code examples
iosopengl-escocos2d-iphonesparrow-framework

Building a 2D game for iOS


What should I use to create a 2D game for iOS? There are a few alternatives, but I don't know what the performance implications are. I was considering OpenGL ES 2.0 and GLKit, Cocos 2D or just UIKit with Core Graphics.


Solution

  • OpenGL (GLKit, ES 2.0) will definitely have better performance, but requires more effort from your part. CoreGraphics is the easiest solution but may not be powerful enough for complex games. Cocos2D will give you decent performance (way better than CoreGraphics, but probably worse than OpenGL), and have intermediate difficulty and complexity. So:

    • If the game is very simple and you want to finish it quickly, use CoreGraphics.

    • If the game is complex and you want to finish it as quickly as possible, use Cocos2D.

    • If the game is complex and you want to have complete control over how it works, use OpenGL. You will be able to make things that are not possible with the other two options but you will take much more time to learn OpenGL and to write the game.