Workshop


The Workshop is designed to help you anticipate possible questions, review what you've learned, and begin learning how to put your knowledge into practice. The answers to the quiz can be found in Appendix A, "Quiz Answers."

Quiz

1:

What's the difference between a meteor, a meteorite, and a meteoroid?

2:

What is the purpose of the m_bOneCycle member variable in the Sprite class?

3:

How do you destroy a sprite and have it removed from the sprite list in the game engine?

Exercises

  1. Modify the calculation of the score and difficulty level so that the Meteor Defense game lasts a little longer and allows you to attain higher scores.

  2. Modify the game so that you lose points and temporarily lose the ability to fire from one of the guns if the gun is hit by a meteor. You don't need to change the guns to sprites in order to add this feature ”just use the position of the meteor when it is destroyed to determine if it hit one of the guns.



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