Home
Quake Architecture
Super Spectator Architecture
Pseudocamera functions
Usage

Design

Quake 3: Architecture

Quake is an online (or LAN) multiplayer game, and hence is structured in a classic server - client architecture. A "host" machine would create a game and many clients can connect to this machine and play the game. Both the server and the client rely on the engine. The engine does all the neworking, rendering, and other game essential calculations.

Server Client Architecture

Server

To play Quake, you need to set up a server. This server holds the information necessary to play the game. The server recieves commands and information from all the clients connected to it, and accordingly sends commands and information to all or respective clients.

The server that is set up for the game can either be a dedicated or a non-dedicated server. On a dedicated server, the server machine cannot "play" the game, instead it simply holds the information allows for the clients to play on a server. This means that no rendering is required on the server, making it a lot faster. On a non-dedicated server, the server can actually be playing a game, ie be a client on itself. This is a little slower as the server needs to perform extra functions such as rendering. But its ability to view the game, and also play it gives a big advantage to the user.

To get a little more detail about how the server works and its functions, click here

Client

The client are all individual players (or spectators) that want to take part in the game. Each client would connect to the server, accept the rules of the server and join in the game. The client has functions which allow for a user interface (such as keys), and has various other functions to allow for a smooth movement of the client, scoreboards, menus and functions that are fairly independent of the server, ie. the client can do them without the need of the server.

The client also has enough information about the map, players, player states, player positions and other items. These are not determined by the client, but this information is received from the server for rendering and playing purposes.

To learn more about the client code, click here

Server-Client Game play

When a player performs a basic function, such as a move, the client performs a predict move, ie where it would be if the command was successful. This gives the game a smooth feel. That command is then sent to the server, who knows where this command came from. The server performs similair calculations that were done on the client, the lets the client know what its final position is. This is then sent to all the clients connected to the server, so every client knows where each client is.

All the commands that are send back and forth from the client-server, are sent through the Quake engine and over the network. Commands which are sent to and from server and the client are sent using the trap_SendServerCommand and the trap_SendClientCommand respectively