O'Reilly logo

Sams Teach Yourself Android Game Programming in 24 Hours by Jonathan S. Harbour

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

Hour 17. Frame Animation Using a Sprite Sheet/Atlas

What You’ll Learn in This Hour

Animating with a single strip

Drawing frames from a strip image

• Animating with a sheet (atlas)

• Testing sprite animation

Animating with a Single Strip

There are many ways to do frame animation in a video game. Perhaps the simplest method is to load each frame from a series of bitmap files with one frame per file. Using this technique, an array or list stores the frames. Another technique might involve a custom database (random access file) containing frames stored as binary data. For instance, it is possible to store all the bitmap files for an animation in a ZIP archive and then read them using a ZIP library. (The Java Archive utility, called JAR, uses ...

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