HTML5 Game Definition
What Are HTML5 Games?
With HTML5, fun web games can be played across a huge range of devices from desktop PCs to smartphones and tablets by simply entering a URL or clicking a link in the web browser.
Web Games Before HTML5
Prior to HTML5, Adobe Flash was the main technology used to create web based games. Flash however was never properly supported in mobile browsers and Apple blocked it from being used in the browser on their devices, which was a big factor in the web player eventually being discontinued.
Another plugin based choice was the Unity web player. As plugin-in based solutions fell out of favour, Unity discontinued theirs in favour of an HTML5 export solution.
Input Devices & Controllers
HTML5 can utilise a broad range of input devices, including keyboard, mouse, touchscreen and even traditional gaming controllers such as joysticks, gamepads and steering wheels via the Gamepad API.
Browser vendors are essentially left to choose how to interpret and implement the ever changing HTML5 standards. This can make cross-browser compatibility and testing across all target platforms tricky.
HTML5 Game Development
Although it's entirely possible to create simple HTML5 games from scratch using only free tools, commercial alternatives can offer more features to help streamline the process for more involved projects, from asset creation to programming and final game build.
HTML5 Game Engines, Frameworks & Tools
A plethora of free and paid game specific libraries, frameworks & engines are now available for HTML5 game development.
Some of the currently available options for making HTML5 games are:
- CreateJS - A suite of free libraries, designed to integrate with Adobe Animate, for building HTML5 multimedia content. (open-source)
- PixiJS - Fast, free, fully featured, WebGL accelerated 2D canvas graphics library. (open-source)
- Three.js - One of the few 3D graphics libraries. (open-source)
- Howler.js - Fully featured Web Audio sound player library, with HTML5 Audio fallback. (open-source)
Complete Game Engines & Frameworks
- Phaser - Popular free 2D HTML5 game framework. (open-source)
- Constuct - Self contained game creator software that builds games as HTML5. (commercial)
- Euge.js - Easy to use and powerful 2D HTML5 game engine. Includes lots of high level game specific features.
- ImpactJS - One of the very first 2D HTML5 game engines. (previously commercial, now open-source)
Final Build Packaging
HTML5 games have to load individual assets, much the same as a standard website page would. They are not packaged in a single file.
Building HTML5 Games As Software Applications
Third party tools have enabled HTML5 games to be built as stand-alone offline software applications. This means HTML5 games can now be built 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 game performance not being up to par, when compared with games applications created using other technologies.
Some of the tools that can be used to build HTML5 games as software applications are: