Monday, October 29, 2012

Exp with Cocos2d-x

Finally i've started working with cocos2d-x for game dev. It has proved to be really handy for getting prototypes done really fast. I hated the autopointer based implementation at first but have gradually gotten used to it. The one problem i do see is that the constant creation and deletion of objects could lead to a reduced performance. I would recommend anybody to stay away from the autopointer based approach right from the start if you are performance cautious, because re-organizing the code can be a pain.

The cocos2d-x is a really good choice if you want to go multiplatform with the game as well. The best part (in my opinion) is that you dont' have to deal with the java code for the most part, you get access to OpenGL ES so basically you can develop pretty much any game and still have the benefits of scene management and animation for things that you dont' want to care about.

There is an demo of getting 3D models rendered in cocos2D-x using the projective transformation and a little Matrix math help from the internal math library in cocos2D-x. I really hope the development of this library continues at the same pace. It's just awesome to be able to write code in c++ and still deploy on all the relevant platforms.