In Cocos Creator 3.8.5, we have made a new round of optimizations.
We have improved various aspects including loading speed, code stripping, and platform enhancements, enhancing developer experience and game performance.
We hope these improvements will help Cocos developers take their products to the next level.
I. Loading Speed Optimization
1. WASM Module Lazy Loading
In earlier versions, Cocos Creator already supported WASM module separation during packaging, allowing WASM modules to be placed in sub-packages without occupying main package size.
In version 3.8.5, we support WASM module lazy loading, which is particularly beneficial for games using WASM libraries such as Box2D, Spine, and Bullet.
Users only need to call the following API functions before using the related features to load the corresponding WASM library:
-
loadWasmModuleBox2D
-
loadWasmModuleSpine
-
loadWasmModuleBullet
-
loadWasmModulePhysics
This allows users to control when WASM modules are loaded, preventing WASM module loading from affecting initial screen loading time and significantly reducing the loading duration for players’ first game entry.
2. Code Stripping
In Cocos Creator 3.8.5, the engine internally implements multiple combined solutions to reduce the package size of 2D projects:
-
Remove unused code from the gfx layer on web platforms.
-
Support “inline enumeration” feature in engine code building.
-
Optimize Spine module package size, reducing volume by about 40% compared to v3.8.4.
-
Explicitly declare ts class constructors to avoid generating unused code.
We will continue our efforts to ensure that pure 2D projects maintain package sizes comparable to 2.x projects while minimizing 3D project sizes as much as possible.
II. CRP Pipeline Optimization
The Customizable Render Pipeline (CRP) introduced in 3.8.4 has been well-received by many developers, and we’ve received extensive feedback. In version 3.8.5, we have optimized various aspects and further enhanced the pipeline.
In 3.8.5, we have improved post-processing effects such as Depth of Field (DOF), added component-based custom post-processing support, and further optimized performance and memory usage.
CRP will continue to be optimized in terms of usability, effects, performance, and memory usage, ultimately becoming the mainstream choice for project development.
III. Platform Enhancements
1. HarmonyOS NEXT
Cocos Creator 3.8.5 provides publishing support for Huawei’s fully independent operating system, HarmonyOS NEXT. Developers can publish to the HarmonyOS NEXT platform with one click through the publishing panel.
2. Google Play
Cocos Creator 3.8.5 offers one-click publishing capability to Google Play. Compared to regular Android publishing, it has several differences and convenient features:
-
One-click activation of ADPF (Android Dynamic Performance Framework), a dynamic performance optimization framework that better improves game thermal performance and CPU performance.
-
VULKAN as the default rendering backend.
-
Configurable application icons.
IV. Editor Improvements
1. Startup Speed Optimization
In Cocos Creator 3.8.5, we have optimized the resource compilation process during startup, improving project startup speed by approximately 30%. We will continue to optimize startup speed to save developers’ project launch time.
2. Electron Upgrade
Electron has been upgraded to v31.3.1, allowing the editor to benefit from the new version of NodeJS, not only improving performance but also enabling plugin developers to use new NodeJS v20.15 APIs and features.
3. Scene Editor Selection Rule Optimization
In 3.8.5, we have optimized object selection rules in the scene editor. When multiple objects are in the same area, closer objects will be selected with priority.
4. Prefab Preview in Inspector
5. Spine Preview in Inspector
V. Important Bug Fixes
-
Node position/rotation/scale setting methods reverted to v3.8.3 behavior.
-
Fixed issue where original images were retained after auto-atlas texture compression.
-
Fixed crash when destroying nodes within Box2D Contract callback functions.
-
Fixed UI freezing issue when handling numerous hot update files.
-
Fixed unnecessary Mesh data being recorded in Prefabs.
-
Fixed transparency issues with iOS ETC compression format when compressed on Mac.
-
Fixed reduced texture fill rate in auto-atlas leading to increased UI DrawCalls.
VI. v3.8.6 Preview
The iteration of Cocos Creator v3.8.6 will continue to focus on optimizing package size and loading speed, enhancing Spine and Box2D support, and improving editor usability.
Thank you for your support and trust in Cocos Creator. Let’s create more excellent works together!