HTML5 games have become quite popular in recent years, especially now that many of the major browsers like Chrome, Firefox, and IE9 have GPU support for gaming in the browser. Accelerated GPU support and the versatility of HTML5 ensure that games written for them can be high quality, enjoyable, and entertaining games- in fact, HTML5’s robust capabilities mean that it can have design complexity that rivals even some games written in more traditional game programming languages. Like any other development project, however, HTML5 games have best practices and recommendations that you can follow to make your game process easier and the finished project a bit more polished than it might otherwise have been!
1. Pick The Right Framework
Picking the right framework is essential to the success of any project. There are some developers out there who want to go it solo and create games from scratch. It’s not impossible by any means, but it is a great deal harder- there’s a fair bit of every HTML5 game that is essentially boilerplate code, and the truth of the matter is there’s not a whole lot of value in redoing all that boilerplate code yourself unless you’re doing it for the learning experience. When you’re looking to write your HTML5 game, find a framework that does as much of the heavy lifting that you need to do as possible, and take the shortened time frame that gives you to work on the core mechanics of the game that frameworks can’t provide. Also make sure the framework you pick uses the coding style that you’re most familiar with.
2. Take Advantage Of HTML5’s Capabilities
Don’t forget that HTML5 has many capabilities that you should utilize when designing for a gaming audience. People expect more from HTML5 due to its more complex capabilities, and you shouldn’t disappoint. For example, many Flash games already have an option for saving a player’s progress. Take it a step further by offering automatic saving of their progress or multiple save slots. HTML5 supports local DOM storage, so you can be flexible and offer your gamers save options that normally they’re only used to in local, installed games on their hard drive. You can also use profilers to optimize HTML5 games to the browser they’re using, making sure every user gets the best performance they can get. There are quite a few powerful capabilities that HTML5 boasts, and it’s up to you to make sure you use them right for your audience!
3. Consider Your Supported Devices
With the advent of many HTML5-enabled mobile phones and tablets, it’s important that you take into account your game and how you want it to play on different devices. Depending on the type of game and its complexity, you may decide that you don’t want to support touchscreens, tablets, and mobile phones because of the limited screen real estate. If it’s a simpler game, however, you might want to expand compatibility to ensure that as many people as possible can play the game and enjoy it. Regardless of the decision you make, however, you need to make one before you start developing, otherwise you’re going to run into problems with graphics design decisions and UI decisions for your HTML5 game.
4. Expand On Browser Game Tradition
Browser games have traditionally been the realm of the casual gamer- Flash games are little distractions that can be completed in a few minutes or hours, like tower defense games. HTML5, however, allows for far more complexity in your games: you’re not limited by Flash, but only by your own imagination. Complex RPGs or strategy games aren’t outside of the realm of possibility for HTML5, and there’s no limit to the depth your game can achieve. When you’re designing HTML5 games, don’t feel limited by the casual gaming space- make your game and your design philosophy much as you would if you were developing a game using a more traditional programming language and aimed at a more traditional audience and platform.
5. Leverage The Connection HTML5 Provides
HTML5 allows for games with the depth and complexity of traditional games, but it also has features and capabilities that other games might not have. With HTML5, you can take advantage of the power of the Internet and use it to make your game more intriguing. Have your game connect with Facebook and share progress stats with friends if users want to. You could have it connect to Dropbox to share save games, or have it download locally and auto-update for people who want to play the game on the road. HTML5 means that you have connectivity and access to all sorts of APIs and services- make sure you leverage them to make your game the best game it can be!
HTML5 is a powerful language that allows for all sorts of game development. Sometimes, however, beginning an HTML5 game can be a very daunting task, and often inexperience or poor decision can lead a beginning project to become delayed from the very outset or end up being just a bit less amazing than it could otherwise have been. Following some best practices and development ideas while you begin to think about your game could save you a great deal of time and help make sure your game not only the best game it can be, but the game you truly envisioned when you set out to design it!