Cocos2d-x Book: Updated for Version 3.3

and an extra game to boot

Finally I can announce that the book has been throughly updated to versio 3.3, including source code and best practices. I also made sure all games now have an extra tutorial on how to publish it to Android.

View

Chopper Command in Cocos2d-x: The Player

and controls

Adding the player and the controls overlay should be pretty straight forward now. The only major change to the way I’ve coded the game in its previous versions will involve the player bullet, but that will come in the next tutorial. So let’s add the chopper and controls.

View

Chopper Command in Cocos2d-x: Sprites

adding our first images

Let’s add a background to the game. If you remember from the previous versions of the game, the background is formed with three sprites: the bg proper and two mountain sprites which are duplicated so we can scroll them.

View

Chopper Command in Cocos2d-x: Lua

taking it to cocos2d-x 3.2

For the Cocos2d-x version of the game, I’ll use their new IDE, called Code. It supports projects using either the JavaScript or the Lua bindings to the framework. And you can use the IDE to create new bindings, something I’ll show in a later tutorial.

View

Chopper Command: Creating the Bullet

shooting

Let’s add the player bullet and with this the final piece of the puzzle so to speak: drawing primitives with Löve. After this I’ll move to Cocos2d-x and their new IDE and Lua development flow, which is freakin’ awesome.

View