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 is the purpose of the _pChickenSprite member variable in the Henway game?

2:

How is the SpriteCollision() function used in the Henway game?

3:

How does the Henway game know when the chicken makes it across the highway ?

Exercises

  1. Modify the Henway game so that additional car sprites are added to make the game harder. (Hint: You can use the score as the basis for adding these sprites and making the game harder over time.)

  2. Modify the background image for the Henway game so that there are limited spaces in the Finish Area for the chicken to finish. Then modify the code in the game so that the chicken is only allowed to move into the new spaces. This change effectively makes Henway play more like Frogger, and adds a bit more challenge to the 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