Ring Diver: My JavaScript game at native speeds on iOS and Android

From Web Developer to App Developer


This spring I had an idea for a very simple mobile game that I wanted to develop and run on both iOS and Android. Let me tell you how I found an open source mobile game engine that allowed me to write my game in JavaScript and still have native performance.

First, I’m a web developer with no experience in building native games for iOS or Android. I feel comfortable writing JavaScript and C#, and I know a bit about Gimp — the open source image editing tool.

No time to master both native iOS and Android

Because I wanted to build the game in my spare time (next to my full-time job) I decided to search for an existing game engine to get me up to speed quickly so I could build my game in a couple of months on both mobile platforms.

My criteria for the ideal game engine were:

  • It must support JavaScript or C# (two languages I know very well);
  • It must be free to use, preferably open source;
  • It must be able to build for both iOS and Android;
  • It must perform fast. As close to native performance as could be;
  • It must be documented well and have a large user base.

Welcome to the JavaScript game engine jungle

So I started looking at a lot of different JavaScript game engines. For a comprehensive list, see http://html5gameengine.com/.
However, none of them seemed to tick all the boxes. LimeJS, MelonJS and Cocos2D-JS are all impressive open source JavaScript game engines, but when I wrapped their example games in a PhoneGap app it was obvious the speed wasn’t nearly as good as native apps. In my opinion, PhoneGap/Cordova isn’t suited for high-performance games.

Looking for JavaScript speed optimisation, I came across CocoonJS which claims to speed up all mobile HTML5 canvas games with its custom canvas 2D and WebGL implementation. However their service isn’t free and they wrap your JavaScript game without giving you back the full source code of your app.

The winner emerged

Then finally I came across Game Closure’s DevKit (see http://www.gameclosure.com/). Although “DevKit” doesn’t sound as cool as the other JavaScript game engines, it had everything I was looking for in a game engine:

  • Build your game in JavaScript;
  • Native performance on iOS and Android (using a technique similar to CocoonJS);
  • Free to use. Even better: DevKit is open source!
  • Well documented and an active (but not large) community.

Building my game in JavaScript and Game Closure’s DevKit was a real pleasure. The DevKit engine is very well documented and has loads of examples.

So, if you’re a JavaScript developer who wants to build mobile games, you should definitely check out DevKit. It’s fee, it’s JavaScript and it’s fast. What more do you need?

And… is my game any good?

Decide for yourself and have a look at Ring Diver for iOS or Ring Diver for Android. Both are free :-)

Ring Diver icon

Ring Diver for iOS:
http://itunes.apple.com/app/id860547876

…and for Android:
http://play.google.com/store/apps/details?id=com.dionoidgames.ringdiver

- DionoiD