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 16. Creating a Sprite/Actor Class

What You’ll Learn in This Hour

• The difference between a prop and an actor

• Encapsulating sprite functionality in a class

• Testing the Sprite class in the referenced engine project

A sprite, from a video game perspective, is an individual, distinct game object that can be moved or drawn separately from the background. I hesitate to use the word “object” because a sprite can be nothing more than scenery that the player can only see but not touch. For instance, a cloud might be treated as a sprite, without having any interaction with the player. In this hour, you learn how to encapsulate the basic functionality of a sprite that will make it possible to begin writing gameplay code on the Android platform. ...

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