Welcome
In this tutorial, you will learn how to make your own video game, using JavaScript and the new HTML5 Canvas element.
Format
This tutorial is split up into 10 individual modules, each with a specific goal in mind. The modules build off each other one step at a time, and at the end, you should have a working Asteroid Dodger game completed!
What You'll Need
You will need a modern web browser (such as Google Chrome), and a code editor (such as Notepad++, for Windows, or TextWrangler, for Mac).
Debugging Tips
- All JavaScript code is case-sensitive. Make sure that every letter of your code matches the casing as seen in the instructions.
- Keep an eye out for all symbols such as parenthesis, periods, commas, quotations, and semicolons.
- The semicolon at the end of every JavaScript statement is the easiest symbol to forget.
Note about whitespace:
For the most part, JavaScript doesn't care about whitespace (spaces, tabs, and carriage returns). In fact, it's actually encouraged for you to use as many spaces, tabs, and carriage returns as necessary to make your code easy to read. For example:
Without Whitespace
With Whitespace
Which is easier to read?