Chapter 8
Motion and Animation
In This Chapter
Understanding the basic physics principles used in gaming
Adding a force vector to your sprites
Using a force vector for space simulation
Adding drag and skidding behavior
Working with gravity
Building multi-image animations
Sprites move around on the screen. That’s the central part of most games. But if you’ve looked at Chapters 6 and 7, you’ve seen that the sprite motion was somewhat simplistic in those chapters. Now you find out how to add more zip to your sprites. You make sprites accelerate smoothly, slow down with drag, skid around corners, and fall off cliffs.
All of these fun effects are made possible by understanding a little about how things move in the real world. In school, they called that physics class. Don’t worry, though. This will be the most fun you’ve ever had with physics. We make missiles.
Physics — Even More Fun ...
Get HTML5 Game Development For Dummies 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.