In October we started on a new project for iOS. This is a much bigger project in scope than our prior mobile apps, so we wanted a better way to manage our development than what we had with Ansca’s Corona SDK. There are a number of choices available today, and a LOT of them are free and Open Source. Compare that to a closed source SDK like Corona and it was a no brainer that we would move to something else.
Yes, the Corona SDK is LUA based and therefore extensible (mostly by the community), but that doesn’t help you when you need to access a Native API that Ansca didn’t feel was important enough to provide with their SDK. The functionality that you get with Corona is pretty good for the price, but if you want to do more than what it provides you have to spend $3000 on their “Enterprise” solution and that model only works for large developers, not the indie crowd.
The Pros and Cons of using Cocos2d-x
On the plus side, Cocos2d-x is open source, c++ based, and pretty easy to learn. You can using nice development tools like Visual Studio and do most of your development on a PC and then deploy your builds from your Mac. Or, if you have a little extra time to figure it out, you can use Marmalade with Cocos2d-x and deploy your apps right from your PC. How cool is that? Cocos2d-x has online documentation, but that is both a pro and con. The class hierarchy is all laid out nicely.
On the negative side, Cocos2d-x is a framework. That means a lot of things like IAP and Social Network integration are left to the developer. There is a decent community for Cocos2d-x and sometimes people share their code, but forum questions don’t seem to be actively responded to. That is just my initial experience with the forums, so it may change as I take the time to help other developers and get some assistance in return. The negative part of the Cocos2d-x documentation is that the online Reference pretty much is nothing more than a class hierarchy. I really don’t understand this since the .h files all appear to use Doxygen style comments, so it would have been very easy to have that put into the online documentation. Instead, if you want to know what a class does, or how a method works, you have to go to the .h file and read what is there, and if that isn’t enough go to the cpp file and figure out what the method is doing.
Despite my comment in the Cons section that Cocos2d-x is just a framework, it is a pretty nice framework. In my next blog I will discuss getting started with Cocos2d-x and show how to write a simple app.