Summary


This hour explained the basic kinds of animation used in games , including sprite animation, which is also known as cast-based animation. This hour took a significantly closer look at sprite animation by guiding you through the development of a sprite class that can be used to inject sprite animation into your games. The Sprite class that you created supports standard sprite features such as a bitmap, position, and velocity, as well as a handy bounding rectangle feature for controlling the area in which a sprite is allowed to travel. The hour concluded by putting the Sprite class to work in a program example that demonstrated how to create and use sprites .

Hour 11 builds on your newly created sprite code by beefing up the game engine to support interactions between sprites. More specifically , you develop a sprite manager that is capable of detecting and responding to collisions between sprites. You also improve upon the paint mechanism you've been using so that your future games don't suffer from the flicker that is inherent in sprite animation.



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