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 doesn't the Brainiac game support the keyboard or joystick?

2:

Why can't the Brainiac game keep track of its state with a single 4x4 array?

3:

Why is it necessary to keep up with the number of matches in the Brainiac game?

Exercises

  1. Replace the tile images in the Brainiac game with some images of your own. Feel free to modify the existing tile images if you want to make sure that you get the tile size right, or you can resize the entire game screen if you want to go with different sized tiles.

  2. You've probably noticed that the Brainiac game doesn't provide a means of starting a new game without closing the program and restarting it. You also might have noticed that the game doesn't distinguish between left and right mouse button clicks. Modify the game so that the game is played via the left mouse button, while the right mouse button is used to start a new game.



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