From the course: HTML, CSS, and JavaScript: Building the Web

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Space game project: The HTML canvas element

Space game project: The HTML canvas element

From the course: HTML, CSS, and JavaScript: Building the Web

Space game project: The HTML canvas element

- [Instructor] Hello and welcome back. This is lesson five of chapter five on advanced app development. In the previous lesson, we basically were looking at our second project, the space game, and we had a really quick look at how the game performed. We did our three-step exercise of building it, dissecting it, and then figuring out what the different components of HTML and JavaScript. But because this is such a complex game, we're actually going to do two breakout lessons from it that deconstruct the JavaScript. In this lesson today, we are going to look at one of the new concepts that you may not have encountered before, which is the Canvas API. So if you look at the HTMLs, let's go back and open that up again. You will notice that in this particular application, your space game looks something like this, and I'm actually going to reload it from scratch. So our space game is really just this giant black canvas, which has a single sentence on it. And if you look at the HTML…

Contents