Game Development Reference
In-Depth Information
balance between them. Otherwise one side will exploit its advantage ruthlessly and
the game will be no fun.
COMPUTING THE RELATIVE VALUE OF UNITS
If your game allows the player to purchase or construct new units, you will have to
decide on the relative cost of each type of unit, either in terms of the amount of
time that the player will have to wait for it, the resources required to purchase it, or
both. A unit's cost should be a function of its military value. Of course, the value of
a unit depends a lot on the conditions in which it fights; snowmobiles are useless
in the desert, and infantry can't do much against jet aircraft. However, you'll still
need some kind of baseline for determining how much a unit is worth in absolute
terms, regardless of circumstances or what it's up against, so that each side will pay
roughly the same amount for the same amount of military effectiveness.
Following are two equations that serve as a first approximation of the military
effectiveness, and therefore the value, of a unit type. The first is for units designed
primarily for attack.
Attack Unit Value = maximum health × shot power × rate of fire ×
theoretical accuracy × range × maximum speed
Ver y roughly, this equation reflects a unit's abilit y to accurately deliver damage
from a distance, while surviving under fire itself. So, in comparing two types of
attack units, if all the factors are equal except for maximum health, the one with
the greater health survives longer under fire and therefore does more damage to the
enemy before it is destroyed. Likewise, if two units are identical except for their rate
of fire, the one that fires faster does more damage before it is destroyed. Speed is
included because it is a measure of a unit's ability to get out of the range of another
enemy's weapons. Any unit that is faster than an enemy can get in and out of
harm's way quickly, allowing hit-and-run operations.
Defensive units such as fixed gun emplacements use a slightly different equation:
Defense Unit Value = maximum health × shot power × rate of fire ×
× theoretical accuracy × range 2
2
Speed is left out because such units don't move much and don't generally need to;
they're supposed to protect the place where they are. The range is squared because
a longer range means more than being able to shoot farther away; it means being
able to deliver fire on an area of terrain, and the area is proportional to the square of
the range. It is divided by two because most of the time, the enemy is in front of the
unit, not behind it; being able to cover the area behind the unit is less valuable.
War ning: These equations produce completely different ranges of values and cannot be
used to compare the value of attacking units with defensive units. They're only intended
to compare attacking units to other attacking units and defensive units to other
defensive units. The equations are only a first approximation, and you will almost
Search WWH ::




Custom Search