Jun 20 2012

AndEngine – CocosBuilderExtension

Category: AndEngine,AndEngineCocosBuilderExtension,cocos2d,CocosBuilderNicolas Gramlich @ 06:22

Hello Community,

CocosBuilder is an excellent WYSIWYG (What You See Is What You Get) user interface builder developed by Viktor Lidholt here in Zynga.

CocosBuilder Screenshot

CocosBuilder Screenshot

It’s built around cocos2d-iphone and also uses that for its own live preview rendering. CocosBuilder is heavily plugin based, so that as a developer can add a custom exporter into any format you like (i.e. I created the CCBXAndEngineXML export into a custom “CCBAEX” format). One can also add custom CCNodes that actually render in CocosBuilder itself! These two features alone make it super flexible, with a lot of new stuff to come in the future!

Since cocos2d and AndEngine are similar enough, I could map almost all CCNodes to an AndEngine “Entity” equivalent (or created new nodes, i.e. ClipEntity)

Given that one can write an exporter to a custom format, one can also obviously write an importer for another engine, i.e. AndEngine, all which is what I did a few weeks ago:

Having this exporter, one can store almost the whole user interface in data rather than in code making porting incredibly much easier and in general more flexible and maintainable (imagine loading different CocosBuilder exports, depending on the type of the device, etc…)!

I hope this is efforts are useful to some of you. :-)

Best Regards,
Nicolas