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.

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.bartnettNov 16 '11 at 15:53

1

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.
–
bummzackNov 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 GoldfeldNov 16 '11 at 16:20

1

Based on my experience, native games have far more performance than HTML5 ones on lower-end phones
–
ShveloApr 5 '12 at 18:16

8 Answers
8

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.

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.

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.

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.
http://code.google.com/p/libgdx/

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.

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.