Chapter 7. Physics
Physics, or some approximation thereof, often plays a role in sprite-based animations, especially games. This chapter discusses fundamental physics used in a wide variety of animations:
• Gravity
• Nonlinear motion
• Nonlinear animation
From Sonic the Hedgehog to Cut the Rope, gravity is prevalent in video games, so we start with three of the most common applications of gravity: falling, projectile trajectories, and gravity applied to harmonic motion.
Harmonic motion provides the mathematical dropback for things such as springs and swinging pendulums. After an introduction to harmonic motion, we explore warping time to implement effects such as ease in, ease out, oscillations, and bouncing.
Let’s begin by looking at the weakest ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access