O'Reilly logo

Foundation Game Design with HTML5 and JavaScript by Rex van der Spuy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9781430247166_CO-01.jpg

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required