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

5. Making Things Move

Rex van der Spuy
(1)
Ontario, Canada
 
It’s almost curtain time! Your sprites are all dressed up, they’ve memorized their lines, arrived punctually at the rehearsal hall, and are standing patiently on the stage waiting for you to direct them. Now what? You need to animate them!
There are two main ways of animating sprites in games:
  • Scripted animation: Make the sprite move around the screen.
  • Keyframe animation: Change the appearance of a sprite. Display a series of slightly different prerendered images, in the same way that you would do hand-drawn cartoon or flipbook animation.
Keyframe animation is about animating ...

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.