cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
7.17k stars 1.83k forks source link

[3.8.2] On the iOS platform, the performance of the box2d module is lower than that of version 2.4.x #16822

Closed zhefengzhang closed 1 week ago

zhefengzhang commented 6 months ago

Cocos Creator version

3.8.2

System information

iOS

Issue description

Test result in 2.4.11 image

Test result in 3.8.2 no open box2d-wasm image

Test result in 3.8.2 open box2d-wasm image

Relevant error log output

No response

Steps to reproduce

-

Minimal reproduction project

TestPhysic2411.zip

TestPhysic382.zip

zhefengzhang commented 6 months ago

Supplementary test on performance differences on the Android platform 补充测试 android 平台上的性能差异

Test result in 2.4.11 Android https://download.cocos.org/CocosTechnicalSupport/EngineIssues/16822/2.4.11-2D%E7%89%A9%E7%90%86.mp4

Test result in 3.8.2 Android https://download.cocos.org/CocosTechnicalSupport/EngineIssues/16822/3.8.2-2D%E7%89%A9%E7%90%86.mp4

Test result in 3.8.2 Android open wasm https://download.cocos.org/CocosTechnicalSupport/EngineIssues/16822/3.8.2-2D%E7%89%A9%E7%90%86wasm.mp4

Test results: CocosCreator 3.8.2 exhibits lower performance than CocosCreator 2.4.11 on the Android platform, with CocosCreator 3.8.2 sustaining a low frame rate for extended periods. Both versions use box2d.js by default. However, when enabling box2d wasm in CocosCreator 3.8.2, its performance becomes superior to that of 2.4.11. 测试结果:Android 平台上 CocosCreator 3.8.2 比 CocosCreator 2.4.11 性能更低,CocosCreator 3.8.2 会长时间处在较低的帧率。两者默认都使用 box2d.js 。而在 CocosCreator 3.8.2 版本开启 box2d wasm 之后,性能会变得比 2.4.11 更好。

zhefengzhang commented 6 months ago

@minggo @dumganhar

zhefengzhang commented 1 week ago

Performance has been optimized by using box2d-c++ 已经通过使用 box2d-c++ 优化性能