O'Reilly logo

HTML5 Game Development For Dummies by Andy Harris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8

Motion and Animation

In This Chapter

arrow Understanding the basic physics principles used in gaming

arrow Adding a force vector to your sprites

arrow Using a force vector for space simulation

arrow Adding drag and skidding behavior

arrow Working with gravity

arrow 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required