Game Development Reference
In-Depth Information
Missing a call to a routine that displays the time of the effect is an example of a
Function type defect for this code. Maybe this block of code was copied from some
other ability and the “vanish�? globals were added but without the accompanying dis-
play code. Alternatively, there could have been a miscommunication about how this
ability works and the programmer didn't know that the timer should be displayed.
void HandleVanish(level)
if (level == 0)
return; // player does not have this ability so leave
} // oops! Did not report seconds remaining to user - hope they don't notice
Alternatively, the function to show the duration to the user could have been included,
but called with one or more incorrect values:
ShowDuration(FALSE, g_vanishTime[level]);
A defect is classified as an Assignment type when it is the result of incorrectly setting
or initializing a value used by the program or when a required value assignment is
missing. Many of the assignments take place at the start of a game, a new level, or a
game mode. Here are some examples for various game genres:
Team schedule
Initialize score for each game
Initial team lineups
Court, field, rink, etc. where game is being played
Weather conditions and time of day
RPG, Adventure
Starting location on map
Starting attributes, skills, items, and abilities
Initialize data for current map
Initialize journal
Search WWH ::

Custom Search