O'Reilly logo

Beginning Java SE 6 Game Programming, Third Edition 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

Chapter 7. Sprite Animation

This chapter adds a significant new feature to your Java toolbox—the ability to load and draw animated sprites and apply that knowledge to an enhanced new sprite class. You will learn about the different ways to store a sprite animation and how to access a single frame in an animation strip, and you will see a new class called AnimatedSprite with some serious new functionality that greatly extends the base Sprite class.

Here are the key topics we’ll cover in this chapter:

  • Sprite animation techniques

  • Drawing individual sprite frames

  • Keeping track of animation frames

  • Encapsulating sprite animation in a class

Sprite Animation

Over the years I have seen many techniques for sprite animation. Of the many algorithms and implementations ...

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