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:

If you had to choose between supporting the keyboard or the mouse, which would you choose?

2:

What do you have to do differently in a game to support trackballs?

3:

Why is it important to extract information from the lParam argument when responding to a mouse message?

Exercises

  1. Experiment with different values for the _iMAXSPEED global variable in the UFO program example to see how it affects the flying saucer's speed.

  2. Modify the UFO program example so that you can click and drag the mouse to move the flying saucer around.

  3. Modify the UFO program example so that the flying saucer wraps off the screen and appears on the other side when it reaches a side edge.



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