views:

3529

answers:

10

Which framework do you suggest for building a 2D platform game for the iPhone? I only need to move assets around the screen and detect collisions etc.

I would think OpenGL. But maybe Quartz 2D is enough? Or is there something else I should be aware of? What are advantages and disadvantages of each? I guess there is a longer learning curve for OpenGL, but that pays off in performance, right?

+4  A: 

Try cocos2d:

cocos2d is a framework for building 2D games, demos, and other graphical/interactive applications.

Anton Gogolev
+4  A: 

Have a look at cocos2d-iphone. I have heard only good things about it.

epatel
+4  A: 

cocos2d-iphone is pretty good. I have written some extensions to it which you can read about here and get here. Good luck!

Jonathan Sterling
A: 

I think you might have two different answers depending on if you want to publish your game in the AppStore. If so, you have to use the provided/accepted frameworks or it won't be accepted. If not, then you are (of course) free to use anything.

ongle
That's not true about cocos2d-iphone is it?
Dimitris
cocos2d-iphone has been used in many apps on the AppStore, even paid ones see http://code.google.com/p/cocos2d-iphone/wiki/GamesUsingCocos2d
epatel
I'm not saying that cocos2d isn't allowed in the appstore, I was just bringing up the point that the "best" frameworks are sometimes not allowed in appstore applications. It is something to be kept in mind if you are bringing in frameworks for an appstore application.
ongle
A: 

There are usually two schools of thoughts here when it comes to included iPhone frameworks:

  • go with Quartz 2D. If performance is not good enough, try Open GL. (for my 2D game, I'm following this path)
  • go for Open GL directly.

I haven't tried cocos2d, but that sounds like a great alternative to harness Open GL without having to deal with API.

Rudi
A: 

I thought OpenGL was very easy for 2D. I think it's easier to deal with a well-known API than to try to grok someone's layer on top of it.

Nosredna
+1  A: 

Unity3D is not so much a framework as an engine, but 2D can be done (well) with it. Zombieville USA is Unity/2D (http://www.zombievilleusa.com/)

http://unity3d.com

Ben Throop
+10  A: 

I am currently using and recommend Cocos2d. (http://cocos2d-iphone.org)

The documentation for cocos2d-iphone is pretty good and getting better all the time. There are some full working example games you can download and the API itself comes with quite a number of examples you can use.

Here is a good set of install directions you can use to get started:

http://permadi.com/blog/?p=130

Hope this helps!

Brian Teeter
With so many people recommending it it should be worth a try
Dimitris
A: 

You may want to check out Sparrow at http://www.sparrow-framework.org. It is lightweight and very similar to the Flash API.

Andrew
A: 

Cocos2d is really good.

zooropa