Cocos Creator v2.2.1 released!

Cocos Creator v2.2.1 released!
0

Cocos Creator v2.2.1 released!

The Cocos Creator team has worked hard to release v2.2.1. A big THANK YOU! to all the developers that upgraded to previous versions of v2.2 and provided feedback to help continue to make Cocos Creator a preferred tool is creating multi-platform games. Your encouragement and feedback keep us motivated and provide confidence to make the decisions to move Cocos Creator in the direction to become the number 1 choice in game development environments. Cocos Creator allows developers to enjoy creating amazing games and distributing them to a variety of platforms. Cocos will, as always, optimize the performance and user experience of our products.

This release brings a large number of experience optimizations, defect repairs, and performance optimizations. At the same time, support for Alipay Mini-Games has been added.

It is recommended that all developers upgrade after performing the necessary technical evaluations and after upgrading their existing projects for safe-keeping. Please do not skip these steps.

What’s New

Support for Alipay Mini-Games

Mini-Games are insanely popular and many platforms are starting to support them. This opens up many new revenue opportunities. Alipay, an e-commerce giant recently added support for mini-games. Cocos Creator v2.2.1 is the first platform to release support for Alipay Mini-Games. For more information, please refer to《Alipay Mini-Games》.

image_preview

Support WeChat mini game engine plugin

The game engine plug-in is a new feature of WeChat version 7.0.7. This can greatly reduce the download time of games. This plug-in is now integrated into Cocos Creator v2.2.1 as part of the environment and will be more convenient to use. Developers only need to check Allow engine separation in the Build panel, and then build the release normally, without any other manual operations.

For more information, please refer to《WeChat Engine Plugin》.

image_preview-2

Upgrade Instructions

  • 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.Node that 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 destroy when 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();

Downloads

MacOS
Windows

Release Notes

Camera component enhancements

  • Added Align With Screen property. When checked, the camera will automatically keep the
    window size to the size of the entire screen regardless of whether the camera is in 2D / 3D node mode. If unchecked, developers can freely set Ortho Size (2D/3D) or FOV (3D).
  • In 2D mode, the same Rect attribute as in 3D mode is also provided, which is used to specify
    which area of the screen the camera draws, which is convenient for implementing a viewport like a small map.

Improvements

  • Optimize the performance when calling addChild on native platforms, and improve scene
    switching speed
  • Support automatic release of JSON resource pack at runtime, optimize memory footprint
  • Tiled Map supports TileSet including multiple texture formats
  • Optimized native Dragon Bones and Spine color update performance (thanks wyf)
  • Added getTotalTime() API to cc.director to get the total game running time
  • Support md5Cache function when building Xiaomi Quick Games
  • Adaptation for iOS 13 Browser request operation for gravity sensing permission
  • Platform detection for iPad and OS 13 (thanks krapnikkk) [#5635]
  • Added --force parameter for command line build to skip project upgrade tips
  • Optimize the timing of memory release of VideoPlayer and WebView on native [#215]
  • Support to enable WebSockets server on native [#1921]
  • Improve the storage precision of TRS floating point numbers in scene files to improve user
    experience
  • Improve the operation experience when setting the font of Label and RichText in the editor
  • Improve folder sorting in the resource panel

Editor

  • Fixed the problem that the settings are restored after switching the items after saving the settings
  • Fixed the problem that the compressed texture setting of the corresponding platform does not take effect when building a WeChat mini- game
  • Fixed the problem of renaming file failed after resetting editor layout
  • Fixed Sprite Editor not displaying rotated plist file
  • Fixed the issue where the level manager will not automatically locate when the node is highlighted
  • Fixed an issue where the editor reported an error when adding 3D point light sources to more than 5
  • Fixed the problem that the plugin store could not be opened
  • Fixed error when exporting resources
  • Fixed the problem that the orientation may be set incorrectly when building a native platform
  • Fixed the issue where md5 rename is triggered after the finish-build event when customizing the build process
  • Fix the problem that caused the Prefab circular reference in some cases, causing the parameters to be lost
  • Fixed an issue where the game preview could not fully display the scene content
  • Fixed the problem that the resource application button is not activated after deleting the texture compression format
  • Fixed the issue that the rotation angle may be wrong when upgrading from v2.1.x to v2.2
  • Fixed the issue that Mask Image Stencil effect may not be correct after upgrading to v2.2

Engine

  • Fixed the issue that v2.2.0 node Skew is invalid
  • Fix the synchronization problem between child node group and parent node group [#5723]
  • Fixed the problem that attributes cannot be set successfully after instantiation of custom materials (thanks Elk953) [#5615]
  • Fixed an error caused by ArrayBuffer.isView not defined on QtWebview [#5611]
  • Fix the error caused by high-precision highp may not be supported on low-end devices [#5675]
  • Fixed the issue that the deltaTime of the first frame of the game may be negative on some platforms [#5641]
  • Fix Sprite component Type select Filled, Filled Type select Radial, modify the behavior of filled Range abnormally [#5609]
  • Fix the alignment problem of Label component in CHAR mode when Vertical Align is set to Top or Bottom [#5614]
  • Fix EditBox cannot set editBox.string in editing-did-began callback [#5732]
  • Fixed the problem of invalid setting of node scale when the Button component is set to Scale [#5740]
  • Fix the playback problem when the Auto On On Finish check box is not checked and the Play On Load is not checked [#5618] [#1905]
  • Fixed the issue that the first frame may burst after playing the particle system [#1915]
  • Fixed rendering problem caused by empty Font Family when using system fonts [#5627]
  • Fixed the problem that when Spine* is not loaded, the user will report an error when calling the cache related interface
  • Fix TiledMap Object Group incorrect texture coordinates [#5633]
  • Fix Tiled Map 45 degree angle Object Group picture position is incorrect [#5728]
  • Fix TiledMap Insert and delete in the same frame and then insert the user node, it will report the existing problem of the component
  • Fixed TiledMap wrong image layer level [#5587]
  • Fix TiledMap setTiledTileAt() interface is invalid [#5713]
  • Fix VideoPlayer vertical screen display in show all layout [#5684]
  • Fixed the issue that VideoPlayer cannot be updated in time when playing other videos [#5736]
  • Fixed an error when the off method was executed when the once event was called back [#5626]
  • Fix the problem of ttf lazy loading [#5612]
  • Fixed the problem that the scene could not be loaded after reporting the error of repeated loading scenes [#5656]
  • Fixed the problem of texture loss due to manually releasing resources and removing nodes [#5588]
  • Fixed cc.rotateTo being invalid in some cases [#5717]
  • Fixed cc.rotateBy being invalid in some cases [#5742]

Native

  • Fix the problem that Mask fails in some cases [#1899]
  • Fixed the problem of incorrect color transparency transition of particle system [#1910]
  • Fix rendering error when Camera is selected to render multiple stages [#1897]
  • Fix the problem that gyroscope cannot be turned off [#197]
  • Fix audioEngine may crash when switching front and background [#1930]
  • Fix jsb.Downloader registration callback error [#1940]
  • Fixed the problem that download resume of breakpoint failed (thanks @gaolizheng) [#1931]
  • Fixed TiledMap display incorrectly [#190]
  • Fixed DragonBones cached event not firing Issue [#196]
  • Fix the issue that the event callback of Spine in Cache mode is inconsistent with the parameters
    of the web platform [#209]
  • Fixed the issue that Spine may use buffer animation in Cache mode, and the number of vertices will increase due to clipping, which may cause buffer overflow [[#1948]](https://github.com/cocos-creator/cocos2d-x-lite/ pull/1948)
  • Fix the issue that the display position of EditBox, WebView, VideoPlayer is offset when the node
    scale is not 1. [#201]
  • Fixed the problem that the scene was stuck during EditBox input [#5804]
  • Fix VideoPlayer error report [#1934]
  • Fixed the problem that VideoPlayer will cut the full screen automatically after changing the url
    [#205]
  • Fix the problem that videoPlayer.resume() call is invalid [#199]
  • Fix evaluateJS() of WebView is invalid [#207]
  • Fixed the problem that the particle effect displayed when loading plist is incorrect [#193]
  • Fixed the issue that the Motion Streak module will be reported incorrectly. [#198]
  • Fixed the problem that the filled lines will be automatically cleared after drawing multiple times
    using the Graphics component [#198]
  • Fixed the problem of screen adaptation after resize desktop screen [#1891]
  • Fix Mac display screen error [#1900]
  • Fix the problem that 3D model may be displayed incorrectly under Windows ** [#1927]
  • Fixed the problem of screen rotation failure on iOS and Android [#1891]
  • Fix iOS Unlocking after lock screen may cause stuck issue [#1918]
  • Fix the problem that the WebView loading page is invalid on iOS [#1940]
  • Fix Android EditBox pops up view when it pops up [#1946]
  • Fix the problem of wrong parameters of onProgress when downloading on Android [#1919]

Mini Games

  • Fix EditBox repeatedly calling showKeyboard when pulled up [#26]
  • Fixed the problem that the display position of VideoPlayer is offset when the node scale is
    not 1. [#27]
  • Fixed the problem that some small game platforms cc.sys.os are not defined [#30]
  • Fix the problem that the top of the label is cut off on Vivo OPPO [#5799]
  • Fix the problem of replay after audio playback on Alipay [#29]
  • Fixed the error of loading resources on Alipay [#38]
  • Fixed audio loading failure on Alipay iOS [#30]
  • Fix error of loading engine for WeChat running on iOS 9 [#5780]
  • Fixed the issue that there is no callback after preload failure on WeChat [#22]
  • Fixed XHR.abort () call failure on WeChat [#20]
  • Fixed the problem that when the compressed texture is enabled for the pictures in the mini-game sub-package, the sub-package cannot be constructed normally
  • Fixed BMFont rendering overlap and error report using Cache mode in mini game
    subdomain [#5763]

Deprecation

  • As of v2.2.0, we no longer recommend using the Skew feature of nodes. Skew is usually used to simulate 3D effects in the 2D engine. With Cocos Creator’s in-depth support for 3D nodes, the Skew effect can be completely realized by 3D nodes. So in order to unify the user experience and further optimize the underlying implementation of the engine, we discarded the Skew attribute. However, we will still maintain backward compatibility for a period of time, developers can continue the original practice in the old project. In the future, we will further improve the compatibility method and upgrade case, and choose to officially remove the Skew function

Known Issues

  • Due to compatibility issues of the FBX SDK, please make sure that the Windows version of the
    editor is installed in the English path, otherwise you may not be able to open the editor. This issue will be fixed in a future release.
  • When building a native platform, the Audio module cannot be removed, otherwise it will not
    compile properly.
  • When Mask component is currently nested, it may cause click event penetration. If you need to
    nest the mask, please refer to [#5749] to customize the engine.
  • Currently the particle system will render textures as squares, if the texture used is not a square it will be stretched. Please use square texture as much as possible, and customize the trim area of ​​SpriteFrame to avoid the white area from being culled. Or refer to [#5666]
  • After the number of vertices drawn with Graphics exceeds 65535, it will not be able to draw.
    If necessary, refer to [#206 and [#1935] to customize the engine.
1 Like

Great Release, so far !

I was able to build my Android *.apk without “intelliJ IDEA”! The gradle.project was compiled just with CC 2.21. This is great ! I dont know why i wasnt able to do this with the older release CC 2.12. Anyways. Now it works.

But one thing bother me: the file size !!!
CC 2.12 (.apk) = 7.3mb
CC 2.21 (
.apk) = 8.14mb

If i unziped / decompiled the apk & i can see the size difference in the “lib\armeabi-v7a\libcocos2djs.so”
CC 2.12 = 14,5 mb
CC 2.21 = 17,5 mb

The library with CC 2.21 is much bigger than in CC 2.12. Is there any chance to reduce its size ? Or make it even smaller than in CC 2.12 ?

Also there seems to be a prob with label set to = CHAR ! As you remember “CHAR” is very important for performance. Somehow it is broken in this release, i guess. Does anybody has the same problem ? The text simply disappear. When i switch to “none” or “bitmap”, the Text appears correctly.

And the last thing: compatibility. It is not completly compatible with your CC 2.12 Projects ! Even not with CC 2.20. Check this out, f.e.: https://github.com/2youyou2/TheAviator

This few facts makes me a little bit sad. :sleepy:

We can ask @jare to help us out. @sledgehammer

Would be super, if someone could investigate into this few things i mentioned. :+1: . Thank you “slackmoehrle”

Hi friends,
I need to make a simple 3d project for my client.

I want to make a simple camera orbit setup in Cocos Creatoe v2.2.1
I have a model in center of the scene.
I put a node named “Cam_X”. I put another node named “Cam_Y” in “Cam_X” to rotate two axis independently like a gimbal.
I put camera at a certain distance from the center into “Cam_Y”.

image

So I thought I can control rotation of nodes to orbit camera around center like this:

I put a dummy cube to at the position of camera and it seems wrk well:

But when I put the camera then it goes crazy about angles:

Here is the update function:

onTouchMove(event){
let x_rot = event.getDeltaX()/100;
let y_rot = -event.getDeltaY()/100;

    let qX = new cc.Quat();
    let qY = new cc.Quat();

    this.Cam_X.getRotation(qX);
    this.Cam_Y.getRotation(qY);

    qX.rotateAround(qX,cc.v3(0,1,0),x_rot,qX);
    qY.rotateAround(qY,cc.v3(1,0,0),y_rot,qY);

    this.Cam_X.setRotation(qX);
    this.Cam_Y.setRotation(qY);
}

How can I fix this or how can I make a simple orbit camera?
Thanks.

@slackmoehrle do you have any suggestions my friend?

What you are doing seems to make sense to me, so why don’t I ask @jare to have a team member take a look at your images and code.

1 Like