Game Development Reference
use the same realistic-appearing deceleration the normal overtake code uses and
avoid having the high-speed vehicles conduct panic stops. Our simulation
amusingly treads on the physics so that it avoids collisions altogether and so that
the AI can think at a more leisurely pace.
To summarize, we actively balance realism, frame rate, fun, and AI think rate. We
traded realism to protect frame rate. We could have made the AI more con-
siderate, easing the unrealistic demands on physics, but it is more entertaining to
watch the fast drivers stand on their brakes when they get into traffic. In many
games, the limits on the amount of CPU available to the AI will place limits on
how often it is allowed to think. This is always a potential issue, but with
emergent behavior in the mix, it has a direct impact on the limit to feedback
speed. Fortunately, as we have seen, slower feedback loops often work better. The
point should be emphasized strongly that the real-time constraints the game
places on the AI must be carefully considered when tuning the feedback loops
that control emergent behavior.
So with the right feedback, we can get the interactions we want between our
agents. The simple behaviors are sufficient, and they cause the group to exhibit a
pleasing group behavior. All positive feedback is balanced by a negative feedback
to keep the system in balance. While we were not striving for flocking behavior,
by basing our simulation on similar behaviors, we started with good assurances
that we would get a decent group behavior.
Steering behaviors are one very accessible way to exploit emergent behavior.
Flocking just looks right. With the proper architecture, we can get emergent
behavior in places other than motion control. Consider the Day in the Life project
from Chapter 5, ''Random and Probabilistic Systems.'' Each actor is influenced
by up to five inputs (cash on hand plus four pieces of data per job). In the original
simulation, the inputs were fixed for every job. There were no pay raises, and the
job descriptions never changed. What happens when the jobs begin changing?
Will we get behaviors that we did not explicitly plan to get? If the chance of
success for crime goes from 30 percent to 59 percent, Barry will give up the stunt
show for a life of crime. Getting more criminals when crime is more enticing
hardly seems unexpected. Similarly, the numbers for stunt show and day job are
''close,'' and minor changes will cause Eddy and Barry to change jobs in a
predictable manner. How can we get something unexpected?