A casual match game “Happy Match” is successfully ported to the open-source HarmonyOS platform. This match game is made with Cocos2d-x, which is the first game engine to adopt open source HarmonyOS platform.
For starters, Cocos2d-x is a multi-platform framework for building 2d games, interactive books, demos, and other graphical applications. It is based on cocos2d-iPhone, but instead of using Objective-C, it uses C++. It works on iOS, Android, macOS, Windows, and Linux.
Cocos mainly operates two game engines, Cocos Creator and Cocos 2dx, and a commercial SDK, Cocos Runtime. The Cocos engine has three core features:
- Low power consumption
- High performance
- Multi-device connection and cross-device transfer capabilities
Last year, Cocos Community unveiled the world’s first 3D game engine that supports the OpenHarmony operating system. This new gaming product appears on board as Cocos Creator 3.6.1 and efficiently operates the self-designed “Eagle Strike” game.
“Happy Match” is developed with the Cocos2d-x engine. While the “Happy Match” port shows that Cocos has completed the adaptation of two game engines, Cocos Creator and Cocos2d-x for OpenHarmony.
The developer who ported this game also revealed the technical aspects of the process. The porter revealed to use the goal of “subtraction first, then add” and achieved the minimum set goal including basic gameplay and UI animation rendering.
At the minimum, the developer set to improve the basic features such as network communication, music, and sound effects. Based on this version, you can expand some features such as login, IAP system, vibration feedback, and more. That’s how the performance and optimization were carried out.
Overall, the port process for the Happy Match game with Cocos2d-x took 3 days to run on the open-source HarmonyOS platform.