Chapter 7

Game Sprites

This chapter is one of the most important in the book. It’s where we transition from making games to making video games. You’re going to learn how to make a versatile display system with canvas that you can use to move game objects around the screen using a mouse, keyboard, or touch interface. This system will form the basis for the rest of the games and projects in this book.

Here’s what you’ll learn about in this chapter:

  • Sprites: Things that move around the screen.
  • Displaying sprites using canvas.
  • Changing a sprite’s properties: Its position, size, rotation, visibility, and transparency.
  • Creating an animation loop to ...

Get Foundation Game Design with HTML5 and JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.