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


#21

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


#22

OK, wait for me.


#23

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


#24

The project I have already sent to you by email.


#25

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


#26

On, sorry. I forgot something.


#27

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


#28

你的邮箱是多少


#29

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


#30

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.


#31

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.


#32

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


#33

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


#34

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


#35

对,小米6


#36

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


#37

据说Defold的3D还在优化中


#38

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.


#39

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.


#40

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?