views:

1334

answers:

4

I was just wondering if most games on the iPhone are done in OpenGL ES as opposed to using Quartz and Core Animation. Are Quartz and Core Animation mostly used for just creating slick interfaces? Or if there is a point with games where OpenGL probably has to be used over using other tools?

+9  A: 

For efficiency reasons OpenGL ES is you best choice for games, unless your writing a "simple" board game or card game (like Solitaire). In this case Core Animation would be a good fit.

rjstelling
A: 

Mostly it comes down to whether you need 3D or not. If your game is entirely 2 dimensional, then using Quartz for your drawing is probably simpler. Not that OpenGL is all that complicated, but it is more complex than the Quartz interface.

Quartz drawing and compositing will be OpenGL accelerated when possible, so there shouldn't be much performance difference if you're strictly doing 2D drawing.

Mark Bessey
I disagree with this statement. Quartz drawing does use OpenGL, but there is overhead. OpenGL is an order of magnitude more efficient.OpenGL > CALayer > UIKit (approx order of speed)
Kailoa Kadano
+5  A: 

You should check out cocos2d-iphone if you are going to do a 2d game. It seems to be a pretty solid foundation. It comes with the chipmunk physics engine and everything all ready to go.

Ronald
http://code.google.com/p/cocos2d-iphone/
stefpet
cocos-2d is Objective-C though.. If you want to stick to C/C++, then it's out.
sean riley
+2  A: 

I think OpenGL is your best choice, I can't agree that the Quartz stuff is any easier to use.

Also if you're successful then most of your code will be portable to other platforms. Something to consider.