[RELEASE] Cocos2d-x 3.8 FINAL, please enjoy ~

Hello everyone.
I’m starting now and I wonder if the current Programmers Guide that is cocos2d-x 3.7 has full compatibility with 3.8?
I tried to follow some tutorials I’ve found and were in version 3.3 and nothing worked in 3.8, always gave error when it was compiling.

I am looking at this today.

Hi, I’m using cocos console

I replaced “python ${ProjDirPath}/build_native.py -b release” with “cocos compile -s ${APP_ROOT} -p android -o ${APP_ROOT}/bin -m release

The Result is the same as in my previous post.

For all external Libs, I get the message: Android platform not specified, searching a default one…

then

Building apk…
Please input the absolute/relative path of ‘.keystore’ file:
File “/Users/UserName/Android/Cocos2dv3/cocos2d-x-3.8/tools/cocos2d-console/plugins/project_compile/project_compile.py”, line 536, in build_android
self.apk_path = builder.do_build_apk(build_mode, self._no_apk, output_dir, self._custom_step_args, self)
File “/Users/UserName/Android/Cocos2dv3/cocos2d-x-3.8/tools/cocos2d-console/plugins/project_compile/build_android.py”, line 538, in do_build_apk
self._gather_sign_info()
File “/Users/UserName/Android/Cocos2dv3/cocos2d-x-3.8/tools/cocos2d-console/plugins/project_compile/build_android.py”, line 573, in _gather_sign_info
inputed = self._get_user_input(MultiLanguage.get_string(‘COMPILE_TIP_INPUT_KEYSTORE’))
File “/Users/UserName/Android/Cocos2dv3/cocos2d-x-3.8/tools/cocos2d-console/plugins/project_compile/build_android.py”, line 606, in _get_user_input
ret = raw_input()
EOFError: EOF when reading a line

Then when i try to run the App I get Java Runtime Errors

Only C++ is implemented at the moment.

so there is no way to install cocos2d-x 3.8 in windows?or work in it?

Did you fix this bug?

New release looks great!

But I’m noticing that my scrollview (subclassed) with buttons on it no longer works, upgrading from 3.7.1 final.
Buttons swallow all input because the scrollview fails hitTest on onTouchBegan (with null camera), returning false where it used to return true. Touch events then aren’t propagated in the way they used to be.
Haven’t explored completely, but for my game it’s a breaking change and now I’m confused trying to work around it.

I’ve noticed something’s up with touch events too, especially around the ListView. I have a case where I have a set of buttons in a ListView and every other touch is received by the ListView first instead of a button. So you have to double tap to trigger buttons. Anyone else seen this?

It may be related to my double touch events received by listeners if more than one camera active. I posted fix for our need on github and I think my previous reply.

@almax27 @Jgod Thanks for reporting this bug, we are investigating it, please stay tuned.

@stevetranby Where can we find your fix ?

What about support of blur for Label shadow? Would it be implemented in new version?

What about this problem? This isn’t solved entirely. It just happened after displaying a vungle video ad.

After 2 Days my Feedback is… switching from older Versions to v3.7-v3.8 is not possible for Android Projects… especially when you use 3rd party libraries like Facebook, GooglePlayServices etc.

I red for hours about Messages like “Using Eclipse project : Android platform not specified, searching a default one…”,
"EOFError: EOF when reading a line"or other random warnings… No help found!

That’s really disappointing. We switched back to older cocos2dx Version… for future projects I think we have to try other (more stable) Game-Engines.

again, not sure if related. It also may not be a correct fix, but we’ve found our touch handling is back to “normal” after we changed our code as I mention in the issue

How do we set aliasing on Labels?

I used to do my_label->getTexture()->setAliasTexParams(), but that no longer works because Label no longer inherits from SpriteBatchNode.

edit:

Setting content size on Button’s no longer resizes them like it used to, though I’m not sure it was desired behaviour at all anyway. I used to resize the Button’s content size based on the Label inside:

auto resize_btn = [](ui::Button* button) {
    auto lbl_size = button->getTitleRenderer()->getContentSize();

    button->setContentSize(
        Size(
            lbl_size.width * 1.5f,
            lbl_size.height * 1.5f
        )
    );

};

but that doesn’t do the trick anymore. Setting Dimensions on the button’s label displaces the label, but leaves the buttons’s sprite the same size.

What can I do to achieve the same effect?

Noob question here : I have an HTML5 / JS project I started with Cocos 3.6. How do I upgrade it to Cocos 3.8 ?

  • Do I have to start a new project and copy my old project’s files to the new one ?
  • Or is there a way to directly upgrade the project?

lol, the same thing I read on UE and unity forums. Everyone wants a stable bug-free game engine, but alas, it’s impossible. I’m sticking with 3.6 and waiting fixes for 3.8.

Or code your own. If things are buggy then, you know exactly whom to blame :wink:

1 Like

Really sorry for the inconvenience, the thing is that we can’t reproduce your problem, as you mentioned 3rd party libraries, I think maybe it’s related.

When you encounter this kind of problem, please give us exact steps to reproduce so that we can investigate, otherwise it’s really hard to do more help.

@almax27 @Jgod @stevetranby

Hi, a brief summary about Camera and Event dispatching:

For now, we do dispatch events to all node for each camera, and in event handling you can check wether the camera mask match and then handle it. like the following PR: https://github.com/cocos2d/cocos2d-x/pull/13557

The current implementation of event dispatcher:

  1. Event dispatcher loop all camera to dispatch the event
  2. Each camera loop all node to dispatch the event

We are doing this because of multiple cameras. For example, when two cameras exist, and look at totally different directions, but they are all shown in the game viewport, in this case, we do need to dispatch events separately for different cameras. As our event dispatcher don’t have logic for event capturing and hit test, it simply dispatch events to all event listeners, so your problems are happening.

We are considering another solution and will discuss this problem this afternoon :

  1. Event dispatcher loop all camera to dispatch the event
  2. Each camera loop all node and dispatch the event to the nodes which have the same camera mask

EDIT: we are going to do as I suggested above.

1 Like