cocos2d-2.0-rc2-x-2.0.1 released

By zhangxm Posted 2012-06-29 02:40 Comments 11

Thanks to all contributors, we are glad to announce that cocos2d-rc2-x-2.0.1 is released.
You can download it here.


  • Synchronize to cocos2d-iphone v2.0 rc2.
  • Implemented CCBIReader, which supports the latest CocosBuilder, for more information please checkout tests/ExtensionsTest/CocosBuilderTest.

Big improvements

Moved all java files of cocos2d-x engine into cocos2dx/platform/android/java directory, such as
Therefor the procedure of setting up an android project is changed.
You can refer to this article How to build and run HelloWorld on Android(gles20 branch).

Add “create” functions as replacement for static constructors, because they are more friendlier to c++ programmers.For example, use CCSprite::create(CCTexture2D **pTexture) instead of CCSprite::spriteWithTexture.
All static constructors are marked as deprecated, and will be removed in the future. You can refer to ] for more detail.

OpenGL is now implemented and used for win32 instead of OpenGL ES. This will provide better stability, and makes porting games easier.
Changed boolean getter and settter to a more readable and meaningful version, for example,**getIsVisible()* is now isVisible* and similarlysetIsVisible(true)* is now **setVisible* and vice versa.
For more detail, look for “Modify some function names to make them more readable and more meaningful” in ].
h3. Bug fixes
** win32: OpenGL ES crashes is now fixed. Because OpenGL ES has problem for some types of Graphic cards in previous release version, we have now implemented OpenGL instead.
* IOS: Fix the crash that when HOME button is clicked while a background music is playing

For the full change log please refer to here


  • GogoKodo

    This change has had some bad consequences for the lua binding because of all the function overloading now taking place with everything using create(…) functions. I made a post in the lua bindings forum, but it doesn’t get much traffic, see for details:

    2012-07-04 19:43
  • nicholas_shen

    which version of cocosbuilder is supported? i tried cocosbuilder 1.1, but can not open. the “fileVersion” in .ccb file is 3.

    2012-07-10 19:29
  • nicholas_shen

    for addition infomation, i use cocos2d-x 2.0.1

    2012-07-10 19:53
  • zhangxm

    It supports the latest code the time cocos2d-x 2.0.1 released, not a released version.

    2012-07-11 01:58
  • meroon

    I think I found a small bug in CCControlButtonLoader.cpp. All the defined properties for disabled states use 3 as an index, but cocos builder uses 4 for disabled state indices. For example, PROPERTY_BACKGROUNDSPRITEFRAME_DISABLED is defined as “backgroundSpriteFrame|3”, but in cocos builder it’s defined as “backgroundSpriteFrame|4”.

    I’m assuming this is done to accomodate for an over state at some point for platforms with pointing devices.

    2012-07-11 06:45
  • zhangxm

    Thank you.
    It has been resolved in #1384.

    2012-07-11 08:40
  • neoandsun

    1.the lua engine is dirty , i think the author of it didn’t take time to design it , the dependence of the luaEngine and cocos2dx chaos! it’s odd that ccobject has an reference id to luaobject, event if i don’t want use the lua engine! besides ,the life cycle of the luaEgnine is not defined, because of the singletons designer pattern,the sequence of destruct of ccdirector and LuaEngine is unknown! when the luaEngine destruct before the CCDirector, something go wrong with the autorelease object ! because the the autorelease objects are destroyed after the CCdirector, while the CCObject still call LuaEngine in their destruction!
    2.Because of 1, the Hello Lua Engine didn’t release the LuaEgine at all[]()[]() the reason of memory leak problem is not only not destroying the LuaEngine but also some other reason, because when i revise the life cycle problem , the memory leaks problem is still there!

    I hope the author take some times to think and design the Lua Engine!

    2012-07-15 14:40
  • neoandsun

    why remove CCDirector::setDeviceOrientation, it means Orientation will not not support only more in future?

    2012-07-18 11:25
  • lth3726381

    Does Cocos2d-x will only support win32,android,ios in future? :(

    2012-07-26 13:50
  • zhangxm

    It has already supported Mac OS X now.
    We will support as many platforms as we have enough resource.

    2012-07-27 01:36
  • zhangxm

    @neo sun

    About lua engine, it is maintained by a developer.
    I think he is busy these days, i will talk to him about the issues.

    About device orientation, you should set the orientation at the begin of the app.
    There were two methods to control device orientation.
    One is done by engine(CCDirector::setDeviceOrientation), the other one is done
    by OS. Now CCDirector::setDeviceOrientation is removed in cocos2d-iphone.
    So you can also use the method done by OS.

    More detail information please refer to About device orientation.

    2012-07-27 01:48

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.