© Rex van der Spuy 2015
Rex van der SpuyAdvanced Game Design with HTML5 and JavaScript10.1007/978-1-4302-5801-8_6

6. Interactivity

Rex van der Spuy
(1)
Ontario, Canada
 
Welcome to the greatest-hits countdown of the most important pieces of game code you need to know to add interactivity to your sprites. Now that you know how to make sprites move, you’re going to learn all about how to make them interact with the game world they live in.
You’re also going to learn how to create two of the most useful interactive objects for games: clickable buttons and draggable sprites. Everything you need to know about adding rich interactivity to your game world is right here in this chapter.

Keyboard, Mouse, and Touch

The first step to adding keyboard, mouse, or ...

Get Advanced Game Design with HTML5 and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.