Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 1 (modified by smerkli, 14 years ago) (diff)

Concept

The master server keeps an up-to-date list of all public servers available on the internet. If a client wants to play an online game with others, it can retrieve this list from the master server and then select a game server to connect to. Game servers inform the master server of their availability and of any changes to their state (number of players online, ping, server name etc). They also send keepalives packets every once in a while so the master server can find out if servers abnormally went offline.

Program structure and parts

The following list is to be used as a programming guideline and will ultimately be removed from this wiki entry. It's only here because it might be subject to discussion.

  • Server-list related
    • manipulations
      • add server,
      • update server data,
      • remove server
    • efficient storage
  • Communication-related
    • Client - master server communication
      • Process queries
      • Send replies
    • Game server - master server communication
      • Process queries
      • Send replies

Draft protocol outline

The protocol to be used should be kept as compact and overseeable as possible. This is currently only a draft, so feel free to add/remove/comment things.

Game client queries

Queries a game client sends to the master server.

  • get server list
  • get stats (uptime, number of servers, etc)

Server queries and actions

Queries and requests a game server sends to the master server.

  • register new server
  • update server data
  • remove server
  • keepalive

Replies

  • data: server list
  • data: stats (different kinds of stats to follow)
  • acknowledge
  • bad request

Open design questions / Problems

  • TCP or UDP?
  • Networking library or own implementation?
  • Server browser in game client and communications code in game server