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:

Why is it necessary to first hide the target sprite before checking to see if the player clicked the mouse on a guy sprite in the Battle Office game?

2:

What is the purpose of the MouseMove() function in the Battle Office game?

3:

Why isn't it necessary to respond to sprite collisions in the Battle Office game?

Exercises

  1. Modify the _iGuyMasterDelay global variable in the Battle Office game, and notice how it impacts the difficulty level of the game. Keep in mind that this variable only affects the period of time that the stationary guys appear in the game.

  2. Modify the Battle Office game so that the velocities of the moving guys increase as the game progresses, effectively making them harder to shoot. You'll find out that you'll also have to modify the delay for each of the moving guys as you modify their velocities because their delay keeps them from wrapping around the screen and appearing again on the other side.



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