Game Development Reference
In-Depth Information
supposed to be blind, it filters any event about the visible state of an object. You can
set the nature of an AI agent ' s behavior completely by controlling what stimuli the AI
agent receives.
The second part of an AI view is the decision system. This is a completely custom
written subsystem that translates stimuli into actions. Your AI agent might be able
to send commands into the game your human can
t, giving it extra abilities such as
opening locked doors. The reverse is also true, and the combination of AI stimulus
filters and command sets can have a great effect on how smart your AI agents are.
If your AI needs to solve difficult problems, such as how to navigate a complicated
environment or make the next move in a chess match, then you might need a process
manager just as in the game logic and game view. You might use this to have AI
spread its evaluation of stimuli and decisions over time, amortizing the cost of these
expensive calculations over many frames.
Finally, you
'
ll certainly want a list of AI options that you can tweak through a simple
text file. The stimulus filter and decision set options are certainly enough to warrant
a large options file, but more importantly, your AI options can be extremely useful
for AI tuning during development. Even if you eventually hard code the AI para-
meters, you
'
'
ll certainly want an instantly
tweakable
version while your game is in
development.
Networked Game Architecture
If you implement the game architecture that I ' ve been beating you with since the
beginning of this chapter, you can write two additional classes and transform your
single-player game into a networked, multiplayer game. That might seem like an
insane boast, but it is completely true. Well, nearly completely true. Look at
Figure 2.7 to get another look at how game views interact with the game logic.
Figure 2.7
Client/server networked game architecture.
 
 
Search WWH ::




Custom Search