O'Reilly logo

Sams Teach Yourself Game Programming in 24 Hours by Michael Morrison

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 18. Creating Backgrounds for Your Sprites

If you’ve ever watched an animated movie, you are familiar with the importance of backgrounds. If you pay careful attention the next time you watch an animated movie, notice how the characters move on top of a background that doesn’t tend to change much. This is because the characters are overlaid on the background, very much like sprites. Although you’ve already seen how to use an image as a background, this hour shows you how to create a general background class that you can use in your games. Not only that, but you learn how to create animated backgrounds that can be used to display a starry night complete with twinkling stars.

In this hour, you’ll learn:

  • Why backgrounds are so important in games ...

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