In my development history, projects always need some features that the engine doesn’t have, or the existing features of the engine can’t meet the demand.
So I put all the features I wanted to add to the engine in one project: Cocos Enhance Kit.
I hope everyone can participate in the development of this project (fix bugs), so it will be open source.
I hope this project will be the first to implement some of the features that people expect the engine to have and bring a “native” experience.
I hope this project can be like an alpha version of the engine, it can be a reference in the application effect, and help the engine team to implement the features that people expect the engine to have faster.
The item of adding multi-texture rendering features to the engine, for example, has been done by many people, but.
There are those that do it by inheriting engine classes, which I think increases the cost to the user and is not as silky smooth as using the engine’s native features.
There are those that do it through plugin scripts, but this approach always requires copying some of the engine code and can be awkward to implement, and I don’t think it’s any more maintainable than a custom engine when Cocos Creator 2.x stops updating features.
Precedent for making multi-texture rendering features native to the engine.
The PixiJS engine has officially implemented multi-texture rendering in the v4 release in 2016.
The > Phaser engine is based on the PixiJS engine, so it also supports multi-texture rendering.
And the biggest advantage of using a custom engine is that it can support native platforms, the disadvantage is that since the mini-game platform has an engine plugin feature, using a custom engine will prevent you from using the engine plugin.
- Sprite, cc.Label, cc.RichText, cc.MotionSteak, Spine components, just drag in the components to use.
- Provides multi-texture batcher and automatic material switching mechanism, which makes it easier to dynamically generate and manage multi-texture materials, and is the basis for many of the following features.
Previously, we would increase the fontSize and decrease the Scale of the node to achieve this, but now it is directly implemented inside the engine, and the scale can be adjusted with one line of code.
cc.sp.labelRetinaScale = 2;
And provide a global switch and a single-component switch, you can control the range of this feature on as you like.
- Thanks to the multi-texture rendering base, it is possible to stay at 1 Draw Call with at least 8 sets of images.
- It supports automatic multi-texture batching, optimized algorithms, reuse of discarded space, and other features.
- Enables Spine to participate in dynamic merging as well.
- Support global default switch, and add a switch for components to participate in merging or not.
- Expose more merge interfaces to control the use of dynamic merge maps in a more detailed way.
- Thanks to the multi-texture rendering base, the maximum number of character atlases has been increased from 1 to 8, which somewhat alleviates the problem of text not being rendered when the atlases run out.
- Automatic multi-texture batching is also supported, which means that Char character sets can be merged with dynamic merging in one batch.
- Support for reuse of discarded space
As long as the dynamic merge and Bitmap cache modes are used properly, most scenes no longer need to do special Draw Call optimization (hitting the set, adjusting the node order, layering rendering) to have a good number of Draw Calls.
The Spine component supports merging with other components, merging into dynamic sets and SpriteFrame swap
As mentioned in the title, because we found that the forum often need to use SpriteFrame to dress up Spine, and there are many companies use Spine to implement common animations, even frame animations, which may have a big performance burden if they can’t be combined with other components.
You can get the full detailed documentation below, and it only takes a few steps (setting up a custom engine) to apply all the above features.
The enhance kit is extremely restrained in making changes to the engine, and will try to ensure compatibility and not modify the original defaults of the engine, so you don’t have to worry about “suddenly using it somehow”, and almost all new features are enabled and disabled by default.
So after installation you may find that nothing seems to have changed in the project, we recommend that you read the Getting Started tutorial to understand the recommended way to use it.
Finally, if you want a one-click install, then consider my personal paid engine extensions.
Cocos Store: Cocos Service Pack | Cocos Store
Of course you can write a script to implement it in minutes, so consider this a sponsored link and thank you for your support