PROJECT PREVIEW: THE CLICK RACE GAME


In this chapter's game project, you will learn how to develop the Click Race game. The object of this game is for the player to use the mouse to click on a pair of buttons as many times as possible in a 30-second period. To make things more challenging, the game forces the player to alternate the clicking of each button. To play well, the player must be not only a fast clicker but also good at quickly and accurately moving the mouse.

The Click Race game starts up as shown in Figure 2.1. The game buttons that the user must click to score points are located at the bottom of the game window and are disabled (grayed out).

image from book
Figure 2.1: Starting up the Click Race game.

To begin playing, the player must click on the Start Game button. When this happens, the game button located at the lower left-hand corner of the window is enabled as demonstrated in Figure 2.2.

image from book
Figure 2.2: Players score points by clicking on the currently active game button.

The player scores a point by clicking on the button. Once clicked, the game button is disabled and the other game button is visible throughout the game. The final score remains visible after game play has ended, as demonstrated in Figure 2.3.

image from book
Figure 2.3: To score another point, the player must click on the second game button.

The Click Race game gives the player 30 seconds to accumulate as many points as possible. Game play stops at 30 seconds when both game buttons are disabled. The total number of points scored by the player is displayed as demonstrated in Figure 2.4.

image from book
Figure 2.4: Game plays ends at 30 seconds when both game buttons are disabled.

By the time you have created and run this game, you'll have learned how to exercise dynamic control over Windows controls by responding to events generated by the player. You will also have learned how to work with the Visual Basic Timer control.




Microsoft Visual Basic 2005 Express Edition Programming for the Absolute Beginner
Microsoft Visual Basic 2005 Express Edition Programming for the Absolute Beginner
ISBN: 1592008143
EAN: 2147483647
Year: 2006
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net