Cocos2d-x v3.10 released


If you change a few environment variables when you run cocos new it will use the prebuilt libraries automatically. For example, in my ~/.bash_profile:

export COCOS_CONSOLE_ROOT=/Applications/Cocos/Cocos2d-x/cocos2d-x-3.10/tools/cocos2d-console/bin
# Add environment variable COCOS_FRAMEWORKS for cocos2d-x
export COCOS_FRAMEWORKS=/Applications/Cocos/frameworks

# Add environment variable COCOS_X_ROOT for cocos2d-x
export COCOS_X_ROOT=/Applications/Cocos/Cocos2d-x

# Add environment variable COCOS_TEMPLATES_ROOT for cocos2d-x
export COCOS_TEMPLATES_ROOT=/Applications/Cocos/Cocos2d-x/cocos2d-x-3.10/templates


Not that I know of. .c3b and .c3t exist for a few reasons at this time.


@slackmoehrle thank you I’ll give a try!


Is physics finally useful or integrated just for fun?

Earlier versions of cocos does not have working physics, for example mass do not have any difference.


Physics is very useful, developers are using it. I used it in my simple game to learn how to use Physics.


Any sample to how to use it correctly?

Whole project, wiki is not that helpful.


Absolutely, check out cpp-tests in < cocos2d-x root >/build for examples of all the engine functionality.


Ist this bug still present? FlipY3D does not flip at center position


I am not sure, let me ping the developers and ask.


What about these warnings?

(> null): warning: Could not resolve external type _ZTSNSt3__16vectorIPN7cocos2d6SpriteENS_9allocatorIS3_EEE24__RAII_IncreaseAnnotatorE

(null): warning: Could not resolve external type _ZTSNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEE24__RAII_IncreaseAnnotatorE

(null): warning: Could not resolve external type _ZTSNSt3__16vectorIiNS_9allocatorIiEEE24__RAII_IncreaseAnnotatorE

(null): warning: Could not resolve external type _ZTSNSt3__16vectorIN7cocos2d5ValueENS_9allocatorIS2_EEE24__RAII_IncreaseAnnotatorE

(null): warning: Could not resolve external type _ZTSNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryE

How can I fix them?


I guess you need to provide more context about these errors.


That documentation site is great! If it keeps growing, the lack of documentation won’t be a Cocos2d-x problem anymore, which means more accessibility, which also means more users, support and community. And that’s great :wink:


Thank you. I am working hard to get docs in much better shape.


Any news abou this? I have checked all cocos2d-x v3 releases and the bug exists in every version.
This is really a showstopper for us…


Have a look at my answer here

Does this work for you?


Short of testing it myself, I don’t know. Download the Cocos app and try it.


does not work. all releases have this bug. really a shame!


Alright, let me ask an engineer to take a look at this.


i just upgrade my old project in 3.9 to 3.10 today,
and then got an issue on Android platform with cocos2d-js

button.addTouchEventListener(function (sender, type) {
       //code here
}, this);

error message from Android monitor

js_cocos2dx_ui_Widget_addTouchEventListener : wrong number of arguments: 2, was expecting 1


sorry that’s my mistake, i just copy “script” from wrong place,
it should copy form “cocos2d-x-3.10/cocos/scripting/js-bindings