Game Development Reference
In-Depth Information
To create f urther variet y, modif y the behav ior of indiv idual opponent drivers (or
pilots). Design the AI for these opponents by starting with perfect performance and
then creating variations from perfection. For example, it's possible to create a “per-
fect” AI driver in a racing simulation, one that always follows the most efficient
line around the track, always shifts gears at precisely the correct moment, and
knows the ideal speed at which to take each corner without spinning out. If such a
driver has a better car than the player's, he will be unbeatable. The trick, then, is to
modify the AI driver's judgment so that it isn't perfect—so that he doesn't always
shift at exactly the right time or follow the most efficient line. This combination of
factors, both vehicle characteristics and variable driver skill, provides the variety
among opponents in vehicle simulators.
As you research flying or driving, you will discover other tricks to incorporate in
the AI: drafting behind other cars, for example, and diving out of the sun to sur-
prise the enemy in a dogfight.
Damage
You need to decide what to do about damage. Comical or arcadelike racing sims
may not simulate damage at all; if the car hits something, it simply bounces off,
although doing so usually slows the car down. This allows the driver to be much
more careless, and it is a good solution for casual and children's games. They can
afford to hit a few things and still win the race—at least in the earlier, easier stages
of the game. Other games model damage as a single variable, like unit health points
in a war game. When damage reaches a certain level, the vehicle simply stops run-
ning (which, in the case of an airplane, means that it crashes or explodes). If your
target machine doesn't have much CPU power (as in a cell phone, for example),
these approaches mean you don't have to model the physics very accurately.
To model damage acc urately, you should div ide the vehicle into separate areas that
can suffer damage in a collision (or, in a military simulator, from enemy fire), and
decide how that damage affects the performance of the vehicle. For instance, a race
car with minor damage to the airfoils or body can continue, although with a per-
formance penalty, but a blown tire forces it to halt. With airplanes, the consequences
can be dramatically different depending on what part of the aircraft sustains dam-
age. A plane can still fly without its tail, but it is unstable and extremely difficult to
handle. These approaches give great verisimilitude but require sophisticated phys-
ics models to accomplish.
The Game World
The landscape that a simulated vehicle moves through is an important part of the
game's entertainment—even if it's a relatively static landscape as in a racing
game—because the landscape is connected with the function of the vehicle itself.
The settings of flight simulators consist of the plane itself and the ground that it
flies above. With a few exceptions, such as Microsoft Combat Flight Simulator , most
Search WWH ::




Custom Search