I would like to write a game that could be played on smart phones and was wondering if HTML5 might be a way to write games to work on a wide selection of smart phones.
|
I just ran the HTML5 test:
So as you can see, the iPod/iPhone and Android are very much neck-and-neck and seem to support a decent range of HTML5 features. Canvas is great for 2D browser graphics and the audio element would probably be great for playing background sounds and music, and it's also really cool to see that both platforms support storage (though you could always just use cookies of course, depending on the size of a game save). So overall I'd say you should go for it. The numbers aren't everything; as wkerslake said "none of these numbers inspire confidence" but if you look through what is supported, it seems to be everything you need! I say go for it! I wish you the best of luck. By the way, you might want to watch for Vanthia. It's a browser game which utilizes canvas for efficient drawing. I got to play the closed beta and it was sure coming along! The developer has said very little for over half a year now, except that he is definitely developing it but just keeping things somewhat secret. You could also get some ideas from Google's recent Pacman interactive logo. It wasn't very HTML5 but it sure was functional! It shows that you don't actually need HTML5 to make a browser game (and I think HTML5 is being thrown around as a buzzword far too much, just as AJAX was or still is). There is a github project with a deobfuscated, cleaned up version of the source that you can look through and play with. |
|||||||
|
|
HTML5 is a long way from being ubiquitously supported even in web browsers on PC much less phones. These numbers are based on the html5test
None of those numbers inspire confidence |
|||||||||||||
|
|
It might seem a little late but I'd like to provide an update on the situation for HTML5 and the mobile browsers now that some time has passed. Lately, quite a few game engines have been developed that will produce HTML5 compatible games (see: Construct 2 and Game Maker Studio). Both produce OK performance but there has been notable issues with physics extensions and fast moving objects on some platforms. iOS still takes the lead when it comes to performance but Android has come a long way with the latest Chrome builds. It should be noted that Dolphin Browser on Android totes even 100% increase in HTML5 performance, as well! You can see a quick comparison done for a test below:
If you're looking to do manual optimization, there's some great advice listed here. Also, with HTML5 games becoming increasingly popular and allowed on sites like Kongregate and previously other flash exclusive game portals - there's no reason to be afraid of writing HTML5 based games anymore for a mobile device. A few libraries exist as well to keep things easy to use on mobile, I've listed a couple below: |
|||
|
|
|
From the technical point of view it's certainly doable. There are some problems/pitfalls though:
|
|||
|
|
|
Found a good post about iPad and HTML5: http://mir.aculo.us/2010/06/04/making-an-ipad-html5-app-making-it-really-fast/ Also I would avoid heavy canvas drawing on iPad, for some reason it seems to be pretty slow. |
||||
|
|
|
You can use PhoneGap Build: Just upload a zip file with the HTML5 code and it will give you the application for: Android, iOS, winphone, Blackbarry, Symbian ..ecc.. |
|||||||
|
