What Are HTML5 Games?
HTML5 Game Definition
HTML5 games are predominantly played in the web browser and are compatible with a wide range of devices, from desktop computers to smartphones and tablets.
Downsides of HTML5 Games
Although it has the advantage of providing the ability to play on mobile devices in the browser, HTML5 has some significant downsides when compared to plugin based technologies.
Most of these issues arise from the fragmented nature of the various browsers used to play. Many of these browser related issues can now be overcome by using tried, tested and actively maintained libraries and engines to make games.
Some of the main issues are:
Computers with an outdated browser installed may not be able to play HTML5 games. A modern compatible browser that supports all the features the game needs has to be installed in order to play.
This can prove especially problematic in situations such as where older PCs are used to play, e.g. in corporate environments where they have outdate operating systems and browser software installed with no way to upgrade.
Browser Updates Can Break Content
Browser vendors are essentially left to their own devices when choosing how to interpret and implement the ever changing standards. This means updates to browser software can have adverse effects on games when running in that particular browser.
This can in some instances mean updates to games are required down the line to fix these issues if/when they arise.
All Assets & Code Are Loose Files
HTML5 games have to load individual assets, much the same as a standard website page would. They are not packaged in a single file. This makes it easy to download loose asset and code files in an easily readable and usable format.
Audio, video and code assets could be stolen and reused without permission. This can be particularly problematic if a game uses licensed assets created by a third party.
HTML5 Game Development
Although it’s possible to make HTML5 games by writing from scratch, existing libraries/engines not only help speed up the HTML5 game development process, but handle cross-browser compatibility for you. This can be done via a collection of individual code libraries to handle individual task, or an all-in-one, game specific engine.
Game Engines, Frameworks & Tools
A plethora of code libraries and game specific frameworks & engines are now available for HTML5 game development. Even commercial 3D game engines, such as Unity and Unreal can now be used to make HTML5 games for use online (although still fairly experimental in most cases, for 3D games and needing a hefty machine to run graphics heavy content).
Some of the currently available options are:
- PixiJS – Fast, fully featured, WebGL accelerated 2D canvas graphics library.
- Three.js – One of the few 3D graphics libraries.
- EaselJS – A graphics library based around the Adobe Flash animation timeline.
- Howler.js – Fully featured Web Audio sound player library, with HTML 5 Audio fallback.
Complete Game Engines & Frameworks
- Constuct 2 – Self contained game creator software that builds games as HTML5
- Euge.js – Easy to use and powerful 2D HTML5 game engine. Includes lots of high level game specific features.
- Phaser – Popular 2D HTML5 game framework.
- ImpactJS – One of the very first 2D HTML5 game engines.
Building HTML5 Games As Software Applications
Third party tools have enabled HTML5 content to be built as stand-alone offline software applications. This means HTML5 can now be used to make games as Windows PC executables and mobile apps for offline play.
In fact some commercially released computer games have already been developed this way.
Using this method does have the downside of performance not being up to par, when compared with game applications created using other technologies.
Some of the tools that can be used to build HTML5 games as software applications are: