Chapter 10. Making Things Move with Sprites

The previous hour mentioned that sprite animation is the predominant form of animation used in two-dimensional games. This hour moves from theory to practicality by showing you how to design and build an all-purpose sprite class that will allow you to incorporate sprite animation into any program. You will end up reusing the Sprite class developed in this hour in every program example and game throughout the remainder of the book, so it’s safe to say that it represents one of the most significant programming milestones in the book. Fortunately, the Sprite class is not very complex, and it serves as a great example of how sprite animation doesn’t have to be complex. In fact, once you create the Sprite ...

Get Sams Teach Yourself Game Programming in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.