CocosBuilder is a free tool (released under MIT-licence) for rapidly developing games and apps. CocosBuilder is built for Cocos2d’s Javascript bindings, which means that your code, animations, and interfaces will run unmodified on iPhone, Android and HTML 5. If you prefer to go native all the way, there are readers available for cocos2d-iphone and cocos2d-x.
Today, an alpha version of CocosBuilder 3.0 is released together with beta versions of cocos2d-iphone, cocos2d-x and cocos2d-html5. All these frameworks and tools work beautifully together and for the first time it is possible to write a cocos2d game that will run multi-platform on web and devices with the very same source code!
CocosBuilder is rapidly becoming more of a complete toolchain for developing, testing and publishing your games. Introduced in this version is CocosPlayer, an app you can install on your iOS device or in simulator. CocosPlayer will automatically connect through wifi to CocosBuilder and allow you to very quickly push new code and resources to the device without any recompilation.
Download the example CocosDragonJS game to see how easy it is to develop a game with CocosBuilder and Cocos2d, or just try it out directly in your browser!
Remember that CocosBuilder 3 is still in alpha, so there can be bugs and many planned features are still missing. The final version will include better Javascript editor support, a visual debugger, improved project browser, timeline sound support and much better documentation.
Getting Started
The documentation for CocosBuilder 3 and the new Javascript bindings are still a bit on the lacking side. The easiest way to get started is to view the CocosDragonJS example, get it from the download page. More examples will follow soon!
Integration between CocosBuilder interface files and Javascript works similarly to integration with Objective-C code, so if you have used CocosBuilder before you can get up to speed quickly. (If you haven’t check out the tutorial at the Zynga Engineering blog). The main difference between how Javascript and Objective-C connections work are that in Javascript a controller class will be used instead of a subclass. This means that you will need to forward callbacks for touches, accelerometer and schedulers from the node to the controller class (this will be simplified in the future). See the CocosDragonJS example on how to do this.
CocosBuilder’s built in Javascript editor is still very basic. It’s planned to add features such as proper auto complete and displaying errors inline. In the mean time, you may want to use an external editor such as Sublime.
Known bugs and issues
CocosBuilder will currently not scale images correctly on Macs with retina displays. Automatic sprite sheet generation is still very experimental.
