Links on Android Authority may earn us a commission. Learn more.
Cocos2d-x game engine ported to Android on MIPS, runs on Creator CI20 board
One of the most popular open source game engines is Cocos2d-x, a cross-platform framework designed by Chukong Technologies and based on the Cocos2d engine for iOS. It works on a variety of platforms including Android, iOS and Windows phone. At the end of January, Imagination sent Ricardo Quesada, the chief architect at Chukong, a couple of MIPS based CI20 boards. As a result he was able to port Cocos2d-x to Android for the MIPS processor.
If we can't port Cocos2d-x to CI20 then something is fundamentally wrong with our toolchain.
Not only did porting Cocos2d-x to Android on MIPS, show that MIPS fully supports the Android ecosystem, it also allowed Quesada to see if the Cocos2d infrastructure was robust enough. “If we can’t port Cocos2d-x to CI20 then something is fundamentally wrong with our toolchain,” wrote Quesada in the diary he started to document his experience.
As a result of his porting work, devices using MIPS CPUs and PowerVR GPUs from Imagination are now fully compatible with the latest version of the Cocos2d-x game engine. With the porting work finished, Chukong Technologies and Imagination made an official announcement about their collaboration.
For those who like the full technical details here are a few highlights from Richard’s porting experience:
- He first tried the Windows version of the MIPS compiler toolchain, but “didn’t like it.” So instead, he went with the 32-bit Linux version.
- As a result of this porting exercise Richard was able to improve the dependencies needed by Cocos2d-x and fix some build issues that weren’t actually related to MIPS.
- Richard found that GCC 4.8 with the NDK worked best, as GCC 4.9 crashed.
- The port use Lua instead of LuaJIT, since LuaJIT is not supported on MIPS.
Cocos2d-x v4.0-alpha0 was the code based used to port the game engine to Android on MIPS. It includes all the features of the recently released Cocos2d-x v3.4 game engine, plus some new features like the improved unified rendering for 2D and 3D objects, which enables developers to implement advanced 3D effects – shadows, particles, visual damage number popups, etc.