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

Could be.
Damn. I already changed all my labels to BMFonts by now.
I had this happening a couple of weeks ago (I think it was in 3.7) because of an incoming call, so I just assumed this to be the same issue and didn’t investigate further.
But thanks for pointing out that the callback is in a different thread, never thought about it. Is there a simple way to communicate back to the main thread? Is calling scheduleOnce threadsafe?

You can use Scheduler::performFunctionInCocosThread

1 Like

I used UE4 for almost a year. You can look for some of my posts in UE forums, same nickname.
You will see there are nasty bugs, undocumented features (specially for android). Performance is ridicously bad. Also, APK size minimum is 30MB (or something like that).

I can reckon of some bugs:

  • crashes with particular android versions if google play services (or any other GL surface is used). Nobody fixed this ever
  • APK+OBB distribution stopped working in some version (I think it was 4.7). It did not worked either in the next version, I guess it should work now because it is a BIG showstopper. I had to stop my development because any game you make with UE4 will be huge (the engine payload is BIG). That means like 30+ MB as minimum APK size, so if you can not split your app in APK+OBB google play will not accept it.
  • performance was ridicously bad I would recommend against using UE4 for mobile, at least android if you want to support some old devices. A simple 2D game did take forever to start and, trust me, I did optimize anything I could. Same game with way less optimizations starts in like 1second using cocos2d-x (UE was taking 30+ seconds) and runs 2x faster in 2 years older mobile (SGS1 vs SGS3)
  • no splashscreen support. It is funny to wait these 30+ seconds to start a game with a blackscreen.

You can look answerhub also, you will see some of the issues I raised almost a year ago are still unsolved. Is funny I get some mails after 10 months asking me specifics of my issues.

Ahh! good luck updating a version in UE4. Sure, you can get lucky and everything will work … or not, and then you can not even get back if not saved your blueprint scripts, because blueprint scripting is not backwards compatible.

This post is not for blaming UE4. This post is for bringing some reality check: no engine is free of bugs and if you work a lot with an engine you will hate it more than others because you will likely find a lot of bugs. I have not experience with Unity but my guess is that it will be even worse than with UE4 because it is closed-source (at least using UE4 I could fix myself several unattended bugs).

Being totally honest (I do not earn anything with cocos2d-x, either UE4) I would choose cocos2d-x any day for 2D mobile games. If my project was big enough (lot of people and some technical artist / game designers without programming skills) and this project would not care about old mobile devices (old I mean only 1/2 years ago) It could be a point for using UE4 or Unity. Right now I would choose Unity for mobile but because as you are a bit burned with cocos2d-x I got burned with UE4.

Last word:
I made a non-released project with UE4, it took like 7 months (only work me and my girlfriend, she draws I program). I had to stop the development due the bugs I told you. Same project I was able to make a port in only a couple of weeks using cocos2d-x. I have already released 2 games with cocos2d-x, I needed 1 month and 2 weeks for doing such games. My games are quite simple (i’m just a hobbist) and UE4 was really bad for developing simple 2d games.

I think UE4 is way superior for desktop games and consoles, which is its real target.

1 Like

Hi Team,

Great work again!

Wanted to check one thing. Can we Zoom the Camera wherever it is looking into?

I mean in the CPP-tests (Camera 3D Test), if we rotate the camera & then zoom, it always zooms at the normalized position. Instead, can we do the zoom wherever the camera is looking at(After rotate)?

can you create a thread and point out outdated examples in “Official Programmers guide” i might be able to contribute with updated code Thanks and regards

Can you be more specific as to what you are seeing that is out dated?

If you want to submit PR’s the repo is here: https://github.com/chukong/programmers-guide

A thread here would not be productive as then the issues are not in GitHub to work on.

for a quick fix, wrap your code around with this

cocos2d::Director::getInstance()->getScheduler()->performFunctionInCocosThread([=](){
}
1 Like

Just thought I’d chime in as well to confirm that @Dredok is correct.

We have been using Unity for our first desktop game (still use cocos2d-x for our mobile games) and we are “stuck” on 4.6 still, and probably will be until the new year. There are plenty of headaches and bugs to deal with and aspects of the engine we have to work around or solve a problem in a different way.

As mentioned UE4 is a vastly superior 3D desktop/console game engine, and Unity3D is no different (though supposedly porting to mobile is easier). Unity is visually not a good as UE4.9, but it’s good enough for most 3D or psuedo-3D games.

A game engine is a tool. Use the right tool for the right job. If you don’t know what the right tool is then try them all out and find out for yourself.

We’ve modified the cocos2d-x source a decent amount over the last 4 years and we’re glad to be able to do this, like with UE4 (though cocos2d-x is simpler to work with). The only real headache was porting from 2.x to 3.x, but nothing some automated scripts couldn’t handle.

Thankfully we get to continually remove more and more of this code as it’s fixed or added into the latest, or because hooks and integration points are added to make it possible for us to bring the code out of the engine and into our game project.

Anyway, I don’t have a point other than to agree that all engines have their issues. Often it’s the tools around the engine that make it worth while. Unity’s editor is fantastic for what it is supposed to be, etc.

How do we set aliasing on Labels?
–You should set aliasing on Label like below:

label->getFontAtlas()->setAliasTexParameters()

Thanks!

For ui::Text it works like this then too:

    Label* lbl = (Label*)txt->getVirtualRenderer();
    lbl->getFontAtlas()->setAliasTexParameters();

Btw why cocos2d-x 3.8 showing that it is 3.7 version in cocos2d.h file. Someone forgotten to change before final commit or some issue only on my side?)

Hi all, I’m new here so I saw 3.8 released.
So I download cocos2dx in here: http://cocos2d-x.org/filecenter/jsbuilder/?ver=v3.8
and I found a organization version https://github.com/cocos2d/cocos2d-html5

So I want to ask which branch is equally to new release a master or a develop one ?
thank all

nice work thanks!!

uhm… is it only me or I did something wrong?
At first I could generate win8.1 universal project and win10 project.
But now I can’t.

I use cocos new -p TestBox2D -l cpp TestBox2D.

are you using the pre-built libraries, by chance?

ups. you’re right.
After I installed cocos with framework.
It changed.

Now fixed.
I deleted the path of cocos framework and change it to default.
Thank you, @slackmoehrle.

I’m usng cocos2d 3.7, all builds fine. After downloading in Cocos app framework 3.8.1 I got this error:

Also, same for 3.8. But with 3.7 all works fine. Please fix.

Hello…

I have not found ScrollViewBar classes for JS version. So is that feature JS ready?

Add iconv.framework to your project and this is fixed.

1 Like

Thank you.