mercredi 23 janvier 2013

Cocos2D : What is it ?

As long as you create simple applications, and by simple i mean without 3D and without framerates and real-time concerns, UIKit is the framework to use. It contains a lot of components, with great APIs and a full documentation. It is very pleasant to work with it. But as soon as you want to have fun making a game, you have to start working with the appropriate framework. That's what lead us to Cocos2D.

Cocos2D is a free, open-source, community supported and easy to use, while efficient, smartphone game engine.

So yes Cocos2D is easy to use, first of all because it's written in a common powerful object-oriented language: Objective-C ! The other reason it is easy to use, it's because Cocos2D hides the entire low-level OpenGL ES code by providing high-level abstractions (Yeah !), but in the same time, it doesn't prevent you to use your own Open GL ES code.

As its name may suggests, Cocos2D focuses on helping you create 2D games. Again, it doesn't prevent you from loading and displaying 3D objects. In fact there's actually an open-source project, named cocos3D, aimed to add 3D rendering support to cocos2D. Unfortunately Cocos3D is not compatible with Cocos2D 2.0 currently because Cocos3D is using OpenGL ES 1.1 whereas Cocos2D 2.0 is based on Open GL ES 2.0.

With Cocos2D you have the possibility to choose from two physics engines that are already integrated : Box2D or Chipmunk. The main difference between them is the language they're written in : Box2D is written in C++ whereas Chipmunk is written in C (with a commercial version in Objective-C).

On this blog I will talk about Cocos2D for iPhone of course, but you should be aware that this framework has been ported for several other platforms, including Android and Windows Phone 8.

If you want to start learning about Cocos2D, I recommend you those two books:
- Learn Cocos2D 2 Game Development for iOS A very complete book that teaches Cocos2D from the very beginning to the end.
- Creating Games with Cocos2D for iPhone 2 A book teaching by the example, it presents Cocos2D by creating 9 different games.

Aucun commentaire:

Enregistrer un commentaire