Wednesday, July 15, 2015

Should I create an Android Cocos2d-x tutorial?

The adventure of getting my Color Crash game to Android continues.

I have settled into using Cocos2d-x for the Android version of the game. I considered Corona SDK and Sprite4Droid, but in the end neither would fulfill my needs. I just figure as I get into my next game which will be much more complex I can't afford to have it running in a scripting language. I just don't want to get deep into the project and find the platform to not have the performance, so Corona is out.

I started working on a game using Cocos2d a couple of years ago. I don't think it had physics tied into it back then. It now has Box2D or Chipmunk for the physics and it is now in C++ instead of Objective-C.

Apple's SpriteKit is so much nicer than cocos2d and while Corona seemed more elegant than cocos2d SpriteKit still is the best documented and most elegant solution. Also it just seems that Apple's physics world feels more realistic. Sprite4Droid really would be a cool solution giving me the Apple interfaces even though it would be using Box2D underneath and so have that same feel that I don't like in cocos2d. But I got too frustrated with trying to get it working.

The conversion to cocos2d and C++ is going to be much more difficult than converting to Objective-C was. I have never been a fan of C++ but I guess I can live with that. However in SpriteKit I can get a set of objects that are in contact with an object which works really well for my game. From what I can see I will have to monitor collisions for cocos2d to work. I initially did that with SpriteKit but switching to just requesting the objects in contact made the code simpler and just worked better.

One of the things that will make this more difficult is the documentation for cocos2d. A lot of the APIs really don't have much documentation beyond giving you the names of the APIs. I found a few helpful tutorials, but it seems that there is a lot of room for more tutorials on how to do things.

So now I need to decided, do I make a tutorial out of my game? 

No comments:

Post a Comment


My Bicycle Store