HTML5: The next level for web games
Gaming is no longer all about consoles. Welcome to HTML5 gaming!
Gaming is no longer all about consoles. Web games have gone from being the domain of bespectacled nerds to the salvation of the chronically bored masses. As game authors set the bar increasingly higher and tax our browsers to the limit, a new contender enters the eternal web format wars. To make a difference, it’s going to have to be fast, good-looking and feature-rich.
Every webpage you have ever visited was written in a special computer language called HTML, or ‘HyperText Markup Language’, which tells your browser what to display, where to display it and how it should look. As it’s the language the runs the entire Internet it’s pretty important that everyone is speaking it in the same way, and for this reason HTML is a standardised language with a static set of features. The last update to the standard was in 1997 with HTML 4.0, and back then the web was a much simpler beast. No-one watched videos on YouTube and no-one chatted on Facebook, and it was impossible to see how the web would evolve and to design HTML with this in mind. Almost fifteen years of progress later and HTML 4.0 just doesn’t cut it for building web sites to the standard we’ve come to expect.
HTML5 is the name given to a collection of new technologies, championed and standardised by web watchdog the World Wide Web Consortium, that updates the core technology that lies at the very heart of the web. Offline storage, rich browser-site communication and all-new graphical effects are among the features that will be landing in browsers soon, if not already: up-to-date users of Firefox, Chrome and Opera can start using HTML5-enabled sites immediately.
It hasn’t been around for long and not every web browser supports it, but HTML5 has already begun making ripples in online game development. HTML5 effectively adds a ‘canvas’ to the web, allowing game developers to ‘draw’ shapes and sprites to the screen just like in conventional programming. This has also opened the way for 3D graphics directly in the browser without the need for any third-party plugins like Flash through a yet-to-be-standardised technology called WebGL. Couple this with the myriad of improvements in JavaScript, the programming language that makes the web interactive, and suddenly game developers have a new, usable platform for making online games.
But HTML5 is entering an already saturated playing field. With Adobe’s Shockwave Flash by far the most popular platform, and Microsoft’s Silverlight and Java being less widely used alternatives, it might be hard to see what room there is for another way of creating and deploying online games. HTML5, however, has some significant advantages over the competition. Because HTML is the part of the very fabric of the web the content is rendered right in the browser without the need for any third-party plugins or extensions. This is of particular advantage to phone users: HTML5 is already supported on the iPhone and iPad (where Flash isn’t allowed to tread) and on Android phones, and games built using it can be played on all three without modification.
HTML5’s strength is also unfortunately it’s downfall. When it comes to displaying the graphics and running the game the browser is strictly in charge, but this also means that the browser sets the limit of what’s possible. Flash outperforms HTML5 in a number of key performance areas because it can be given access to a computer’s graphics card via ‘hardware acceleration’, and because Flash runs the game and moves the screen around simultaneously where HTML5 and JavaScript do them one after the other it can handle more taxing graphical effects and physics. Browsers get better every day, but developers still have to work hard to match the performance of Flash whilst still having visuals that look as sweet.
But there is some good news for developers. To write a game for Flash or iPhone needs specialist software which, naturally, Adobe and Apple charge large sums for. HTML5, however, is a free and open standard, meaning that anyone can start using it without having to buy licenses or programs. This is great for the home developer and opens up the world of online games to anyone and everyone who wants to have a go at making their own. Plus, there are already scores of specially-built libraries that can make writing a game significantly easier and quicker than starting from scratch. The community at Internet news site reddit.com have compiled a large list of available libraries that solve problems in key areas like game physics, graphics, animation and sound, so there’s no excuse for the budding developer not to give HTML5 a go.
Five HTML5 games to try:
- Pirates Love Daisies The most impressive title in this list! A fully-featured tower-defense game that’s just as fun and good-looking as any Flash title.
- This Shell Cool jigsaw game where the pieces are a live music video!
- Z-Type Awesome-looking typing game. Type the words to shoot the incoming aliens.
- The Legend Of Sadness Zelda-inspired RPG game. Short and looks a bit weird, but fun nonetheless.
- Torus 3D rotating Tetris! A moden twist on the classic.