views:

55

answers:

1

I'm looking for is a heuristic for determining which of the primary graphics methods for iPhone/iPad development would be the most appropriate solution for a given problem.

+4  A: 

Simple answer:

Quartz 2D

Use Quartz 2D for custom interface elements to give a stylized look to your application.

Core Animation

Easier to use, although used where performance is not critical. Great for quick animation routines. a lot easier to do effect in. Used with UIViews as well. Can be used to create simple fine games. like pong or card games.

OpenGL ES

Great for performance critical games. A bit more complex but once you can get your head around the tutorials available and the frameworks provided you can create high perfomance games. And also port them to other devices other than the iphone very easily which is quite cool.

Long Answer:

Quartz 2D

Quartz 2D is the powerful 2D graphics API for iOS. It offers professional-strength 2D graphics features such as Bézier curves, transformations, and gradients. Use Quartz 2D for custom interface elements to give a stylized look to your application.

Core Animation

Core Animation is likely the appropriate choice for games where performance is not critical such as simon says type games, card games, and trivia games. Some might argue that OpenGL ES is easier to use, and it likely is if you’ve studied say.. DirectX.. but Core Animation (and Quartz 2D for that matter) is much easier to do simple effects in, and can be used with existing UIViews.
Core Animation is fine for games where performance is not critical, and for new programmers will likely be easy to use, OpenGL is needed for anything else. Core Animation utilizes OpenGL ES, it is high level, and in my testing works fine in situations where performance is critical.

OpenGL ES

is your choice for performance critical games. Which is essentially anything but simple mostly static games like the ones mentioned I above such as first person shooters, flight simulators and the like. You also get the added benefit of potentially being able to port your games to a device other than the iPhone, and there is alot of existing game code in OpenGL that can be converted the other way. OpenGL ES is an open standard that is used on a growing number of devices created by a wide variety of companies, and because CoreAnimation is a higher level framework built atop OpenGL ES it cannot provide nearly the same performance.

http://maniacdev.com/2009/07/iphone-game-programming-coreanimation-vs-opengl-es/ http://developer.apple.com/technologies/ios/graphics-and-animation.html

PK

Pavan