cocos2d-2.0-rc2-x-2.0.1 released

Added by Minggo Zhang 11 months ago

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

Features

  • 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 Cocos2dxBitmap.java.
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(CCTexture2D *pTexture).
All static constructors are marked as deprecated, and will be removed in the future. You can refer to About static contructor API changes in cocos2d-x 2.0 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 similarly setIsVisible(true) is now setVisible(true) and vice versa.
For more detail, look for "Modify some function names to make them more readable and more meaningful " in Cocos2d-x v20 migration guide.

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


Comments

Added by T Mok 11 months ago

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: http://cocos2d-x.org/boards/11/topics/12729

Added by Jiye Shen 10 months ago

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

Added by Jiye Shen 10 months ago

for addition infomation, i use cocos2d-x 2.0.1

Added by Minggo Zhang 10 months ago

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

Added by Cam Warnock 10 months ago

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.

Added by Minggo Zhang 10 months ago

Thank you.
It has been resolved in #1384.

Added by neo sun 10 months ago

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!!!!!, so that the demo got a serious memory leak problem! 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!

Added by neo sun 10 months ago

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

Added by th long 10 months ago

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

Added by Minggo Zhang 10 months ago

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

Added by Minggo Zhang 10 months ago

@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.