cocos2d-x v3.0-beta2 available for download

Hi,
We are happy to announce that cocos2d-x v3.0-beta2 is available for download:

Highlights

  • Performance improvements in the renderer (from 20% to 100% depending on the game).
  • Added support for creating AutoReleasePool in stack

Full Changelog

Read the complete changelog

Release Notes

Read more about all the new features at cocos2d-x v3.0 release notes

We would greatly appreciate if you can test this version and report any kind of bug and/or issue that you might find.

Thank you!

I replace beta0 with beta2. it work fine on ios,but it can’t compile on ndk,

The error is:
error: undefined reference to ‘cocos2d::Node::_setZOrder(int)’

On Windows 7 the first beta was OK, but with this new version, although the debug build of TestCPP with Visual Studio 2012 Update 4 works without problem, the release build of TestCPP doesn’t work:

Error	1	error C3130: Error interno del compilador: error al escribir bloque de código insertado en PDB (..\Classes\Box2DTestBed\Test.cpp)	C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0	605	1	TestCpp
Error	2	error C3130: Error interno del compilador: error al escribir bloque de código insertado en PDB (..\Classes\Box2DTestBed\TestEntries.cpp)	C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0	605	1	TestCpp
Error	3	error C3130: Error interno del compilador: error al escribir bloque de código insertado en PDB (..\Classes\MutiTouchTest\MutiTouchTest.cpp)	C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\tuple	521	1	TestCpp

@lefei

What NDK are you using ?
r9c is working OK for me.

@chano:
Thanks for the report.

I got the same error as below, my ndk version is r9b. Except the part mentioned, those are the part below the _setZOrder

function vtable for HelloWorldScene: error: undefined reference to 'cocos2d::Node::setLocalZOrder(int)'
/Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android/../cocos2d/cocos/gui/UIWidget.cpp:145: error: undefined reference to 'cocos2d::nodeComparisonLess(cocos2d::Node*, cocos2d::Node*)'
/Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android/../cocos2d/cocos/2d/CCSprite.cpp:848: error: undefined reference to 'cocos2d::nodeComparisonLess(cocos2d::Node*, cocos2d::Node*)'
/Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android/../cocos2d/cocos/2d/CCSpriteBatchNode.cpp:257: error: undefined reference to 'cocos2d::nodeComparisonLess(cocos2d::Node*, cocos2d::Node*)'
/Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android/../cocos2d/cocos/2d/CCNode.cpp:139: error: undefined reference to 'cocos2d::Director::getActionManager() const'
/Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android/../cocos2d/cocos/2d/CCNode.cpp:141: error: undefined reference to 'cocos2d::Director::getScheduler() const'
/Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android/../cocos2d/cocos/2d/CCNode.cpp:143: error: undefined reference to 'cocos2d::Director::getEventDispatcher() const'
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1
Traceback (most recent call last):
  File "/Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android/build_native.py", line 147, in 
    build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
  File "/Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android/build_native.py", line 134, in build
    do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
  File "/Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android/build_native.py", line 70, in do_build
    raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /Users/Dummy/Development/HelloWorld_v3/HelloWorld/proj.android ] fails!

Finally I fixed the issue. The problem is that I have only replaced the cocos folder inside as this is minor version update.
My solution is to create a new project and replace proj.android as well to figure out the reason
And the next step is to reimport the project, if you are the one not using libcocos2dx.jar but import the project into eclipse
Make sure you have to remove the android builder configuration pointing to the jar as well

But I have caught another issue in Android that I picked up this message in LogCat
Tag NativeActivity
channel ‘41bd7748
/org.cocos2dx.cpp.Cocos2dxActivity (client)’ ~ Failed to receive dispatch signal. status=-11
The behaviour is happened when I pressed a Button (I am using gui::Button)

And one more issue is that I call this->removeFromParent in Android will crash…
This also happened in 3.0 beta0

May I ask if there is quick (dirty) way to upgrade my beta project to beta2 project?
Do we need to rebuild from a new one? Thanks

@winipcfg.exe

you have 2 options:

a)
create a new project, and re-add all your source files / assets to the newly created project.

b)
remove the cocos directory from your project, and copy the new files there.

I do option b, and it works. Thanks. :slight_smile:

Just a reminder that the android build script has added something, please be reminded to check

Wp8 please… :frowning:

psycohk - wrote:

Just a reminder that the android build script has added something, please be reminded to check

Found an issue when we use the new build_native.py. The following message is displayed and stopped

Can’t know cpuinfo, use default 1 cpu

Our system is windows 7 64 bit. We work on old build_native.py at this moment.

project can’t be built in eclipse running on win7, execute build_native.py will cause error:
make: ***访问拒绝
. Stop.
make: ***Waiting for unfinished jobs…

winipcfg exe wrote:

psycohk - wrote:

Just a reminder that the android build script has added something, please be reminded to check

Found an issue when we use the new build_native.py. The following message is displayed and stopped
[…]

Our system is windows 7 64 bit. We work on old build_native.py at this moment.

Are you using python 3? If you are using python 3, you need to modify each print 'xxx' to print('xxx')

Hi, I’m new with cocos2d-x 3.0 beta2 and encounter a problem in android.

I use create_project.py then build_native.py as instruction in readme text, everything is fine

but when using emulator and logcat return error “Unable to find native library:

cocos2dcpp" as image file attached.

My enviroment is :

  • eclipse
  • ndk-r9c
  • python2.7

I had searched many threads in this forum and applied but not effected @_@

Can anyone help me to solve this problem by detail instruction, image or video much better? Many thanks

Is Physics part finished in 3.0beta2 ?
How can i get Impulse of Contact ?

when I use Qt to import cocos2d-x3.0 bate2 project it is running well,
but when i use GUIReader my project crush compile error.

this pic will tell you the problem which I meet

Error: cocos2d: removeAction: Target not found

I got it constantly after instantiation and playing first animation in UI element, created in Cocostudio UI editor.

It is very simple UI with 3 images, one image has animated position and alpha.

withing
void ActionManager::removeAction(Action *action)
{
there are HASH_FIND_PTR(_targets, &target, element);

but _targets is nullptr.
Animation is displayed correctly, but error appear each 2 seconds.

I use this code to create Widget and play animation

widjet = cocostudio::GUIReader::getInstance()->widgetFromJsonFile(“fan.json”);
ret->retain();

current_animation = cocostudio::ActionManagerEx::getInstance()->getActionByName(“fan.json”, “idle”);
current_animation->play();

Please advice.

PS: I can’t understand, am I right to call animation through ActionManageEr. It seems I may have only ONE widget instance for each JSON file, because instance is binded within AnimationManager to it’s filename.

I’ve got some issues on win32. I created a new project, changed the helloworld demo so that it has 4 sprites, one player, and 3 background images. I have one update method, which will update the background and the player. There is nothing complicated in my code, nothing that should drop the fps, but still it does.

It starts at 60 fps, then randomly drops to around 30. Then, if I move the window containing the game, it goes to 60 fps and after that it drops again to 30. I created a release version, so the visual studio debugger doesn’t affect performance. See the video attached.

Does anyone know if this is a bug, or if I have to change some setting I don’t know of? (the fps is set to 60)