134 Video Game Design Foundations
Of course, you do not have to program
objects to act the way they do in the real world.
Some surreal and fantasy games program
unusual properties for objects that appear
as real-world objects. For example, you may
program a road to act as a river. On the other
hand, you may have a waterfall act like an
elevator.
Programming with Collision
Theory
Looking at the balloon pop game, a balloon pops when it collides with
the dart. This appears to be one event triggered by one condition. However,
it is actually a series of events activated when the dart object collides with
the balloon object. When the computer recognizes this collision, it sets into
action the events programmed by the logic statements. Shown in Figure 5-12
is an event frame used in The Games Factory 2. This is an object-oriented,
game development software. The event frame shows the programming of a
collision condition and the resulting events.
THINK ABOUT IT
ACTIVITY 5.3
Think about a racecar game and
how the player’s car must
interact with the other cars on
the track. What do you think will
happen if you do not program a
collision between the player and the
other cars? Would that be fun?
Create New
Objects Column
IF statement THEN statement
Baloon
Object Column
Pops
Column
Player 1
Column
Figure 5-12. This is an event view from The Games Factory 2. Examine this to see how a logic statement is constructed
in the software.
Previous Page Next Page