Game Development Reference
In-Depth Information
Figure 12.7 Server/client model.
The server/client model is the most popular network topology used in networked
games today. Most FPS, action games, MMOs, strategy games, turn-based games,
and so on use a server/client setup. Of course there are some exceptions, as with
everything, but by and large networked games employ server/client.
In the typical implementation of server/client, the server is considered authoritat-
ive , which means that it is required to verify most major client actions. Suppose a
networked game allows players to throw dodge balls at other players; once a play-
er gets hit by the dodge ball, that player is eliminated from that round. With an
authoritative server, when a player wants to throw the dodge ball, the request goes
to the server, which verifies that it is a valid action. Then the server will simulate
the trajectory of the dodge ball and check every frame for whether or not any cli-
ent was hit by the dodge ball. If a client gets hit, that client will then be notified by
the server that they are out of the round.
The reason for the server verification is twofold. The first reason is that the server
is going to have the most up-to-date position information of all the clients. One
client throwing the dodge ball at another client might think they definitely hit that
client, but that might be because they did not have fully up-to-date information re-
garding the target's position. Furthermore, if the client can eliminate another play-
er in the dodge ball game without being verified by the server, it would be quite
Search WWH ::




Custom Search