PDA

View Full Version : What to use for 2D graphics on iPhone?




chrono1081
Jul 2, 2009, 01:20 PM
Hi guys.

I was reading about Cocoa and one site said that iPhone does not support Cocoa (which I thought was what the iPhone ran...). Apples developer site does not play well with my work proxy, and I live where I work so I can't log in and find the answers I need : / Here is what I want to do:

-Make 2D games on the iPhone. I can make these fine in windows and mac OS but this is my first foray into iPhone development. Graphics would be strictly sprite based.

From what I read I thought Cocoa is what I needed to learn, now I'm thinking its Quartz or Open GL ES instead. Could someone please clarify this for me so I can order the appropriate books? Any help would be greatly appreciated :)

As for Google I'm really getting a lot of mixed answers from the info I am finding. So far it looks like for 2D I would use Quartz and for 3D OpenGL ES.



dejo
Jul 2, 2009, 01:49 PM
iPhone does not support Cocoa but it does support Cocoa Touch. For 2D, you have your choice of Cocoa Touch, Quartz or OpenGL ES.

chrono1081
Jul 3, 2009, 01:32 AM
Thank you for the reply :)

I think Quartz is probably what I'm looking for. I couldn't find anything on Cocoa Touch about using it for making games, and Quartz looks a lot like SDL which I am used to however I noticed that with Quartz although it supports hardware acelleration your program may not be accellerated which is where Open GL ES comes in.

Kingbombs
Jul 3, 2009, 11:59 AM
well you want to look at CoreGraphics,
but quartz2D sounds best, or OpenGL ES if you have lots of moving 2D objects

mccannmarc
Jul 3, 2009, 12:22 PM
Wouldn't hurt to try cocos2d, its a library/engine implemented with OpenGL and is adequate for most 2d games, best of all its free.

chrono1081
Jul 4, 2009, 11:18 AM
Thank you for the suggestion :) I'll definitely be taking a look at it.