Game runs very slow on PC and Android (DEF-3006) (SOLVED)

Daily tip for all non-Mandarin speaking people: If you use Chrome, you can right-click any page and select “Translate” to follow along in discussions in other languages.

Tip courtesy of @sven

5 Likes

OK, wait for me.

1 Like

It’s a good idea, but please note “卡” means stuck,slow running, not “card”.

2 Likes

The project I have already sent to you by email.

I’m unable to run it. The project is missing a bunch of files:

On, sorry. I forgot something.

也发我一份,我也帮你测测

你的邮箱是多少

support@cocosgames.com
点我头像就能看见。

Thanks. Got a new version. All looks good when running on desktop (OSX 10.13.6)

A lot slower on mobile (three year old Android device):

Let me dig in a bit and try to figure out why.

Of course, It’s normal on Windows and OS X, but this is not the key point. Mainly run on Android and IOS, my test is 110ms per frame on Android. And, I found one thing that is the profile data is different between the web profiler and visual profiler. Maybe use visual profiler will be more accurate. install the apk on mobile.

Yes, I get that. And I had like ~50ms per frame on Android so I’ll:

2 Likes

在我手机上40帧左右,主要是drawcall太高。没做过3d,是不是3d更耗费资源。

你安装了APK吗?什么手机?是直接运行看那个visual profiler吗?

对,小米6

那你的手机可能比较新一点,我的测试机110ms一帧。像这么点3D模型,按理说引擎渲染是不成问题的。

据说Defold的3D还在优化中

Folks, you are very welcome on the forums and in the community. But it helps a lot when we don’t need to google-translate the thread in order to figure out how to help you. Because the translation is often inaccurate and also because the translation takes extra time that we’d rather use to help you all here.

6 Likes

Ok, me and Sven took a look and from what we can tell the engine spends a whole lot of time updating the transform of model vertices (done on the CPU). The small Mahjong tiles are really complex (~500 positions and ~2900 normals). You should be able to simplify these dramatically without much visual impact on mobile.

4 Likes

Try swapping the higher poly model with a simple cube to confirm?

I think one of the future 3D optimizations mentioned previously would benefit this kind of situation with many duplicate objects with the same model?