Capturing User Input

Now that you have a solid understanding of how graphics are created and how you can animate them, some player interaction is in order to turn your visuals into playable, interactive content.

I’ll discuss using both mouse and keyboard controls to capture user input, and you’ll view a few practical examples that show how to accomplish some common gaming features. Text will also be introduced to display the necessary messaging to provide feedback to the player.

Mouse Events

EaselJS not only handles your canvas drawing, but also the management of mouse positions and actions, and whether they intersect with any of your ...

Get Beginning HTML5 Games with CreateJS now with O’Reilly online learning.

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