CocoonJS and Construct2’s “Great HTML5 Gaming Performance Test: 2014 edition”

Scirra, the company behind Construct2, a great HTML5 game authoring framework, released “The Great HTML5 Gaming Performance Test: 2014 edition” weeks ago. In this test, they used a Construct2 based game demo and executed it in numerous environments. Surprisingly (and we want to think that by mistake), they did not include CocoonJS’ Canvas+ in the comparison, but to help Scirra provide as much information as possible, and to be fair to the Construct2 developer community that has been actively using CocoonJS, we have used the same demo in almost all of the same devices (and some interesting additional one like an iPad1 with iOS 5!). These are the results:

Device Canvas+ canvas2d Canvas+ webgl Chrome34 webgl Firefox webgl Safari 7 canvas2d Ejecta webgl
Nexus 4 58 60  59 58 N/A N/A
Nexus 7 52 60 59 51 N/A N/A
SGS3 58 59 58 58 N/A N/A
iPad 2 53 55 N/A N/A 46 55
iPad 1 20 35 N/A N/A N/A N/A
iPhone 4S 32 51  N/A N/A 40 51
iPhone 5 60 60 N/A N/A 60 N/A
Kindle 44 58  N/A N/A N/A N/A

As you can see Canvas+ is really efficient for both 2d and webgl contexts in all of the devices that were tested (even on an iPad1!!!).

It is also important to remember that Chrome, Firefox and Safari are not technologies to create native apps for iOS or Android. If someone wants to run a game on a mobile browser, this list gives a good glimps of what to expect, but not all of the final users/players have these browsers and their latest versions installed (specially on Android) and most of these technologies won’t be an option to create native apps for existing mobile markets. Moreover, Safari has Nitro JIT so the comparison is also biased. Bottom line is that CocoonJS is still the only technology that allows webgl native app deployment for both iOS and Android using the same execution environment, with no fragmentation and with an easy one click final deployment.

The good news is that the new CocoonJS release 2.0.1 is soon to be out and with it anyone will be able test these results on his/her own easily by installing the CocoonJS Launcher App for iOS and/or Android. This new version of CocoonJS will execute any Construct2 project exported for the web out of the box, so this perf test will also work just by pointing to the following URL (either typing it or using the provided QRCode for your convenience):

http://www.scirra.com/demos/c2/sbperftest/

ScirraPerfTestURL

Happy perf-testing! 😉

12 Comments CocoonJS and Construct2’s “Great HTML5 Gaming Performance Test: 2014 edition”

  1. avatarJohn Black

    Wow, thank you! I am a Construct 2er, and this helped! I don’t know why Construct 2 staff are not promoting CocoonJS! They have yet to add the new Plugin. It makes me mad. It’s almost like they are getting paid to promote the others, and not CocoonJS!

    Reply
    1. avatarRenato

      I have to second that. Its sad that scirra is promoting only crosswalk, that have potential, but is far to be viable to use.

      Reply
    2. avatarSuru

      CocoonJS cause memory spikes at the beggining, so it is not good for any bigger project. Ejecta for iOS have memory management, same with Crosswalk for Android.

      Scirra and C2 users asked Ludei many times for support, but were ignored.

      I guess that may be the issue 🙂

      Reply
      1. avatarTxus Ordorika

        CocoonJS acts as a regular browser with images. When they’re instantiated, some memory is allocated to handle it. Construct2 doesn’t have to deal with memory in PC. If you trace the memory management, you’ll see that all the scenes are loaded on startup.

        CocoonJS has powerful memory management implementing custom javascript methods such as dispose() to unload images, texture reducing, et al. Why C2 doesn’t use them? We don’t know. It’s something related to the asset management by C2, and we can’t do anything on it.

        Unfortunately, we can’t do anything when Scirra exports to CocoonJS.

        Reply
  2. avatarHuy Phan

    I’d like to thank you guys for doing an excellent job with CocoonJS! It is the best HTML5 compiler for games with moderate art assets, and if there’s ever the implementation of memory management, then it will be the best compiler for bigger games too!

    Keep up the good work!

    Reply
    1. avatarSuru

      CocoonJS should not load all assets at the app start, because it cause memory spikes and crashes on devices with a low amount of free memory.

      Unfortunetly CocoonJS does not support layout-by-layout loading which exist in great Construct 2 game maker.

      Reply
      1. avatarHuy Phan

        Yes, certainly that is CJS’s major flaw, since it loads all your graphics assets into memory on startup which increased load-times and memory usage. As I’ve said, its great for “smaller” games, whenever they fix memory management, it will be great for bigger games too.

        Saying that, you can make quite large complex games with C2 & CJS, and it will run very well with excellent performance on mobiles. My own example: Complex scifi RPG/RTS spacesim, Star Nomad: https://play.google.com/store/apps/details?id=com.halfgeekstudios.starnomad&hl=en

        Reply
        1. avatarSuru

          I think some of your users would disagree:

          “Crashes right after ”powered by” screen ”

          CocoonJS would be great, but sucks because of terrible memory management

          Reply
          1. avatarHuy Phan

            No, I don’t blame CJS. My game only loads around 150/160MB into memory, thats nothing compared to most devices these days with 1GB. The reason it crashes, is because the S2 has a 800 x 480 screen. My game specifically requires 720p or better, its just the way I did it. It would be unplayable on a small low res screen.

            Also, modded Android OS crashes, probably due to incompatibility with CJS.

          2. avatarHuy Phan

            Seriously, I get users who complaint about crashes for my very small game: Flappy Sperm. It loads almost nothing into memory.

            That’s just Android, so many models and modified OSes.

      2. avatarHuy Phan

        Figured out why it was crashing on a lot Samsung devices, it’s due to SIGILL (missed it in the release notes for v2.0.1), as I’ve recently switched to the new compiler version. Was using 1.4.7 before.

        LUDEI, you guys need to halt 2.0.1 as an option in your compiler, it doesn’t just crash on Samsung Tab (which is the bulk of the Android market) but also other Samsung phones with the same CPU, such as S2/S3 and even Note.

        Make it clearer in the release note when the bug is THAT significant or heck, don’t release it. 😀

        Reply
  3. avatarRoberto Dillon

    Great results! CocoonJS is actually my first choice when building ios/android games developed from Construct 2.
    I actually gave Ludei significant coverage in my HTML5 Construct 2 book in the “deployment and monetization” chapter.

    Keep up the good work!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *