Cocos Creator 2.4 Brings Asset Bundling For Developers
2020.06.24 by COCOS
Cocos Creator Version Updates

Hopefully your summer is a chance to relax, enjoy the beach, and build some great games. We’ve got you covered in the game building this summer in an update we think you’ll love. 

We are getting closer to our big release of 3.0, but we have a few more bugs to take care of (specifically some 3D ones.) before it’s released later this year. But we’re excited to share version 2.4. It comes with the obvious updates and bug fixes you would expect with an update. But that’s not all it came with.

If you are interested in downloading Cocos Creator 2.4, please install it through the Cocos Dashboard, available on our website. You can also learn about every item in our update from our forum post.

Support For Asset Bundles

One of the biggest things we have been working on is improving development for games using HTML5 or our Cocos Realtime Engine for mini games on OnePlus, OPPO, WeChat, or other Cocos Play supported apps.

One of the difficulties with these games is shrinking these games to a size small enough to load efficiently on the browser or platform. One way is not to have every asset being downloaded with the mini game itself and only downloading the assets of a level when the player requests them. This is the premise for asset bundles. We now fully support this with the cc.assetManager call in 2.4.

To do this, you can add all the assets into an asset folder and then request assets by folder or by item.

You can also optimize the package as well as the compression type and priority of the assets.

Some of the features asset bundling in Cocos Creator 2.4 include:

  • Support for loading and pre-loading of resources silently
  • Support for the automatic release of resources
  • Support for download retry, prioritizing, multiple downloads at once, and adjusting of downloads.
  • Supports customization to the loading process

For more information on how to use the asset bundle functionality, check our documentation on the subject.

Improvements In Labels And Graphics

Labels have been increased in quality and speed in this update. They now can load at five times as fast on Android and three times as fast on iOS than previous versions of Cocos Creator. TTF fonts used in Char mode now have support for properties like Bold, Outline, Shadow and more:

We also upgraded the quality of aliasing for graphics using SDF as well.

Before
After

The editor also supports the compression of textures for more small game platforms. Just go to the compression texture format in the Mini Game tab to set the compressed texture. This works for multiple platforms, including WeChat mini games, OPPO mini games, vivo mini games, etc.