Cocos Creator v2.2.0 is released!
We strive to make your games work well on each platform. The Cocos Creator v2.2 update is the first time Cocos Creator has surpassed Cocos2d-lua in native speeds, while also significantly improving native performance! Cocos Creator v2.2 includes a number of enhancements and experience improvements, and developers of all versions are encouraged to upgrade.
Greatly improve native platform rendering performance
In this version, we have significantly upgraded the rendering engine and achieved
tremendous performance improvements on native platforms, surpassing the speeds
of all previous versions of Cocos Creator, Cocos2d-js and Cocos2d-x.
Cocos Creator v2.2 can meet all the performance needs of every game, small to
large, simple to complex, few gaphics to 1,000’s of graphics. To help gauge performance,
low-end devices, such as the OPPO A57 and the iPhone 6S+ were used. We also
compared previous versions of Cocos Creator, Cocos2d-js, Cocos2d-x
and Cocos2d-lua to ensure we were testing in a broad spectrum, to provide the
most accurate data. The results:
On Android native, the performance of Cocos Creator v2.2.0 is 1.5x - 1.7x
Cocos2d-lua and Cocos Creator v1.9.3.
On iOS native, the performance of Cocos Creator v2.2.0 is flush with
Cocos2d-lua, which is 3x - 4x Cocos Creator v1.9.3.
In addition, Cocos Creator v2.2.0 running on iOS not only improves the frame
rate, but also greatly reduces any possibility of jittering when garbage collection
occurs. This means the actual game play experience will be really smooth. Here is
detailed performance data:
Support 3D model rendering batch
Cocos Creator v2.2.0 adds support for rendering batches of 3D models, which
effectively reduces the drawcalls for 3D games. To enable this feature, you
simply check the
enableAutoBatch attribute on the Mesh Renderer and the engine
will automatically batch based on the material used, as well as the Mesh vertex
format and Primitive Type. For better optimization, it is recommended that you
enable this option only for models that can be batched and have a small number
Support for alpha channel separation of PVR compressed textures
Alpha channel separation format (RGB+A) for PVR compressed textures has been
added. This format uses a similar method to etc. to separate and compress the
transparent channel of the texture. After compression, the texture height will
be twice that of the original image, thus avoiding the problem of low image quality
in the conventional PVR RGBA format.
Support for custom browser preview templates
Allow users to customize the webpage used for browser preview in a way similar
to custom build templates. Support for 3 formats: HTML, Jade, EJS. See: Custom Preview Templates.
Support for ambient light settings
We have added an ambient light setting to the Light component for basic lighting
of 3D scenes. This is often used to solve the problem of blackout of the back surface
of the model. Just select Create Light → Ambient in the Node creation menu.
You can also add a Light component to the Node and set the type to be created
Further improve the performance of Spine and DragonBones
Cocos Creator v2.2.0 optimizes the performance of 2D skeletal animation on various platforms.
On the native platform, we have added support for Spine and DragonBones SHARED_CACHE
and PRIVATE_CACHE. When the acceleration mode is enabled, the Spine performance
of the Android platform is 2x that of the original, and the DragonBones performance
is 7x the original. iOS platform Spine performance is 3x the original,
DragonBones is 5x the original.
After enabling acceleration mode on the web platform, Android Spine performance
is 3x the original, and DragonBones performance is 4x the original. iOS
Spine performance is 1.25x the original, DragonBones performance is 1.39x
Here is a breakdown of the detailed performance data:
To enable acceleration mode, simply set the Animation Cache Mode to SHARED_CACHE
or PRIVATE_CACHE on the Spine or DragonBones component. For more detailed
information acceleration mode, refer to the property descriptions in the
Spine runtime upgraded to 3.7
Significantly enhanced TiledMap support
Cocos Creator v2.2.0 further improves the support of TiledMap. Grid rotation, grid animation, image layers, layer offsets, and object group text are now supported. Supporting multiple Tilesets in a single layer is also now possible. It also supports adding child nodes to the scene and creating an occlusion relationship with the map. And fixed the problem of rendering errors after a single map vertex exceeds 65535. For details, see TiledMap Component Reference. For details on use cases, see ShieldNode in the engine’s own example.
Property inspector tag supports width adjustment
We added a width adjustment function to the Property inspector to solve the problem of incomplete display of attribute names on some components. Now users do not need to greatly adjust the size of the entire panel, just drag the dividing line to the right of the property name to freely adjust the split ratio.
- Optimize the editor and the startup speed of each panel
- Avoid every time the WeChat game build will overwrite the configuration file in the target project in order to retain the user’s custom configuration
- Change the margin property in the SpriteFrame resource panel and Sprite Editor from the trimmed margin to the original margin. Make it consistent with the data given in the art drawing, and have no effect on the old project data.
- Automatically remove the open domain components of other small game platforms during the build process, users do not need to manually configure in the module settings
- The native platform package name in the build panel will be stored separately according to different platforms
- Upgrade the editor’s Electron to 5.0.8, V8 to 7.3, node.js to 12.0.0
- Optimized Spine Initialization problem after enabling acceleration mode
- Officially supported on iOS platform etc2 Compressed texture
- Enable OpenGLES3 by default on iOS
- Adaptation macOS Catalina
- Fixed an issue where the scene name could not be obtained during preview after exiting Prefab edit mode
- Fixed 3D node in scene editor may show confusion after exiting Prefab edit mode
- Fixed an issue where the animation editor was being deleted and the animation editor would report an error.
- Fixed an issue where events polled with
oncecould not be logged off
cc.systemEventlistening for invalid
onceevents (thanks to Zty)
- Fixes DragonBones and Spine textures do not support the problem of scene resource lazy loading [#4299]
- Fix part DragonBones The animation is not playing correctly
String, etc. when using the decorator to declare
- Fixed a problem where the default value is incorrect when the
CCClassis declared as the default value of
- Fixed a problem with music being paused from the background after the music was paused on the native platform [#141] [#1875]
- Fix Android After playing multiple Audio instances in succession, there is a random problem with some sounds [#1869]
- Fixed Audio for lazy loading on native platforms, unable to stop after playback [#180]
- Fix iOS or Mac When the native platform reloads Font, it may cause memory leaks [#1761]
- Fix iOS 13 Dark mode causes EditBox white fonts are not visible [#1866]
- Fix IE11 VideoPlayer Can’t full screen issue [#4879]
- Fixed AudioSource’s
playOnloadmay not work
- Avoid iOS on Baidu game cut scenes may be black screen problem
- Removed Visual Studio 2015 support for building Windows platforms for unified use of 2017.
v2.2.0 does not support the Skew effect on nodes for the time being. We will provide documentation to guide you to manually enable Skew support. For new projects it issuggest ed to use 3D Sprite directly instead of Skew. For old projects please refer to [#5564] and [#1889] to match js and native engines to support Skew.
After publishing to Windows/Mac, to resize the screen, please manually follow [#1891] to accommodate.
On some macOS machines,
Labelwill appear in the CHAR mode with a white border. This problem has a small impact and will be fixed in 2.2.1. For more follow-up version plans, please refer to the roadmap.
- If you open the 1.x project, all resources such as the scene will be automatically upgraded. If there is a warning or an error, please refer to 1.10.0 Resource Upgrade Guide and 2.0.0 Upgrade Documentation to make adjustments.
- 2.0, 2.1 Projects can be upgraded directly and seamlessly.
- Starting with 2.2, we have enhanced the memory management mechanism. Now the
cc.Nodethat is dynamically created by the code and independent of the scene node tree must be released by
destroy(), otherwise the engine doesn’t know when to recycle such nodes. In addition, nodes that are manually removed from the scene need to unify
destroywhen they are not needed. If the node is managed via
cc.NodePool, it is not affected.
// Suppose testNode is a node in the scene, if it was manually removed from the scene, such as testNode.parent = null; // or testNode.removeFromParent(true); // or parentNode.removeChild(testNode); // If testNode will be used again later, there is no need to manually destroy the node. // Otherwise it should be called manually testNode.destroy();