Server versus Client Design Issues


The Torque Engine provides built-in client/server capability. In fact, the engine is designed and built around the client/server model to such a degree that even if you are going to create a single-player game, you will still have both a server side and a client side to your code.

A well-designed online multiplayer game puts as much of the decision-making activity into the hands of the server as possible. This greatly reduces the chances that dishonest players could modify their clients to enable cheating or otherwise gain advantage over other more honest players.

Conversely, a well-designed online multiplayer game only uses the client side to manage the interface with the human player—accepting input, displaying or generating output, and providing setup and game navigation tools.

This emphasis on server-side decisions has the potential to rapidly drain network bandwidth. This can lead to lag, a situation where a player's actions are not reflected on the server in a timely fashion. Torque has a highly optimized networking system designed to mitigate against these kinds of problems. For example, most strings of data are transmitted only once between clients and the game server. Anytime a string that has already been transmitted needs to be sent again, a tag is sent instead of the full string. The tag is nothing more than a number that identifies the string to be used, so the full string need not be sent again. Another approach is an update masking system that allows the engine to only provide updates from the server to its clients of data that has actually changed since the last update.

We will follow these guidelines when designing our sample game.




3D Game Programming All in One
3D Game Programming All in One (Course Technology PTR Game Development Series)
ISBN: 159200136X
EAN: 2147483647
Year: 2006
Pages: 197

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net