Chapter 8. Animation

[ LiB ]

Chapter 8. Animation

Do you remember all those parameters named [frame] that we left set to 0? Well, those parameters are very useful once you understand what they are there for, and that is what this chapter is going to teach you. You are going to learn the sweet skill of animation.

As you know, each iteration of the main loop produces one image frame of the actual game. When the image frames are drawn in rapid succession, it seems as if the images on screen are moving fluidly. With the type of animation introduced in this chapter, you will learn how to simulate movement onscreen; for example, you can animate a character and make it appear as if he is walking.

Let's get straight into the meat of the chapter. First things first, we need to go over bitmaps again. "Again!" you may say, but this time we are using bitmaps in a different way.

[ LiB ]


Game Programming for Teens
Game Programming for Teens
ISBN: 1598635182
EAN: 2147483647
Year: 2004
Pages: 94
Authors: Maneesh Sethi

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