Share

Tags

License

This blog post is licensed Creative Common Attribution Required v4.0.

HTML5 gaming: the future is now

1
Official Construct Post
Ashley's avatar
Ashley
  • 9 Nov, 2011
  • 903 words
  • ~4-6 mins
  • 2,665 visits
  • 0 favourites

Today, there were two surprise news stories: Adobe ceasing development of Flash for mobile in favour of HTML5, and that it was likely Microsoft will drop Silverlight in favour of HTML5. It's obvious now: the future is HTML5, and in fact, in many ways that future has already arrived!

Try playing our old Space Blaster HTML5 game demo in Google Chrome 15 or newer. It's hardware-accelerated for super-fast rendering. It uses the new Web Audio API (edit: not yet standardised, it's Google's own project) for reliable audio playback, which can also do effects like spatial audio and reverb that we plan to add support for soon. And with Chrome's excellent V8 javascript engine, peformance is great all the way through.

In other words, Chrome has proven it: HTML5 is great for games! They're fast, they look good and they sound good.

Other browsers have a bit of work to do to catch up. There's no sign of the Web Audio API in Firefox or Internet Explorer yet, so audio is still a bit unreliable in those browsers which can often make the experience less enjoyable. (Edit: I didn't realise it's not a full standard yet, Web Audio API appears to be Google's project. However, it's great so I'm hoping it does get standardised!) Firefox seem to have some issues with their hardware acceleration too, but either they'll fix it soon or we'll add WebGL support which will get around it.

There are some other problems that a critic could point out: mobiles have a way to go yet, for example. They do, but this is a problem time will fix. The entire industry is heading for HTML5, and it's getting to the point where anyone who isn't going full steam ahead on HTML5 will be left behind. The standards committees behind HTML5 are aware of the problems and are working hard to get new standards written up to address all the problems and missing features of HTML5. So it probably won't have these issues for long.

Even Sony's PSP Vita is planned to have HTML5 support, so there are signs even consoles are heading this way.

Back to the progress that needs to be made, though. From our point of view, there are three major areas support for HTML5 has to improve to make it the platform of the future, and for gaming especially. The first I already mentioned - mobiles have a way to go yet before they're practical for high-performance gaming. The hardware in most mobiles is perfectly capable. It's only the software which isn't there yet, since it doesn't make full use of the phone. I'm sure mobile browsers will improve soon, and since software updates can apply retroactively, even old devices should benefit.

Second is desktop browsers need to keep up with the rapid development of standards. Chrome are setting an excellent example by being first to support the Web Audio API. Before the Web Audio API, audio was a difficult problem in HTML5 games, but the Web Audio fixes it very well indeed.

The third is Internet Explorer. Unfortunately, not much has changed: Microsoft still have a very slow release cycle. Worse, they seem reluctant to support new standards like WebGL, and they seem more interested in ignoring it than helping to resolve the issues they pointed out like all the other browser makers have been doing. I'm also unaware of any comment at all from Microsoft about the Web Audio API (edit: wouldn't expect them to until it's standardised). This makes me question their commitment to HTML5. The web is clearly a big threat to the established Windows platform. Imagine if apps are all written for the web and run anywhere, without any need for Windows! Is their priority to make the most of Windows or to make the most of HTML5? I have a feeling they'll still be trying to push Windows, at the expense of HTML5. Perhaps this is why they don't seem bothered by the fact very few of their users are upgrading to the latest Internet Explorer version, while browsers like Chrome automatically keep you on the latest version.

We're particularly interested in WebGL not because of 3D, but actually for 2D gaming. WebGL is even better for 2D games than the 2D canvas, for two reasons: first, you're pretty much guaranteed hardware acceleration - no slow software renderers. Second, WebGL means using shaders for effects. If you used Construct Classic much, you'll have seen the 67 shader effects that ship with it and can easily make beautiful and eye-popping effects in 2D games. None of this is possible in the 2D canvas. Everything from subtle blends like Screen, gaussian blurs, glassy distort effects and stretching warp effects make for incredibly creative and immersive 2D games probably unlike many 2D games you've ever seen. This is why we can't wait to support WebGL, and why we're particularly disappointed with Microsoft's reluctance to support it. Still, it's their loss! It would mean 2D games just look far better on all browsers other than Internet Explorer.

So, if you want a taste of the future today, download the latest version of Google Chrome and try some of our HTML5 game demos. I hope you see how promising the HTML5 future is! And if Adobe are giving up on Flash for mobiles in favour of HTML5... how long until they do the same for the desktop?

Subscribe

Get emailed when there are new posts!