diff options
Diffstat (limited to 'src/body')
| -rwxr-xr-x | src/body/background.tex | 37 | ||||
| -rwxr-xr-x | src/body/credits.tex | 4 | ||||
| -rwxr-xr-x | src/body/heartbeat.tex | 50 | ||||
| -rwxr-xr-x | src/body/implementation.tex | 3 | ||||
| -rwxr-xr-x | src/body/introduction.tex | 25 | ||||
| -rwxr-xr-x | src/body/revisions.tex | 3 | ||||
| -rwxr-xr-x | src/body/serverlist.tex | 20 | ||||
| -rwxr-xr-x | src/body/status.tex | 17 | ||||
| -rwxr-xr-x | src/body/website.tex | 7 |
9 files changed, 166 insertions, 0 deletions
diff --git a/src/body/background.tex b/src/body/background.tex new file mode 100755 index 0000000..a7d0e3b --- /dev/null +++ b/src/body/background.tex @@ -0,0 +1,37 @@ +\chapter{Background} +\label{chap:bg} + +In this chapter we introduce the concept of a masterserver and describe why legacy games depend on it. + +\section{Online games} +The concept of online gaming is a bit vague. Everybody plays from their own computer and it is not always clear what interaction occurs at which side of the internet connection. In order to illustrate the different kinds of networking, we compare online games with their analogue variants: chess and poker. With chess, the two players could be playing on the same board or could be a large distance apart and communicate their moves by telephone: player one states he moves his rook from coordinates A3 to E3 and player two could respond by telling to move his pawn from C7 to C6. Both players are aware of the moves on the board and are playing the same game. With poker, on the other hand, it will be a lot more difficult to keep players appraised of the same game information without telling each other which cards they are holding. This requires of an independent party, the dealer. This dealer would communicate with each player individually which cards (s)he received from the deck and whether this person raises the pot. These analogue representations of multiplayer games can be described as peer-to-peer (chess) and server-client (poker) approaches. With a peer-to-peer game, players are directly connected to each other and are both aware of all aspects in the game. With a server-client game, each player has their unique response that the others are unaware of and only the server is capable of exchanging information between the others. + +From the poker analogy, we continue to multiple games. In the local bar, several groups of people are playing different rounds of poker on each table in different room. Every room has its own table, dealer and participants, independent from all other rooms and tables. In order to participate in a round of poker, you therefore only need to remember the address of the bar in order to gain access to all of the poker tables. Once you enter the bar, you ask the barkeep in which rooms the poker tables are located. The barkeep will tell you which rooms there are and you can look around the rooms to decide which table you want to join. The barkeep represents the masterserver, who keeps a list of all servers (rooms or poker tables) that are available. You do not need to maintain a record of the ever changing room/table list, instead one can just access the information directly from the barkeep. + +\section{Game interactions} +To illustrate the more technical interactions between dealers, barkeep and player, we create three roles: {\bf gameserver}, {\bf masterserver} and {\bf client}\footnote{We refer to \emph{gameservers} and \emph{masterservers} instead of \emph{game-} and \emph{master} servers. The latter is correct English, but the former improves readability and avoids confusion about what type of server we explicitly try to describe.} in figure \ref{fig:totaloverview}. When a gameserver is initialised, it repeatedly sends a signal to the masterserver (1). We refer to these signals as \emph{heartbeats}, as the masterserver listens for these signals to determine if the gameserver is still active, similar to how we listen for heartbeats in the human body to determine if somebody is still alive. Game clients make a request to the masterserver to obtain a list of all servers that sent heartbeats and the masterserver provides this list (2). The client then inquires at all of these gameservers for their information (or \emph{status}) so that the user can make a choice which gameserver to join (3). + +\begin{figure}[ht] + \centering + \includegraphics[width=\textwidth]{img/general-overview} + \caption{General interactions between gameserver, masterserver and client.}\label{fig:totaloverview} +\end{figure} + +All interactions between gameserver, masterserver and client occur over the internet. To avoid a wild growth of different methods to convey the information, GameSpy created a format of communication to handle many games with the same approach. When different gameservers follow the same protocol, the same interaction can be applied for a large variety in games. In other words, one barkeep could keep a room list for poker, monopoly, bridge and other games, instead of having one barkeep for every game: the masterserver can handle different games that use the same form of communication. + + +\section{Networking} +In the next chapters we address every interaction between gameserver, masterserver and client, but first we describe what we consider to be some required general knowledge about network communication and protocol. Since there is a variety of literature available for in-depth knowledge, we limit ourselves to the essential information that is necessary to understand the following chapters.\\ + +There are multiple methods to send information over the internet between peers. The two most important methods are \emph{UDP} and \emph{TCP} communication. Imagine that there is a speaker in front of a large audience. In order to get to know the audience, the speaker could ask everyone to shout their names. Everyone would shout their names one by one to the speaker and hope that the speaker would hear them properly. The \emph{user datagram protocol} (UDP) is similar to this situation: a gameserver sends a heartbeat to the masterserver, but there is no guarantee that information is correctly received or in the correct order.\\ + +The other method would be for the speaker to ask the audience to walk up to him one by one, shake hands and introduce themselves before sitting down again. The \emph{Transfer Control Protocol} handles information in the same way: a client connects with the masterserver, identifies itself and retrieves the serverlist. As one could imagine, the information is conveyed correctly, but at the expense of a much larger duration of the interaction. The choice for either of these protocols in the game interactions is defined by the circumstances: some interactions require speed rather than precision, some interactions require precision over speed. + +\section{Protocols} +Any form of communication, whether it is on the street, in the shop or digitally between two or more computers, follows a certain communication structure. During any meeting we often shake hands \footnote{This was before the global nCovid-19 pandemic.} and introduce ourselves before getting to business. This is called a \emph{protocol}. A protocol is a set of agreements that all communicating parties follow in order to convey information. + +Many of the interactions that we discuss in this document follow the \emph{GameSpy} protocol. This protocol was, as the name suggests, developed by GameSpy Industries\cite{gs0} and contains a series of steps to perform the interactions as described in figure \ref{fig:totaloverview}. The formatting of these interactions are defined in the protocol and described in the next chapter as well. + +Over the years, there have been iterations and expansions of this protocol, as well as completely new and different protocols by different third parties. The 333networks masterserver that we describe in the following chapters uses the GameSpy protocol as foundation and expands from there where necessary. + + diff --git a/src/body/credits.tex b/src/body/credits.tex new file mode 100755 index 0000000..bb0d91c --- /dev/null +++ b/src/body/credits.tex @@ -0,0 +1,4 @@ +\chapter*{Acknowledgements} +\label{chap:acks} +Acknowledgements for everybody who contributed. Company names/people first, then people who actively contributed/edit and fact checking, helped with images/figures, then people who proofread it. + diff --git a/src/body/heartbeat.tex b/src/body/heartbeat.tex new file mode 100755 index 0000000..ad365fb --- /dev/null +++ b/src/body/heartbeat.tex @@ -0,0 +1,50 @@ +\chapter{Heartbeat} +\label{chap:heartbeat} + +In this chapter, we discuss what information a heartbeat contains and how it is processed by the masterserver. + +\begin{figure}[ht] + \centering + \includegraphics[width=\textwidth]{img/overview-hb} + \caption{Focus on interaction between gameserver and masterserver}\label{fig:overviewhb} +\end{figure} + +\section{Exchange} +When a gameserver is first initialised, it sends a signal to the masterserver as seen in figure \ref{fig:overviewhb}. This message contains the gameservers IP-address, the port on which the hosted game is active and an acronym or shorthand name for the game title. + +The masterserver receives this message or \emph{heartbeat} and processes this information. As any user or automated software can send these messages, the masterserver will attempt to authenticate the game title by challenging the gameserver with a code phrase. Both the gameserver and masterserver have the necessary algorithm to determine the expected response. The gameserver returns this response and is either rejected as an invalid sender, or acknowledged as a legitimate gameserver and added to the masterserver's list of gameservers. + +Heartbeats are sent repeatedly to indicate that a server is still active. The name ``heartbeat'' is especially similar to how we listen for heartbeats in the human body to determine if somebody is still alive. When the gameserver stops sending heartbeats, the masterserver no longer considers the gameserver active and removes it from the list. + +This exchange is visualised in a diagram in figure \ref{fig:heartbeat} where the vertical axis represents passing time and the horizontal interactions correspond to the exchange discussed above. + +\begin{figure}[ht] + \centering + \includegraphics[width=\textwidth]{img/heartbeat-exchange} + \caption{Interaction between gameserver and masterserver}\label{fig:heartbeat} +\end{figure} + +\section{Secure challenge} +To authenticate the validity of gameserver, masterserver and client, the GameSpy protocol introduced the \emph{secure}-challenge. In the case of a heartbeat, the masterserver attempts to authenticate the gameserver by sending it a 6-character \emph{secure} word. Both the masterserver and gameserver have a 6-character \emph{cipher} that is associated with the unique game title and perform a series of mathematical operations on the combination of the secure word and cipher. The result is a unique 8-character \emph{validate} word. If the masterserver and gameserver both arrive at the same word, the gameserver validates as legitimate and is added to the list of online gameservers. + +Both the secure word and cipher may consist of any uppercase or lowercase character and any number. The validate word is a calculated response and can contain any uppercase or lowercase character and any number, but also certain special characters such as (back)slashes, underscores and dashes. Later versions of the algorithm also allow to specify an encryption type, which results in a different validate word. The algorithm to determine the validate word consists of a series of array operations and is purely mathematical\cite{lam}. + +\section{Formatting} +Many of the games published between 1995 and 2005 follow the GameSpy protocol\cite{gs0} and communicate heartbeats over the user datagram protocol (UDP). Sending data over UDP is fast at the risk of losing packets, corrupted packets or the information arriving out of order. Heartbeats contain only little quantities of information and are sent every few minutes, which minimises the risk and effect of data not arriving properly. + +\lstinputlisting[caption={Example of the GameSpy protocol message formatting.}, stepnumber=1, label={ls:gs0prot}]{lst/gs0protocol.txt} + +The GameSpy protocol formats the messages through a backslash. In example \ref{ls:gs0prot}, the first line specifies the general format where there is a keyword, followed by a value, both prefixed by a backslash. A simple heartbeat can be represented by the second line of the example: the {\tt heartbeat} key indicates that the next value is the network port through which the gameserver can be queried and the {\tt gamename} key indicates that the next value is an acronym or shorthand for the game title. An example of how the secure challenge and response would appear is seen at lines 3 and 4. + +The minimum requirement for a heartbeat is an empty UDP packet. This conveys the IP-address of the gameserver. A masterserver specifically developed to support this single game title can automatically generate the default network port and game title. However, this means that the gameserver can not be serviced on another network port and that the masterserver is limited to serving a client list \emph{only} for this specific game title. + +In order to support different network ports, a heartbeat must contain a network port (as seen in example \ref{ls:gs0prot}, line 0). A masterserver that supports multiple game titles also requires an additional key {\tt gamename}. The gamename is, as mentioned before, a unique identifier for the game title and allows the masterserver to identify which game is being serviced and authenticated\footnote{The game title and \emph{gamename} both refer to the original publications from game developers. As per the protocol, we use the word ``gamename'' to refer to these titles from now on. This term returns in chapter \ref{chap:serverlist} and \ref{chap:status}}. + +Additional information is often incorporated in the heartbeat as well. Some developers allow the indication of a new session through the {\tt statechanged} keyword, that could be used to indicate to the masterserver that a new session or map has been started. An overview of the protocol is added in appendix \ref{app:protref}. + +\section{Practical execution} +In the past fifteen years, we have seen many different ways of formatting a heartbeat. It is worth noting that many game developers deviate from the specified protocol. Some games like \emph{Vietcong}, published by \emph{Gathering of Developers} in 2003, do not specify a {\tt gamename} in their heartbeat, which does not make it possible to support the game on a masterserver for multiple gamenames. + +Another game, \emph{Jetfighter IV: Fortress America} published by \emph{TalonSoft} in 2000, was originally developed with a single masterserver in mind, but did not follow protocol. The gameserver specifies the gamename \emph{jetfighter4} whereas the client specifies the gamename \emph{Jet Fighter IV} for the same game. + +These inconsistencies and/or deviations from the original protocol introduce unexpected obstacles in the development process of a replacement masterserver. diff --git a/src/body/implementation.tex b/src/body/implementation.tex new file mode 100755 index 0000000..871f813 --- /dev/null +++ b/src/body/implementation.tex @@ -0,0 +1,3 @@ +\chapter{Implementation} +\label{chap:implementation} + diff --git a/src/body/introduction.tex b/src/body/introduction.tex new file mode 100755 index 0000000..153195e --- /dev/null +++ b/src/body/introduction.tex @@ -0,0 +1,25 @@ +\chapter{Introduction} +\label{introduction} +\pagenumbering{arabic} +\setcounter{page}{6} + +For more than fifteen years, 333networks has been hosting a masterserver. A lot of design iterations were made over the years. In this document, all acquired knowledge has been collected. + +\section{Online gaming} +Since the early years of classic and modern (electronic) games, people have felt a need to play together. In the eighties, text- and turn-based games found their way onto universities' mainframes and formed the base for multiplayer games. As personal computers became the norm, the introduction of the personal computer made it possible for people at home to play together on a system with split screen and four hands on a keyboard. With the invention of the internet, it became possible to play together over great distances. + +\section{Masterserver} +Since 1995, a large number of game titles were released with the capability to play online together. Online games provided the need for the development of networking protocols that made it possible to play together on different systems. Some games required a direct connection with each other (peer-to-peer) whereas other games utilised a server-client hierarchy. In order to find each other on the vastness of the world wide web, technologies were developed to connect peers, game servers and clients together. One of the technologies that was developed for this purpose was a \emph{masterserver}. This technology provides an infrastructure for game servers and game players to interact and play together.\\ + +Game developers would initially develop their own multiplayer protocol and masterserver for their game title. With the rise of \emph{GameSpy Industries} in 1995, game developers had the possibility to choose for proprietary software and third party services to provide the multiplayer aspects, matchmaking and masterserver support for their games. With the rise of broadband internet and reliable masterserver services available, it was no longer necessary to develop their own protocols and maintain their own masterserver hardware. Many game developers followed and dependant on \emph{GameSpy}'s services or discontinued their own masterserver infrastructure in favour of the existing services. + +\section{Loss of GameSpy} +In the autumn of 2008, all masterserver services for two of the titles, \emph{Unreal} and \emph{Unreal Tournament 1999} published by \emph{Epic Megagames Inc\textsuperscript{\textcopyright}} went down at the same time. For three days, thousands of players, were frustrated that not a single online server showed up in the server browser\cite{bu2008,ou2008}. In the spring of 2010, the masterserver infrastructure became even more fragile when the rebranded \emph{Epic Games} permanently shut down their masterserver. Effectively, thousands of gamers now depended on a single remaining GameSpy masterserver. In December 2013, \emph{GameSpy Industries} was bought by GLU Technologies, leading to the shutdown of all \emph{GameSpy} services on May 31, 2014\cite{nutt2014, stapleton2013}.\\ + +Game developers and publishers who had relied on \emph{GameSpy} to provide online multiplayer support for two decades, were left empty-handed. People who bought expensive game titles were no longer able to play online in the era where connecting with each other is essential. In response to the shutdown, some game developers like \emph{Epic Games} returned to an in-house solution. Many other multiplayer titles and their communities had no such luck. + +\section{Filling the void} +In the early years of this century, a number of Unreal Tournament players and their clans worked together to display (interactive) statistics of their game servers. Through \emph{php}-scripts it was possible to obtain server information and display this on websites for one or more individual servers. With a small group of people, we started \emph{333networks} as a statistics website and private game server host for Unreal Tournament 1999. With more understanding of \emph{server queries} and \emph{network infrastructure}, 333networks started experimenting with replicating properties of the masterserver to obtain more server information for display. This lead to the development of an intrinsic masterserver that could list all cooperating Unreal Tournament servers on the website. Due to various successes, 333networks continued with the development of a fully functional masterserver with integrated website, which was completed mere months before \emph{GameSpy} shut down in 2014. This document contains all the knowledge that was accumulated in the process of developing and expanding the 333networks version of the masterserver. + +\section{Content overview} +TODO: in this section we describe what information can be found where. This is not a repetition of the table of contents, but a contextual, descriptive narration of the document itself to justify the chosen order of information. Save this for later. diff --git a/src/body/revisions.tex b/src/body/revisions.tex new file mode 100755 index 0000000..3364e57 --- /dev/null +++ b/src/body/revisions.tex @@ -0,0 +1,3 @@ +\chapter*{Revisions} +\markboth{Revisions}\\ +table with date and changes. Until v1.0 ready: to-do list. diff --git a/src/body/serverlist.tex b/src/body/serverlist.tex new file mode 100755 index 0000000..d7c0a64 --- /dev/null +++ b/src/body/serverlist.tex @@ -0,0 +1,20 @@ +\chapter{Serverlist} +\label{chap:serverlist} + +introduction how game clients (``players'') get their list of servers. +\begin{figure}[h] + \centering + \includegraphics[width=\textwidth]{img/overview-cms} + \caption{Focus on interaction between client and masterserver }\label{fig:overviewcms} +\end{figure} + +interaction, secure/validate, requests, TCP +\\ +procedure. + + +\begin{figure}[H] + \centering + \includegraphics[width=\textwidth]{img/client-exchange} + \caption{Interaction between client and masterserver over time.}\label{fig:client} +\end{figure} diff --git a/src/body/status.tex b/src/body/status.tex new file mode 100755 index 0000000..be0f264 --- /dev/null +++ b/src/body/status.tex @@ -0,0 +1,17 @@ +\chapter{Server status} +\label{chap:status} + +client-gameserver interaction. status, info, rules, relevant information, what purpose does it serve, etc\cite{oldunreal1}. + +\begin{figure}[h] + \centering + \includegraphics[width=\textwidth]{img/overview-cgs} + \caption{Focus on interaction between client and gameserver}\label{fig:overviewcgs} +\end{figure} + +\begin{figure}[H] + \centering + \includegraphics[width=\textwidth]{img/status-exchange} + \caption{Interaction between client and gameserver over time.}\label{fig:status} +\end{figure} + diff --git a/src/body/website.tex b/src/body/website.tex new file mode 100755 index 0000000..af9f86d --- /dev/null +++ b/src/body/website.tex @@ -0,0 +1,7 @@ +\chapter{Website} +\label{chap:website} + +Addition to the concept of the masterserver: website. Browse before joining, browse without starting the game and querying all servers individually, providing a fast web reference.\\ +\\ +Provides additional interfaces: JSON api, ip lookup, verification, method of being added. some items implemented as masterserver function, but created for the website. + |
