This week, we've got a two-part Premium tutorial, detailing how to create an HTML5 Hangman game using the HTML5 canvas. You'll learn how to draw directly to the canvas (both simple shapes and animations using a stylesheet), how to play audio in a way that works on all modern browsers, how to use Local Storage to keep scores that persist even when the browser is closed, and how to implement both keyboard and mouse controls.


Premium Preview

Let's take a look at the final result we will be working towards:

HTML5 Hangman game tutorial
Click to play the demo.

It's easy to change any aspect of the game. Want to draw the hangman differently? You can tweak the drawing functions, or copy individual body parts from a separate image sprite sheet. Want different music or animation? No problem, just replace the files. Want to give the player more (or fewer) chances per word, to alter the difficulty? That's easy too. And of course you can change the list of words.

Every concept and each line of code is explained, so you're not just learning how to create a Hangman game - you're learning how to code in JavaScript with the HTML5 APIs.


Read the Full Tutorial

Premium members can access the full two-part tutorial right away!