Documente Academic
Documente Profesional
Documente Cultură
Objectives
Use game design software to create a playable
video game.
Integrate animated objects into a video game.
Create sound and music effects in a video game.
Describe basic computer logic.
Build applied mathematics logic statements.
List features of object-oriented programming.
Logic
The first concept of designing and
programming a video game is an action
reaction relationship
Programmers use logic statements to
break down these actionreaction
relationships
To begin the programming process
You will need to understand the five basic
operators of a programming language: IF,
THEN, AND, OR, and ELSE
Goodheart-Willcox Co., Inc.
Logic continued
IF Action / condition
Then- Reaction
AND allows for multiple events to occur
OR allows for multiple results
ELSE (T/F) (otherwise) what will happen if a
certain action or reaction does not take place
Logic (Continued)
Cause and Effect
Action/reaction relationship
Action (cause)
Reaction (effect)
Shows everyday cause and-effect relationships for some everyday
occurrences
OPERATOR
CAUSE
OPERATOR
EFFECT
IF
YOUR TURN IN
HOMEWORK
THEN
YOU GET A
GOOD GRADE
IF
THEN
YOU WATCH A
MOVIE
IF
THEN
Logic (Continued)
Programming for the user interface uses listeners
and triggers
A listener is programming that directs the
computer to check or listen for a mouse click,
key press, or other input from the user
A trigger is programming for when a condition
is met that a series of actions will begin
In a logic statement, the trigger is the IF and the
actions it initiates are the THEN
Logic (Continued)
Goodheart-Willcox Publisher
Goodheart-Willcox Co., Inc.
Logic (Continued)
The next step in basic programming is to add
multiple actions or multiple reactions to logic
statements
This is done using the AND and OR
operators
The AND operator will join two or more
outcomes for a given condition or action
The OR operator allows multiple results to
take place under a given condition or event
Goodheart-Willcox Co., Inc.
(the AND operator allows three events to occur from a single collision action)
Goodheart-Willcox Co., Inc.
Logic (Continued)
The ELSE operator describes what will
happen if a certain action or reaction does
not take place
The ELSE operator works like a true/false
test
If the condition is true, the THEN events
are initiated
If the condition is false, the ELSE events
are initiated
Goodheart-Willcox Co., Inc.
Collision Theory
Collision Theory
Goodheart-Willcox Publisher
Goodheart-Willcox Co., Inc.