O'Reilly logo

Learning Android Game Programming: A Hands-On Guide to Building Your First Android Game by Richard A. Rogers

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

6. Animation

Now the fun begins in earnest as we take a look at animating our sprites. Although some games don’t use animations, almost any game can be enhanced by introducing animated figures.

Requirements for Animation

When we talk about animation in games, we’re talking about sprites that change form as they move during the game’s action. In the context of AndEngine, animations are distinct from simple translation and rotation of objects, where the form of the object doesn’t change, even though it’s moving. Rotation and translation were covered in the discussion of Modifiers in Chapter 4.

To animate an object, we need to display frames that represent the object’s form—one frame at a time, with each frame shown for a set time. Our eyes and ...

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