Game Development Reference
In-Depth Information
Table 23.1 How to Run a Successful Debugging Experiment
Scientific Method as
It Applies to Software
Systems
Example #1
Example #2
Step 1: Observe the
behavior of a computer
game.
Observation: A call to
OpenFile() always fails.
Observation: The game
crashes on the low-end
machine when it tries to
initialize.
Step 2: Attempt to explain
the behavior that is
consistent with your
observations and your
knowledge of the system.
Hypothesis: The input
parameters to OpenFile()
are incorrect, specifically
the filename.
Hypothesis: The game is
crashing because it is
running out of video
memory.
Step 3: Use your
explanation to make
predictions.
Predictions: If the proper
filename is used, OpenFile()
will execute successfully.
Predictions: If the amount
of video memory were
increased, the game would
initialize properly. The
game will crash when the
original amount of video
memory is restored.
Step 4: Test your predictions
by performing experiments
or making additional
observations. Modify the
hypothesis and predictions
based on the results.
Experiment: Send the
fully qualified path name
of the file and try
OpenFile() again.
Experiment: Switch the
current video card with
others that have more
memory.
Step 5: Repeat steps three
and four until there is no
discrepancy between your
explanations and the
observations.
Results: OpenFile()
executed successfully
with a fully qualified
path name.
Results: The game properly
initializes with a better
video card installed.
Step 6: Explain the results.
Explanation: The current
working directory is
different than the
location of the file in
question. The path name
must be fully qualified.
Explanation: Video memory
requirements have grown
beyond expectations.
Search WWH ::




Custom Search