A few months ago I was getting ready for our Creator CI20 launch in London; one of the demos we were planning to show at the event was Open Arena, a well-known Quake III mod that runs on multiple operating systems, including Debian and Android. When I took the same kit to CES 2015, I showed the demo to Scott Wasson from the Tech Report – he was quite impressed to see it running at 1080p in under 2 watts of power.

After reading more about ioquake 3 (the open source version of the Quake III game engine), I realized that Creator CI20 packs the performance needed to run many of today’s arcade games and therefore is an ideal solution for makers looking to build home-made micro-consoles based on our dev board.

One of the most popular game engines used right now for building games is Cocos2d-x, a cross-platform framework designed by Chukong Technologies and based on the Cocos2d engine for iOS. Cocos2d-x uses C++, JavaScript or Lua and is an ideal tool for creating a range of graphical apps including interactive books and manuals.

cocos2dx_landscapeCocos2d-x is the world’s most popular open source game engine

The Cocos2d-x game engine now runs on MIPS!

I got in touch with Ricardo Quesada, chief architect at Chukong, and sent him a few Creator CI20 boards to use for development. Since our microcomputer has a 1.2 GHz dual-core MIPS CPU, a PowerVR SGX540 GPU and runs both Linux and Android, he decided it was a good fit for porting the latest version of Cocos2d-x to the MIPS architecture and started a diary to document his experience, posting daily updates on his progress.

Porting Cocos2d-x v4 to Creator CI20 also meant Ricardo could test the robustness of their infrastructure and check the flexibility of the toolchain.

Building Cocos2d-x for Android on MIPS is as easy as building the game engine for any other Android platform. – Ricardo Quesada, Chukong Technologies

He was able to easily cross-compile all the required libraries and get the game engine up and running in a few hours. The end-result of this collaboration was an official announcement between Chukong Technologies and Imagination; read more about it in this press release or this blog article from Ricardo and download the full source code here.

Devices using MIPS CPUs and PowerVR GPUs from Imagination are now able to run a fully optimized version of the Cocos2d-x v4 game engine:

Creator CI20 - Cocos2d-x game engineCocos2d-x now runs on our Creator CI20 microcomputer

I’m excited to see gaming enthusiasts use Creator CI20 to build arcade game consoles and port some of the most popular Cocos2d-based titles currently available on Android to our platform; we’ve seen several examples of open source game consoles using MIPS CPUs in the wild so it would be interesting to see how the community could take that further.

What’s new in Cocos2d-x v4

Cocos2d-x v4.0-alpha0 includes all the features of the recently released Cocos2d-x v3.4 game engine. Here is a quick summary of the latest tools and features added to Cocos2d-x v4:

  • Unified rendering for 2D and 3D objects: this feature enables developers to implement advanced 3D effects (shadows, particles, visual damage number popups, etc.)
  • Frustum culling: only the elements that are inside the frustum are sent to the graphics hardware. This potentially improves application performance since only the visible vertices of the 3D world are stored on the graphics chip.
  • Smaller size: Libcurl has been replaced by the system network library on mobile platforms (iOS and Android) to reduce the size of game packages.
  • Custom allocators: these can be used increase memory management performance, reduce memory fragmentation and support memory loading analysing

The Fantasy Warrior demo showcases the latest features of the Cocos2d-x game engine

For more information about Cocos2d-x, check out their website and follow them on social media (@CocoaChina).

You can also keep track of the latest news and announcements from Imagination by following us on Twitter (@ImaginationPR, @PowerVRInsider, @MIPSGuru). If you’re attending the upcoming Maker Faire event in the Bay Area, drop by our booth to see a live demonstration too.

Comments

  • Marius Cirsta

    “He was able to easily cross-compile all the required libraries and get the game engine up and running in a few hours”

    Just as anyone can do with the open source PowerVR driver … oh wait it’s not just a binary blob PowerVR constantly avoids making source … Well I guess people don’t really need open source stuff , do they ?

    • Hi Marius,

      There is no link between how we deliver the PowerVR driver and the development work described above. Ricardo used the Android 4.4 distribution we provide directly from our website and our forum for any questions and support:

      https://groups.google.com/forum/#!topic/mips-creator-ci20/iUPf6dXOP7Y
      http://discuss.cocos2d-x.org/t/experiment-porting-cocos2d-x-to-ci20/19658

      One reason you’d want access to a fully open source driver is to port a new operating system (e.g. an RTOS) to the Creator CI20 board. Is this something you or others are interested in doing?

      Regards,
      Alex.

      • Marius Cirsta

        Hi,
        There is not link between the PowerVR driver and this, I was just saying open source can be really useful and this is an example.
        What bothers me the most with closed source drivers is that there is that I cannot rely on it working for my custom Linux distribution running the latest kernel for instance.
        With an open source driver included in mesa like Intel or AMD have I can just compile mesa and it will usually work while I can have no such guarantee about the PowerVR or, let’s be fair, Mali driver. Yes I know that there’s a problem with SOCs and that Intel, AMD manufacture their own SOCs.
        I think MIPS has an opportunity to go head to head with ARM in some markets but offering something more than ARM does would certainly help.
        Sure for big companies PowerVR or someone else can offer support, source code and a custom driver but for hobbyists like me open source is important.
        Hobbyists and smaller customers are quite a serious market as proved by the success of the Raspberry Pi.
        If I were to choose a solution for a POS system now I’d go for the Raspberry Pi because it’s getting an open source GPU driver that will be integrated into the kernel and mesa. I can then not worry about whether Broadcom will support it 3 years from now when I want to upgrade to a newer version of OS ( say Debian ). What if I want to run Fedora 22 ( or Fedora 26 in a few years ) on a MIPS Creator CI20 ? Probably not an easy thing to do unless the binary driver supports it. If Ingenic or PowerVR stop supporting this then bad luck.
        Even more Intel is starting to dump cheap Atom boards which have their own GPU. These will run on pretty much any Linux ( and pretty much Android too ) and will be supported for a good period from now on.
        The flexibility offered by an open source solution is something PowerVR should consider for MIPS because unlike for ARM it now controls a bigger part of the ecosystem and not just the GPU.
        Opening stuff up has often been a good way to boost sales and improve the image for a certain product and given that the money comes from HW and IP I see no big risk to doing this.
        All the inner workings of Adreno were exposed by Freedreno and I don’t really see Qualcomm suffering from this.
        And as a person working in IT maybe you’ll also understand the “coolness” factor. Sometimes we like certain stuff just because it’s cool and yes open source is a lot more cool than some binary thingy.
        I know there’s probably countless reasons an open source driver can’t happen over night but it would be nice to see PowerVR go in that direction. I seriously doubt you have anything to loose and I’d say you have plenty to gain in a market where offering something more than your competition does helps.
        I’m not really sure how the limitation introduced by the fact that PowerVR does not manufacture SOCs can be bypassed but I’m sure there are ways to abstract at least some of this. The can probably be some separate configuration such as the device tree used by the Linux kernel to abstract SOC specific parts.

        • I think you make several valid points and agree that we need to offer extensive support for the Creator family.

          Our management is evaluating multiple options at the moment for our open source strategy so hopefully there will be some news I can share with you soon.

          I just hope you understand this is a decision that spans across several departments (legal, business development, marketing, engineering etc.).

          Regards,
          Alex.

  • Marius Cirsta

    “He was able to easily cross-compile all the required libraries and get the game engine up and running in a few hours”

    Just as anyone can do with the open source PowerVR driver … oh wait it’s not just a binary blob PowerVR constantly avoids making source … Well I guess people don’t really need open source stuff , do they ?

    • Hi Marius,

      There is no link between how we deliver the PowerVR driver and the development work described above. Ricardo used the Android 4.4 distribution we provide directly from our website and our forum for any questions and support:

      https://groups.google.com/forum/#!topic/mips-creator-ci20/iUPf6dXOP7Y
      http://discuss.cocos2d-x.org/t/experiment-porting-cocos2d-x-to-ci20/19658

      One reason you’d want access to a fully open source driver is to port a new operating system (e.g. an RTOS) to the Creator CI20 board. Is this something you or others are interested in doing?

      Regards,
      Alex.

      • Marius Cirsta

        Hi,
        There is not link between the PowerVR driver and this, I was just saying open source can be really useful and this is an example.
        What bothers me the most with closed source drivers is that there is that I cannot rely on it working for my custom Linux distribution running the latest kernel for instance.
        With an open source driver included in mesa like Intel or AMD have I can just compile mesa and it will usually work while I can have no such guarantee about the PowerVR or, let’s be fair, Mali driver. Yes I know that there’s a problem with SOCs and that Intel, AMD manufacture their own SOCs.
        I think MIPS has an opportunity to go head to head with ARM in some markets but offering something more than ARM does would certainly help.
        Sure for big companies PowerVR or someone else can offer support, source code and a custom driver but for hobbyists like me open source is important.
        Hobbyists and smaller customers are quite a serious market as proved by the success of the Raspberry Pi.
        If I were to choose a solution for a POS system now I’d go for the Raspberry Pi because it’s getting an open source GPU driver that will be integrated into the kernel and mesa. I can then not worry about whether Broadcom will support it 3 years from now when I want to upgrade to a newer version of OS ( say Debian ). What if I want to run Fedora 22 ( or Fedora 26 in a few years ) on a MIPS Creator CI20 ? Probably not an easy thing to do unless the binary driver supports it. If Ingenic or PowerVR stop supporting this then bad luck.
        Even more Intel is starting to dump cheap Atom boards which have their own GPU. These will run on pretty much any Linux ( and pretty much Android too ) and will be supported for a good period from now on.
        The flexibility offered by an open source solution is something PowerVR should consider for MIPS because unlike for ARM it now controls a bigger part of the ecosystem and not just the GPU.
        Opening stuff up has often been a good way to boost sales and improve the image for a certain product and given that the money comes from HW and IP I see no big risk to doing this.
        All the inner workings of Adreno were exposed by Freedreno and I don’t really see Qualcomm suffering from this.
        And as a person working in IT maybe you’ll also understand the “coolness” factor. Sometimes we like certain stuff just because it’s cool and yes open source is a lot more cool than some binary thingy.
        I know there’s probably countless reasons an open source driver can’t happen over night but it would be nice to see PowerVR go in that direction. I seriously doubt you have anything to loose and I’d say you have plenty to gain in a market where offering something more than your competition does helps.
        I’m not really sure how the limitation introduced by the fact that PowerVR does not manufacture SOCs can be bypassed but I’m sure there are ways to abstract at least some of this. The can probably be some separate configuration such as the device tree used by the Linux kernel to abstract SOC specific parts.

        • I think you make several valid points and agree that we need to offer extensive support for the Creator family.

          Our management is evaluating multiple options at the moment for our open source strategy so hopefully there will be some news I can share with you soon.

          I just hope you understand this is a decision that spans across several departments (legal, business development, marketing, engineering etc.).

          Regards,
          Alex.