Copyright
by
The
Goodheart-Willcox
Co.,
Inc.
168 Introduction to Video Game Design
96. Close the Object Properties dialog box for the OBJ_Spider object.
97. Open the Object Properties dialog box for the OBJ_Wall object.
98. Add a create event.
99. Drag the Set Lives button from the Score tab and drop it into the Actions: column.
100. In the Set Lives dialog box, enter 3 in the New lives: text box, leave the Relative check
box unchecked, and click the OK button to save the action. This gives the player three
lives at the beginning of the game.
101. Test play the game. Make sure you run into the spider to test the lives and respawning.
102. Debug if needed.
103. Save your work.
Rewards
At the end of Lesson 9, you added reward objects (OBJ_Blue_Gem) and programmed
them to increase the player’s score. At the beginning of this lesson, you created another reward
object (OBJ_Diamond). Place several instances of this object diamond on Level 1 in hard-
to-reach places. Program the OBJ_Diamond object such that IF the avatar collides with the
diamond, THEN the player score increases AND the diamond is destroyed AND a sound is
played. The point value for the diamonds should be higher than the blue gems.
Greater Risk, Greater Reward
As part of any good game challenge, taking a risk will give a reward. A challenge you will
now add to the game is to allow the player to blow up the spider. When the dynamite explodes,
the spider will be destroyed and the player will receive a reward. Since the player will take a great
risk in placing a stick of dynamite near the spider, the reward should be large. The programming
here is actually pretty easy.
104. Program this logic statement: IF the spider collides with the explosion, THEN destroy the
spider AND add 1000 points to the player score AND play a sound. See Figure 10-14.
105. Test play the game. Level 1 should be complete, but levels 2 and 3 still need
improvements.
106. Debug level 1 as needed.
107. Save your work.
First Playable Level Milestone
Time to celebrate! You have reached the first playable level milestone. All other levels
should be much easier since the basic programming will remain. Before you ship your game off
to be evaluated, you need to complete a few additional tuning steps.
108. Add the new game information to the title page and help, including the use of the [Enter]
key and space bar.
109. Design and program changes to levels 2 and 3 to increase challenges and rewards. Add
your personal touch to the design of each level. Add appropriate sounds and transitions for
a refi ned game.
Set
Lives
Run the
Game
Run the
Game