Game Design

(Elliott) #1

the designer can make assumptions about what plan of attack will provide the most
interesting challenge for the player.
First-person shooters are a good example of a game genre that works well with
somewhat scripted AI behaviors.Half-Lifewas one of the first games to show how com-
plex scripting could be used to make opponents that were a lot of fun to fight. That game
was widely praised in the gaming press for the strength of its AI, while in fact much of
that perceived intelligence was accomplished using scripted paths that the AI agents
would move to in specific situations. RTS games such asStarCrafthave used extensive
scripting in their single-player scenario maps for as long as they have been around. In
these games the AI receives instructions from the script about what to do when players
finally reach a certain location or after they have built a certain number of units. This
makes each level present a more unique challenge to the player than if all the maps
were run off of a purely general-purpose AI.
Setting up scripted behaviors that are specific to a level is very much the concern
of the level designer. The level designer already needed to concern himself with where
the opponents should be placed to create maximum gameplay effect. But with scripted
behaviors the designer needs to repeatedly play an area to figure out the most devilish
places for the AI to hide, where it should retreat to when low on health, and how it
should best reposition to have the greatest chance of defeating the player. Of course,
the AI agent cannot only be on a path, at least not if the player is likely to interact with it.
The AI must still be used to enable the agent to determine which location it should try
to get to in which situation. Furthermore, the AI must be able to realize when the
scripted plans are not working out and when to try an unscripted, more general behav-
ior. One might think that having AI agents that use scripted, predetermined behaviors
will fail to produce the unpredictability I discussed earlier. One might wonder how a
scripted behavior can be anything but predictable. For just this reason, scripted behav-
ior should be used just to give the AI agent hints as to where good locations to duck and
cover might be, not to specify where the agent must always go, regardless of the situa-
tion. The agent must still be able to react to the player’s tactics in order to avoid looking
too foolish.


Chapter 9: Artificial Intelligence 169


The Sufferingused a lot
of scripted AI actions to
make the enemies and
companions appear
more intelligent than
they actually were.
Free download pdf