Frogger in Lua
with moai and shilke2d
Remember the Frogger series of tutorials where the same code was translated to different Frameworks? Well, there is a new version to be added to the list, this time courtesy of Luca Ferrara, and it’s a Lua version.
Cocos2d HTML5: The Syntax
c++ and javascript
The syntax differences between Cocos2d-x (C++) and Cocos2d HTML5 (JavaScript) are surprisingly small. In fact you could do away with most of them by using Find and Replace: just look for the CC prefix and replace it with cc. (that is “cc” and a dot).
Cocos2d HTML5: Project Setup
web and native versions
Setting up a Cocos2d HTML5 project is a remarkably easy process and here I’ll show you how to do it both for the web and the native versions. But first you will need to download the Cocos2d HTML5 framework, and a matching Cocos2d-x framework. I used version 2.1.1. It’s much easier to develop both web and native versions if the frameworks match. And even easier with this 2.1.1 version.
Moon Herder: in Cocos2d HTML5
the last port!
So finally, we arrive at the last port of the game. As a recap, this was a Flash game, which I then expanded and ported to Objective-C with Cocos2D, then C++ with Cocos2d-x. And now I ported it to HTML5 with Cocos2d HTML5, made it run in a browser and republish it inside Cocos2d-x with the framework’s JavaScript bindings.
MoonHerder: the line hack
in cocos2d, cocos2d-x and libgdx
There is a tiny bit of an issue when drawing curved lines in OpenGL, because of the way the line “caps” are drawn. Of course the issue is only an issue if you want thick lines and don’t want to texture them properly (with triangle fanned vertices.) But there is a quick solution to that.

