Home > Articles > Programming

  • Print
  • + Share This
From the author of

DirectPlay Components

DirectPlay is made up of many smaller components. For the sake of brevity, the following sections discuss the most commonly used components, and what each provides.

Lobbies

Lobbies are virtual locations where people playing games can meet to discuss the game, organize a competition, or just waste some time. In a lobby, the most common data sent to the server and each player consists of text messages and startup information for the game.

Clients

Clients in DirectPlay are just like clients on any network; they're the consumers of data. They receive update information on the position, condition, and messages of other players. This data comes from a server to which the client is connected.

Servers

Servers are the central information-gathering facility for multiplayer network games. The server handles the traffic control of all the messages and data in the network game. Servers have two purposes: receiving information from the players (clients) and transmitting information to the players. Figure 1 shows how clients and servers interact.

Figure 1 Clients communicating with a server.

Peers

Peers are similar to clients, but peers are clients who only talk to one another. The most common peer configuration is two computers of equal status talking to one another. If you've ever seen two computers playing a game without going through the Internet, you've seen a peer configuration (see Figure 2).

Figure 2 Peer-to-peer communications.

Addresses

Addresses are unique identifiers for the location of a server or client on the network or Internet. With this information, DirectPlay can ensure that data is sent directly to the correct user.

GUIDs

To keep track of the game in play, users are assigned a Global Unique Identifier (GUID). The GUID is unique to the game (or program) that the users are accessing. The use of GUIDs ensures that the data you send can only go to clients/servers with the same GUID.

  • + Share This
  • 🔖 Save To Your Account