The Key to Adventure–Beta - Goodheart

This sample chapter is for review purposes only. Copyright © The Goodheart-Willcox Co., Inc. All rights reserved.
Name: __________________________________________
Date: ___________________________________________
Lesson 10
Class: ___________________________________________
Situation
The Key to
Adventure–Beta
The creative director has reviewed your alpha game build from Lesson 9. The maze
functions well, but the game needs more immersion. You have been assigned the task of
learning about game immersion and challenges versus rewards within games. Later, you will
improve the game.
How to Begin
1. Read the passage below.
2. Complete the review questions.
3. Turn in all materials.
4. Complete the game build.
Reading Materials
A game with little challenge will quickly become boring for the player. In the Maze game
from Lesson 9, there is very little challenge, or difficulty. This makes the game easy to play,
but not very interesting to play after the first time. By adding difficulty, objectives, missions, tasks,
and obstacles, the player can become more immersed in the action of the game. Immersion is
the degree to which a player connects with the game world.
Critical to immersion and the success of any game is the association of risk to reward. Risk
is making a move that could cause damage to the player’s character. For example, a player takes
a risk when jumping over a hole. If the player jumps too soon, the character will fall in the hole
and lose a life. In this way, the player takes a risk in jumping over the hole.
Objectives
Students will modify an existing game to include
more interactivity.
For every risk, there must be a reward. A reward is a benefit given to the player. In the
case of the hole, the game programmer might place a coin or other token on the opposite side
of the hole that the player must collect to score points. Without the reward, the player would
probably just avoid the hole and find another path. When creating an obstacle or hazard, like
an enemy or a hole, the programmer must always balance the risk with the reward. Jumping a
hole might get the player to a coin. Defeating an enemy might give the player a new ability. The
reward must be great enough to make the player take the risk of injury to the character or defeat.
Students will design and implement an explosion
and key objectives.
Students will program the proper function to
provide the player with three lives.
152
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
Students will program path movements for
enemy obstacles.
Another element that needs to be looked at when designing a game is the skill level
of the player. Part of the approval process for a game idea is to select a target audience. The
target audience is the typical player that might purchase the game. Usually, a target audience
is separated from everyone else by specific demographics. Demographics are observable
features of a person, including age, gender, income, education, cultural background, and so on. If
the target audience is 8-year-old boys, a cartoon-style game based on the popular Scooby Doo
character may be appropriate. On the other hand, if the target audience is 20-year-old college
students, the game would likely need to require greater skill and have more action than the
game designed for a younger age group. The age and skill of the target audience help determine
the amount of challenge and action needed in a game.
A successful game must have skill progression. Skill progression describes how a game
starts easy and gets harder as the player progresses through levels. By increasing the skill required
to complete higher levels, the game presents increasing challenges to the player. Skill progression
Lesson 10 The Key to Adventure—Beta
153
Name: __________________________________________
also helps teach the player how to properly play the game. The first level is easy so the player can
learn how to use the controls and discover the moves needed to play the game. In the second level,
more challenges are added and the level is slightly more difficult than the first. Each level continues
to add more difficult challenges until the final level, which should be the most difficult to complete.
3. risk: _______________________________________________________________________
When creating difficulty, remember the ultimate goal of the player is to defeat the game by
achieving the victory condition. There is a progression of challenges that lead to the victory
condition. Atomic challenges are the smallest possible challenges. This term comes from the
atom, which is the smallest particle of an element. Atomic challenges are simple, like jumping a
hole or hitting a target. By combining atomic challenges, sub-missions are created.
Sub-missions are tasks that need to be completed in the game. A sub-mission might be
collecting 100 coins, finding a key, or other in-game challenges. All of the sub-missions combine
to form a game mission. A mission is a combination of sub-missions needed to complete a
major set of tasks within the game. A mission is often completing a game level from beginning
to end. For example, a mission might be to destroy all enemies on the level and collect supplies
needed for advanced levels. After completing all of the missions, the game is over and the player
is victorious. This is the final victory condition that ends the game.
4. reward: ____________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
5. target audience: _____________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
6. demographics: ______________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
7. skill progression: _____________________________________________________________
In addition to understanding skill progression and challenges, the designer must understand
the emotion of the player. In some cases, the player might get frustrated trying to defeat an
enemy or overcome an obstacle. The player will likely stop playing if the character repeatedly
dies and the player has to start over from the beginning. Repeating the same tasks over and over
again gets boring. Additionally, the feeling of joy from defeating a powerful enemy might be shortlived if the player later does something that requires battling the same enemy again. To avoid
these conditions, designers use checkpoints and bonus lives. A checkpoint is a saved location
in the game from where the player can restart if the character dies. A bonus life is often used as
a reward for the player taking the risk of battling powerful enemies or achieving a certain score.
Together, checkpoints and lives allow the player to test different strategies in the game through
trial and error. Eventually, the player can learn the correct choices to achieve victory.
___________________________________________________________________________
___________________________________________________________________________
8. progression of challenges: _____________________________________________________
___________________________________________________________________________
___________________________________________________________________________
9. atomic challenges: ___________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
A designer needs to understand how to properly build challenge throughout the game.
Each atomic challenge, sub-mission, and mission must meet the needs of the game and provide
adequate reward. Taken together, these challenges must also be appropriate to the age and skill
of the target audience. Finally, these challenges must build throughout the game to teach the
player and allow for skill building. Every game should be made so a player can eventually build
enough skill to make it to the end and achieve the victory condition. In the end, a player should
have enjoyed the game and not feel frustrated.
10. mission: ____________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Review Questions
11. An atom is the smallest particle of an element. Research atomic structure, then describe
the parts of an atom.
Review Questions and Activities
1. challenge: __________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
2. immersion: _________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
154
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
Write a definition for each of the terms listed below.
Copyright by The Goodheart-Willcox Co., Inc.
___________________________________________________________________________
Vocabulary Questions
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Applied
Technology
Language
Arts
Mathematics
Lesson 10 The Key to Adventure—Beta
Science
Social
Science
155
Name: __________________________________________
12. List four of your favorite games and describe how the game designers used checkpoints to
help the player during gameplay.
Situation
___________________________________________________________________________
After reviewing your alpha game build from Lesson 9, the creative director has determined
it needs more adventure! You will now improve the game by adding features such as doors that
need to be exploded open, locks and keys, and enemies guarding the objectives. Do a good job;
your performance evaluation will be coming up soon. You want a good evaluation!
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
13. Suppose a game rewards the player with a bonus life at 1000 points, with each bonus life
rewarded after scoring another 1000 points plus 10% of the previous reward level. For
example, the second bonus life is rewarded at a score of 2100 points. What score must be
achieved to obtain a fifth bonus life?
Extra Life
1
2
3
4
5
Score Plus 1000
1000
2000
3100
How to Begin
1. Open the Maze game from Lesson 9 and save it as LastName_Maze_Beta.
10% of Previous Score Total Score Needed
0
1000
100
2100
210
2. In the previous lesson, you created some sprites and objects that were not used. You will
use them in this lesson, along with the following sprites and objects. Create all objects as
visible and solid.
Sprite Name
14. Research video game addiction. Write an explanation of what role you feel immersion plays
in this condition.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
SPR_Detonator_Up
\Sprites\Maze-Platform\
detonator_off.png
OBJ_Detonator_Up
SPR_Diamond
\Sprites\Maze-Platform\
diamond_sparkle_strip32.png
OBJ_Diamond
SPR_Dynamite_Pack
\Sprites\Maze-Platform\
dynamite_pack.png
OBJ_Dynamite_Pack
SPR_Dynamite_Stick
\Sprites\Maze-Platform\
dynamite.png
OBJ_Dynamite_Stick
SPR_Explosion
\Sprites\Maze-Platform\
explosion strip7.png
OBJ_Explosion
SPR_Spider
\Sprites\Maze-Platform\
spider_down_strip8.png
OBJ_Spider
___________________________________________________________________________
15. Research the demographics of your town. List five demographics that you feel are key
to describing your community. Describe what you think the statistics say about your
community.
___________________________________________________________________________
Obstacle Barriers
___________________________________________________________________________
___________________________________________________________________________
Applied
Technology
156
Language
Arts
Mathematics
Science
Social
Science
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
___________________________________________________________________________
Copyright by The Goodheart-Willcox Co., Inc.
___________________________________________________________________________
___________________________________________________________________________
Object Name
OBJ_Detonator_Down
___________________________________________________________________________
___________________________________________________________________________
Image File
SPR_Detonator_Down \Sprites\Maze-Platform\
detonator_on.png
To make the game more challenging, you will add barriers. Barriers are objects that block
pathways. The player must either destroy the barriers or figure out some other way to get around
them.
3. Open the Room Properties dialog box for the Level 1 room.
4. Place instances of the doors object to block the exit to the maze, Figure 10-1. To place
them on top of the exit objects already in place, uncheck the Delete underlying check
box. It is important to keep the exit objects because they contain the programming for
moving from room to room.
5. Open the Object Properties dialog box for the OBJ_Doors object.
6. Program the door object such that IF the avatar collides with the door, THEN the avatar
movement stops.
Lesson 10 The Key to Adventure—Beta
157
Name: __________________________________________
Locks added
Detonator
Dynamic pack
Doors
added
Figure 10-1
Figure 10-2
7. In a different location, place a couple of locks to block the explorer’s path.
Barrier Demolition
8. Open the Object Properties dialog box for the OBJ_Lock_Gold object.
Another way to clear a barrier is to blow it up. This is more fun! The explorer happens
to be a demolition expert and gets to use dynamite to blow up the doors and other objects.
So cool! Note: the dynamite is also considered a passage key. You will do some advance
programming in a bit, but first get the basics done right.
9. Program the lock object such that IF the avatar collides with the lock, THEN the avatar
movement stops.
Run the
Game
10. Test play the game. Now the player cannot reach the exit. If you have placed the doors on
top of the exit objects and the player can still navigate to the next room, you will need to
move the doors and exit objects so the avatar collides with the doors before reaching the
exit objects.
15. In the Level 1 room, place an instance of the OBJ_Dynamite_Pack object somewhere
between the starting position and the doors, Figure 10-2.
16. Place the OBJ_Detonator_Up object in a place between the dynamite pack and the
doors. This should be in a place that will shield the avatar from the dynamite blast, like
behind a wall.
11. Save your work.
17. Open the Object Properties dialog box for the OBJ_Avatar object. You will program
this logic statement: IF the player presses the space bar, THEN create an instance of the
OBJ_Dynamite_Stick object at (16,–16) relative to the player. This will place a stick of
dynamite just above the avatar’s head.
12. In the Level 1 room, place one instance of the gold key in a location where the player can
access it before reaching the lock barrier.
13. Open the Object Properties dialog box for the OBJ_Avatar object.
14. Program the key such that IF the avatar collides with the key, THEN destroy the key AND
destroy the locks. Since the lock barriers will be destroyed, the player can get past the
barrier.
158
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
To allow the player to pass through a barrier, a passage key must be placed within the
game. The passage key need not be an actual key. It can be anything used to eliminate the
barrier. You will program two different passage keys to allow the player to get through the doors
and locks.
Copyright by The Goodheart-Willcox Co., Inc.
Passage Keys
18. Add an event for the player pressing the space bar.
19. Drag the Create Instance button from the Main 1 tab and drop it into the Actions:
column.
20. In the Create Instance dialog box, click the Self radio button, Figure 10-3.
Create
Instance
21. Click in the Object: text box and select the dynamite stick object from the shortcut menu.
This is the object that will be created.
22. Enter 16 in the X: text box and –16 in the Y: text box.
23. Check the Relative check box and click the OK button to save the action.
24. Close the Object Properties dialog box, saving the changes.
Lesson 10 The Key to Adventure—Beta
159
Name: __________________________________________
Block of code for
exploding the dynamite
Apply the instance
to the avatar
Enter the
location
Select the
object to create
Make the location
relative to the avatar
Figure 10-3
Figure 10-4
Next, you need to program the detonator so when the player pushes down the handle, the
dynamite sticks explode. The logic statement for this is:
Blowing up the Doors
IF the avatar collides with the OBJ_Detonator_Up object, THEN change the
OBJ_Detonator_Up object to the OBJ_Detonator_Down object AND create an
explosion AND destroy the dynamite stick.
To make the doors blow up and allow the avatar to pass, programming needs to be added
to the OBJ_Explode object. This will also correct the problem with the repeating explosion.
36. Open the Object Properties dialog box for the OBJ_Explosion object.
25. Open the Object Properties dialog box for the OBJ_Detonator_Up object.
37. Program this logic statement: IF the explosion collides with the doors, THEN destroy the
doors. Note: this is an example where you might want to use the Other setting because
using the Object setting will destroy all doors.
26. Add an event for a collision with the avatar. Even though the detonator is not the object
that will be moving, the collision is still between the detonator and the avatar.
Start
Block
38. Program this logic statement: IF the explosion animation ends, THEN destroy the
explosion. See Figure 10-5.
27. There are many actions that need to happen all at once, so begin a block of code by
dragging the Start Block button from the Control tab and drop it into the Actions:
column.
39. Test play the game to see if the doors explode and that the explosion does not repeat.
28. Add an action that creates an instance of the OBJ_Detonator_Down object at (0,0)
relative to the OBJ_Detonator_Up object.
40. Debug the game if needed.
Run the
Game
41. Save your work.
29. Add an action that destroys the OBJ_Detonator_Up object.
End
Block
Run the
Game
33. Test play the game. See if you can walk up to the doors and press the space bar to place
a stick of dynamite. After placing a stick of dynamite, run into the detonator to see if the
dynamite stick blows up and the detonator plunger is depressed. Note: the doors will not
be destroyed; this will be programmed in the next section.
34. Debug the game if the stick of dynamite is not placed or does not explode or if the
detonator does not change to the down position. Note: the explosion will be fixed in the
next section.
35. Save your work.
160
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
31. Add an action that destroys the OBJ_Dynamite_Stick object.
32. Close the block of code by dragging the End Block button from the Control tab and
dropping it at the bottom of the Actions: column. See Figure 10-4.
Copyright by The Goodheart-Willcox Co., Inc.
30. Add an action that creates an instance of the OBJ_Explosion object at (0,0) relative to
the OBJ_Dynamite_Stick object.
Click
Select
Figure 10-5
Lesson 10 The Key to Adventure—Beta
161
Name: __________________________________________
Resetting the Detonator
Did you notice as you test played the game that you only get one chance to activate the
detonator? After you activate it, it is stuck down. If you put the dynamite in the wrong place, you
can place more dynamite, but you have no way to set it off. There needs to be a way for the
player to reset the detonator. You will program the game so that when the player presses the
[Enter] key, the detonator will be reset to the up position.
Variable name
Player will start
with zero sticks of
dynamite
42. Open the Object Properties dialog box for the OBJ_Detonator_Down object.
43. Program this logic statement: IF the player presses the [Enter] key, THEN destroy the
OBJ_Detonator_Down object AND create an instance of the OBJ_Detonator_Up object
at (0,0) relative to the OBJ_Detonator_Down object. Program this as a block of code. See
Figure 10-6.
Figure 10-7
44. Test play the game. Check to see that you can destroy the dynamite sticks, place a new
dynamite stick, reset the detonator, and destroy the new dynamite stick.
50. Check the Self radio button.
45. Debug the game if needed.
51. In the Variable: text box, enter VAR_One_Stick. Remember, when you later reference
this variable, it must be spelled exactly the same.
46. Save your work.
52. Enter 0 in the Value: text box.
Programming with Variables
53. Click the OK button to save the action.
The game is much more fun…destroying things always seems to help! But, the dynamite is
automatically available to the player. This is too easy. To increase the challenge, you will program
the game so the player can only carry one stick of dynamite at a time. Variables will be used to
achieve this new challenge. A variable is a programming item holding a temporary value (number
or text) that can vary or change. Remember that pack of dynamite you placed earlier? The player
will pick up a single stick of dynamite each time the avatar touches the dynamite pack.
This programming sets the number of dynamite sticks the player has to zero. The player
will begin with no dynamite and will need to pick up one stick at a time. Next, the avatar needs
to be programmed to pick up a stick of dynamite.
54. Add an event for colliding with the avatar. Even though the dynamite pack will not be
moving, a collision with the avatar occurs when the avatar runs into the dynamite pack.
55. Drag the Set Variable button from the Control tab and drop it into the Actions:
column.
47. Open the Object Properties dialog box for the OBJ_Dynamite_Pack object.
48. Add a create event.
Set
Variable
56. Check the Self radio button.
49. Drag the Set Variable button from the Control tab and drop it into the Actions:
column. The Set Variable dialog box is displayed, Figure 10-7.
57. In the Variable: text box, enter VAR_One_Stick. This variable must be spelled exactly
the same as it was earlier.
58. Enter 1 in the Value: text box.
Block of code for
resetting the detonator
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
Copyright by The Goodheart-Willcox Co., Inc.
59. Click the OK button to save the action.
Figure 10-6
162
Set
Variable
This programming allows the player to pick up one stick of dynamite when the avatar
touches the dynamite pack. Now, you need to reprogram how the player can place the sticks
of dynamite. Here, the computer needs to check to see if the avatar is currently carrying a stick
of dynamite. If so, then a stick of dynamite can be placed when the space bar is pressed. If the
avatar is not carrying a stick of dynamite, nothing happens when the space bar is pressed.
60. Add an event for pressing the space bar.
61. Drag the Test Variable button from the Control tab and drop it into the Actions:
column. The Test Variable dialog box is displayed, Figure 10-8.
Test
Variable
62. Click the Self radio button.
63. Enter VAR_One_Stick in the Variable: text box. Be sure it is spelled exactly the same as
it was earlier.
Lesson 10 The Key to Adventure—Beta
163
Name: __________________________________________
Bug Type
Make sure the
variable is
spelled correctly
Meaning
Major problem! The game cannot be released
&##"$
)"#$# (.
)!$"
)!""
)#$!"#&! ! !(.
)%"#$## #
) !!!".
)!!!".
B
!!"&#
#"$$##&!%!%&"!
the error.
)ame (#( (#
)#$!"""
)! !!!"#!$"!
#!""#!"
)
#$!$"
#"##!%!%
)%"!#"(# #
C
Common problem. T""$'
# !#"$#!"#&
#((#"$"('"
#&#$#'"!#
) ("$#!!$ #(#!!!.
)! !##(#
"#(!#"
) !##"#(#
' !("# (!"
)!!!##"!#$ #.
D
$"##$!"$&(#
' !!#!"#$""#!
"!#
) ("$#!!$ #$#$
be enhanced.
)#$!##
(##!.
)&#($ .
)&$##"#!# !""
##"###%#& .
Enter the value
to test
Select the
operation
Figure 10-8
64. Enter 1 in the Value: text box.
65. Click in the Operation: text box and select Equal to from the shortcut menu.
In earlier lessons, you learned how qualifiers work. This test-variable action is the qualifier
for the rest of the actions needed, which will be in a block of code. If the qualifier does not show
the value of VAR_One_Stick equal to 1, then the block of code will not be executed. The first
action in the block of code is to allow the player to place a stick of dynamite when the space bar
is pressed.
Start
Block
66. Drag the Start Block button from the Control tab and drop it into the Actions: column
below the test-variable qualifier.
67. Drag the Create Instance button from the Main 1 tab and drop it into the Actions:
column below the Start of a block entry.
End
Block
69. Drag the Set Variable button and drop it into the Actions: column at the bottom of the
block of code.
75. Select the event for pressing the space bar.
76. Click the Delete button to remove the event and all associated actions.
Enemy Movement
71. Drag the End Block button from the Control tab and drop it into the Actions: column
to close the block of code.
73. Save your work.
Level B Bug
When you test played the game, you should have noticed you can place an unlimited
number of sticks of dynamite, even before you run into the dynamite pack. This is considered
a level B bug. See Figure 10-9. Remember, when you first created programming for placing
a stick of dynamite, pressing the space bar was the event. However, the programming you just
created with the variable VAR_One_Stick also has an event of pressing the space bar to place a
stick of dynamite.
164
74. Open the Object Properties dialog box for the OBJ_Avatar object.
70. In the Set Variable dialog box, program the action to set the value of the variable VAR_
One_Stick to 0. This is needed because otherwise the player would be able to place an
unlimited number of sticks of dynamite without having to go back to the dynamite pack.
72. Test play the game. You will notice a bug with the sticks of dynamite, which will be
discussed in the next section.
Run the
Game
Figure 10-9
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
Set
Variable
68. In the Create Instance dialog box, program the action such that an OBJ_Dynamite_
Stick object will be created at (16,–16) relative to the OBJ_Avatar object.
Copyright by The Goodheart-Willcox Co., Inc.
Create
Instance
Examples
A
77. Open the Room Properties dialog box for the Level 1 room.
78. Place the OBJ_Spider object room somewhere between the dynamite pack and the
detonator.
79. Create a path for the spider to move back and forth to block the way. See Figure 10-10.
Creating a path was explained in earlier lessons. Name the path Path_Spider. Use your
cursor and the coordinate display to determine the location of the spider. Then, draw a path from
its current location to another location so the spider will cross where the player must travel. The
path you create may be different from what is shown in Figure 10-10 if you place the spider in a
different location. To get the spider to move along the path, you now need to program it to do so.
80. Open the Object Properties dialog box for the OBJ_Spider object.
81. Add a create event.
Lesson 10 The Key to Adventure—Beta
165
Name: __________________________________________
88. Drag the Set Lives button from the Score tab and drop it into the Actions: column.
89. In the Set Lives dialog box, enter –1 in the New lives: text box, check the Relative
check box, and click the OK button to save the action.
Set
Lives
90. Drag the Jump to Start button from the Move tab and drop it into the Actions:
column. The Jump to Start dialog box is displayed, Figure 10-12.
91. Click the Object: radio button. Then, click in the text box that appears and select the
avatar from the shortcut menu. This will return the player to the starting position, which is
called respawning. In this case, the respawn checkpoint is the starting position.
Path for
the spider
Jump to
Start
92. Click the OK button to save the action.
93. Drag the Test Lives button from the Control tab and drop it into the Actions: column.
94. In the Test Lives dialog box, enter 0 in the Value: text box, click in the Operation: text
box and select Equal to from the shortcut menu, and click the OK button.
Test
Lives
95. Drag the End Game button from the Main 2 tab and drop it into the Actions: column,
Figure 10-13.
Figure 10-10
End
Game
82. Drag the Set Path button from the Move tab and drop it into the Actions: column. The
Set Path dialog box is displayed, Figure 10-11.
Set Path
Select the avatar
to return to its
starting position
83. Enter 2 in the Speed: text box.
84. Click in the At end: text box and select Reverse from the shortcut menu. This will cause
the spider to walk back to the starting point.
85. Click in the Relative: text box and select Absolute from the shortcut menu. This is
absolute because you used the absolute coordinate location of the spider.
86. Click the OK button to save the action.
Figure 10-12
Now, the spider will move along the path, but the player can run over it without anything
happening. The OBJ_Spider object needs to be programmed to be an obstacle. You also need
to program the game so the player begins with three lives. Running into the spider will remove
one life from the player.
Code for removing lives
and ending the game
Enter the speed
Set the spider
to reverse
Figure 10-11
166
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
Select the path
Copyright by The Goodheart-Willcox Co., Inc.
87. Add an event for colliding with the avatar.
Figure 10-13
Lesson 10 The Key to Adventure—Beta
167
Name: __________________________________________
96. Close the Object Properties dialog box for the OBJ_Spider object.
Destroys the spiker,
adds 1000 to the score,
and plays a sound
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.
Set
Lives
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.
Run the
Game
103. Save your work.
Rewards
Figure 10-14
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 hardto-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.
110. Test play the game.
111. Debug any issues.
112. Save your work.
Greater Risk, Greater Reward
Going Beyond
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.
113. Save a copy of your game as LastName_Maze_Gamma.
114. Try programming the detonator to reset using a timer instead of the player pressing the
[Enter] key.
115. Use your skills to problem-solve a solution to the issue that occurs when the player exits
level 1 and tries to reenter level 1 from level 2.
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.
116. Add challenges that require more skill than just getting a key or blowing things up.
105. Test play the game. Level 1 should be complete, but levels 2 and 3 still need
improvements.
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 refined game.
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
107. Save your work.
168
117. Save your work, build the game as an executable, and submit it for grading.
106. Debug level 1 as needed.
Copyright by The Goodheart-Willcox Co., Inc.
Run the
Game
Run the
Game
Lesson 10 The Key to Adventure—Beta
169
Name: __________________________________________
8. Define variable, as used in computer programming.
STEM Review Questions and Activities
___________________________________________________________________________
Review Questions
___________________________________________________________________________
9. If blue gems are worth 15 points, diamonds are worth 25 points, and the spider is worth
100 points, how many of each gem has the player collected if the score is 170 and the
player has destroyed the spider? There are three possible combinations that equal 170.
1. Describe what a barrier is in a video game.
___________________________________________________________________________
___________________________________________________________________________
Solution # of Blue Gems # of Diamonds Spider × 100
× 15 points
× 25 points
points
A
B
C
2. Review the bug type table in Figure 10-9 and identify the type of each bug listed below.
Error Report
Game freezes when pressing two keys at the
same time.
Avatar’s shoes are red on all levels except level 6.
Level 1 is much harder than levels 4 and 5.
Extra life bonus awards an extra life and 100
extra points the first time it is used.
Bug Type
Evaluation Activities
10. Personal Evaluation
3. What are the demographics of the target audience for this game? Justify your opinion.
0
___________________________________________________________________________
___________________________________________________________________________
4. Describe what a passage key is in a video game.
___________________________________________________________________________
___________________________________________________________________________
5. For every action there is an equal and opposite reaction. Describe how this scientific
principle is applied in the game build for this lesson.
___________________________________________________________________________
___________________________________________________________________________
6. Describe the first playable level milestone.
___________________________________________________________________________
___________________________________________________________________________
Applied
Technology
170
Language
Arts
Mathematics
Science
Social
Science
Introduction to Video Game Design
Copyright by The Goodheart-Willcox Co., Inc.
7. If the spider obstacle is moving along a path that is 57 pixels in length and it takes three
seconds to return to the starting point, how fast is the spider moving (in pixels/second)?
Copyright by The Goodheart-Willcox Co., Inc.
___________________________________________________________________________
1
2
3
4
5
Score
Concept
Is the idea well developed?
No main idea.
Clear
throughout.
Aesthetics
Do the look and colors
fit the game?
Poor quality graphics
and color.
Awesome graphics
and theme-based
colors.
Sound Effects
Do the sounds play well?
Are the music and ambient
sounds appropriate?
No sound; sounds
too loud or not
related to the game.
Good sound for each
item at good levels.
Functionality
Does everything work?
Unfinished, could not
play; major errors.
Plays perfectly; no
bugs, glitches, or errors.
Replay
How likely are you to
play this game again?
Game solved,
too easy or
uninteresting.
Cannot wait to play
this again!
Total Score
(higher is better)
Applied
Technology
Language
Arts
Mathematics
Lesson 10 The Key to Adventure—Beta
Science
Social
Science
171