22

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?

13 Answers 13

26

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!

2
  • With so many people recommending it it should be worth a try
    – Dimitris
    Aug 18, 2009 at 16:32
  • you can also try cocos2d-x it's just a C++ port of cocos2d and has every class objective C and coco2d-iphone have, if you use that you can also compile your code for windows and android.
    – Ali1S232
    Apr 1, 2011 at 21:07
6

Try cocos2d:

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

5

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

5

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

3

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

1

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.

1

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

1

It's worth mentioning at this point that Unity3D now supports 2D better than before in workflow and optimizations so it's worth being in the list.

http://unity3d.com/

0

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.

0

Cocos2d is really good.

0

Ok, it's true the Cocos-2d is the more powerful, but I have used Sparrow http://gamua.com/sparrow/. It has a smooth learning curve, and you can develop a game within days!. It integrates with other important frameworks, like Box2d (http://www.codeandweb.com/blog/2012/05/07/physicseditor-sparrow-box2d).

Regards.

0

SpriteKit is among the better solutions now that iOS 7 is out. Keep in mind that it is exclusive to iOS 7.

-5

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.

4
  • That's not true about cocos2d-iphone is it?
    – Dimitris
    Jul 29, 2009 at 17:03
  • cocos2d-iphone has been used in many apps on the AppStore, even paid ones see code.google.com/p/cocos2d-iphone/wiki/GamesUsingCocos2d
    – epatel
    Jul 29, 2009 at 17:53
  • 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. Jul 29, 2009 at 18:18
  • well, not a good comment. that happens also to apps written all in object-c with just apple frameworks in it. It all depends on how they are written (and sometimes on the contents)
    – meronix
    Jan 28, 2011 at 9:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.