Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the current state of game engines, frameworks, libraries and conversions related to the HTML5 set of technologies (including CSS3 and JavaScript libraries such as RaphaelJS, Impact, gameQuery); and how does the best of that compare with developing a native app (especially for iOS and Android)?

Especially in terms of performance, visuals and getting that "native feel".

Thoughts on solutions such as Appcelerator and Corona SDK are also appreciated. In regards to Unity3D, is it possible to develop in it and still have the game be playable on a browser (such as current releases of Chrome or Firefox, at least) without any dependencies or having the user install anything (no unity web player).

What I'm looking for is how to develop in web standards as to reach the maximum number of platforms (including outside mobile) while still retaining a native experience for mobile without having to implement the game anew for iOS and Android.

share|improve this question

closed as too broad by Josh Petrie Sep 30 '15 at 3:45

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

Unity still requires the web player. They're working on Flash 11 deployment, but that won't be out for a while. I haven't played an HTML5 game on a mobile browser that felt good. And HTML5 audio is still a pile of suckitude. – michael.bartnett Nov 16 '11 at 15:53
If you want "native feel", then you need a native app... otherwise you're always limited to the common denominator of the platforms you want to support. – bummzack Nov 16 '11 at 15:57
Oh sure, without any extra work I'd be. But a compromise could be reached, as long as I don't need to rewrite all the foundations for a game, adding more specialized code for touch interfaces would be completely acceptable. – Vic Goldfeld Nov 16 '11 at 16:20
Based on my experience, native games have far more performance than HTML5 ones on lower-end phones – Shvelo Apr 5 '12 at 18:16

The HTML5 libraries are surprisingly good especially considering its young age. There are solid 2D/3D engines that support particle effects, physics, and the like. However, there is nothing comparable to established and mature game engines such as Unity or the Unreal Engine.

Also HTML5 libs in my experience like to be event driven. For example sprites will have an onclick events and there will not really be a traditional game loop.

For performance native apps are much, much quicker than anything having to do with the HTML 5 canvas. That is the extent of my experience though, I have no idea about Appcelerator or Corona SDK.

However if your goal is more the "maximum number of platforms" than the "web standards" part, I suggest a solution such as Unity which works on almost everything and thanks to its built in editor is a very productive engine.

share|improve this answer

Tom here from Scirra, we make Construct 2 the HTML5 game maker.

We recently blogged about this, comparing HTML5 Canvas/WebGl/C++ DX performance. You can read about it here:

And here's the graph:

enter image description here

I know it's not a performance in comparison to native mobile formats, but it is a comparison to desktop native apps which should give some indication of the performance gap.

share|improve this answer

First and foremost, Corona SDK is lovely to work with. Lua's a great language, Corona's a very thorough framework, and the documentation's been great thus far.

In my opinion HTML5 game development isn't worth it yet. Both on desktop and mobile browsers. If your goal is to make an awesome game to run on desktops and mobile devices, then don't bother. If your goal is to make an HTML5 game, then go make it and use one of the frameworks people have mentioned (also look at Crafty or Gee for more of a drawing-type interface).

The primary reason is that when I make a game, I want to make a complete and polished game. Part of making a complete and polished game is good audio. Although the <audio> tag is supported on major browsers (assuming you provide enough different formats), managing your soundtrack programmatically with createElement is kind of a pain. SoundManager 2 is a band-aid, not a solution. In many cases it will just fall back on using a Flash object for desktops. At which point I ask, why not just make the darn thing in Flash?

On iOS, unless you use a hack like in Zynga's Jukebox library, you're actually limited to only playing sounds in response to user input. It's ridiculous.

Also, unless you're packaging your HTML5 game up as an app, people need a connection to play. The time I spend playing mobile games most is on the subway--no signal. And if you do package your game up, won't it be weird to not have sound? If I'm downloading a game I expect a certain level of responsiveness and polish. Read: a native app.

Until HTML5's further developed and mobile browsers are faster and HTML5 audio stops sucking, I will have fun playing with Javascript and <canvas> and all that, but I will not go so far as to produce a polished game with it. It boils down to what your goals are. Very few I know who play games and are not developers even have mobile HTML5 games on their radar. Again, if you want to make awesome HTML5 games, make HTML5 games. If you want to make and sell awesome games, make the quality of your players' experience a priority.

share|improve this answer
Requesting an update mid 2012 - has HTML5 game development improved? Is there still the performance gap and audio issues? – Andrew Aug 15 '12 at 8:36


Its not yet completely implemented. But once done, it might be the best :)

There are a few demos in that site, they are quite good...

Edit: Just checked, the demos are not mobile friendly...

share|improve this answer

As other answers have shown, the performance difference is quite large. However, there are new ways being used to get native web performance on the web (using Chrome).

MonoGame is an opensource implementation of the XNA framework which is designed to work across as many platforms as possible. When this is combined with Google Chromes NaCl (Native Client) the results are pretty amazing (requires chrome).

My advice would be build a native app in XNA or MonoGame and consider NaCl and/or ExEn to get your game onto other platforms. The vast majority of your code base will be the same for all platforms, but the down size is releasing your game will not have the simplicity of a HTML5 game.

HTML5, in my opinion, just isn't there yet in regards to usable performance but other options exist that almost rival HTML5s accessibility, though adding a bit more complexity (and cost in some situation) to the release of your game.

share|improve this answer
Oh my god, I thought NaCl was only for native C++ code, but it runs Mono too?! – David Gouveia Jan 2 '12 at 1:24

I highly suggest libgdx, its a java based framework mainly made for deploying on android and desktop, but recently has added html5 to its arsenal, I would heavily recommend it.

Some games ported to html5:

share|improve this answer

You might want to try PlayN. It's not very mature or well documented at the moment, and it takes some effort to get it working, but it allows you to program in Java and export your game to a number of different platforms (at the moment, Java, HTML5, Flash, Android and iOS, and in the future, Windows Phone 7).

The advantage it has over Corona, Phonegap, etc is that it compiles your game for each of the platforms rather than just running it using a virtual machine; this ensures that you get near-native performance on every platform.

share|improve this answer

Awesome answer and links - thanks!

I'm doing some benchmarking of my own (HTML5/JS and PhoneGap), and finding the same answer. HTML5 is just not there yet. I haven't played with any of the more 'exotic' answers like app*mobi, which claims to have a stripped-down browser optimized for gaming, but the general "Write your game in HTML5 and play it on a phone" plan is not viable at this point. It may get there, but I'm not sure. The browser is just not meant to be a rendering engine, and we're jumping through a lot of hoops to get there. I think instead we'll see someone come up with an alternative that gets critical mass, and that will take off. Time will tell.

I would love any feedback and constructive critique of my work, which is on GitHub and is free for all.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.