Algorithms and Networking for Computer Games
by a player). The human player's input is received through an input device filtered by
a driver software. The configuration component provides instance data, which is used in
generating the initial state for the game. The human player participates in the data flow by
perceiving information from the output devices and performing actions through the input
devices. Although the illustration in Figure 1.2 includes only one player, naturally there
can be multiple players participating the data flow, each with thier own output and input
devices. Moreover, the computer game can be distributed among several nodes rather than
reside inside a single node. Conceptually, this is not a problem since the components in the
MVC can as well be thought to be distributed (i.e. the data flows run through the network
rather than inside a single computer). In practice, however, the networked computer games
provide their own challenges (see Section 1.3).
non-player character (NPC) that participates limitedly (like a supporting actor), or a deus
ex machina, which can control natural forces or godly powers and thus intervene or generate
the game events.
Chapter 6), the synthetic player is bound to show certain behaviour in relation to the
human player, which can range from simple reactions to general attitudes and even complex
intentions. As we can see in Figure 1.2, the data flow of the human player and the synthetic
player resemble each other, which allows us to project human-like features to the synthetic
player.
should ideally have the same powers of observation and the same capabilities to cope
with uncertainties (see Chapter 7). Ideally, the synthetic players should be in a similar
situation as their human counterparts, but of course a computer program is no match for
human ingenuity. This is why synthetic players rarely display real autonomy but appear to
behave purposefully (e.g. in Grand Theft Auto III pedestrians walk around without any real
destination).
ponents is obvious: If we remove restricting code from the core structures, we have to
reinstate it in the synthetic players. For example, if the players can hurt themselves by
walking into fire, the synthetic player must know how to avoid it. Conversely, if we rule
out fire as a permitted area, path finding (see Chapter 5) for a synthetic player becomes
simpler.