Hour 18. Creating Backgrounds for Your Sprites


Hour 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

  • About the three main types of backgrounds

  • How to add support for backgrounds to the game engine

  • How to use an animated background with animated sprites to simulate an asteroid field



Sams Teach Yourself Game Programming in 24 Hours
Sams Teach Yourself Game Programming in 24 Hours
ISBN: 067232461X
EAN: 2147483647
Year: 2002
Pages: 271

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net