Quake2 Cluster Project An addition and modification of iD Software's Quake2 shared library sources which enable Quake2 servers running this library to interconnect other servers which speak the protocol developed under the Quake2 Cluster Project. Copyright (c) 1998 Justin Randall and Todd Bliss Preamble: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. See COPYING.txt for more information. More info: http://www.planetquake.com/logic QUICK START Example: a 2 Server Cluster Server1 quake2.exe +set dedicated 1 +set game cluster +set admin_password foo +map base1 +set deathmatch 1 +set port 27910 Server2 quake2.exe +set dedicated 1 +set game cluster +set admin_password foo +map base2 +set deathmatch 1 +set port 27920 Connect to Server1 press your ~ key on the client to bring up a console enter: password foo Go to the exit elevator on base1, we will put our exit there enter: cmd spawn exit base1base2 enter: cmd link base1base2 Server2 (Whatever Server2's IP address is) step just outside of the elevator enter: cmd spawn entrance base2base1 OK, this server is set up, lets perform a similar process on Server2 Go to the default entrance elevator on Base2 (Server2's map) enter: cmd spawn exit base2base1 Step outside the elevator enter: cmd spawn entrance base1base2 enter: cmd link base2base1 Server1 (Whatever Server1's IP address is) After a couple of seconds, an exit should appear (glowing BFG blast) in the elevator. Walk through it to test the connection. Introduction: The Quake2 Cluster Project was born on January 4th, 1998. Actually, the concept behind the project was born in the days of Doom when the ramifications of networked, first-person shoot-em-up games were realized. It wasn't until Quake2 that such a project seemed feasable. Overview: A Quake2 Cluster is a coordinated, logical aggregation of quake2 servers. The whole concept of Master/Slave servers has been removed as of version 0.3. Connectivity is now defined by the link entities between systems. Joining the servers, from a player's perspective, consists of using a series of "interlinks". Interlinks are entities spawned by an administrative player in the game. They have a name, and describe a destination map that players should be transported to when the interlink is used. Which servers belong to which maps are really not relavant to creating these entities. That's all handled by the database. If a server handling map base2 dies, and another server running map base2 starts and registers with the database, it will take the old server's place as a viable destination for clients. The master translates the interlink's destination map to a server address for the client. Interlinks can be dynamically added to and removed from any server in the cluster. Whenever a change in the status of the interlinks is detected, a file is saved on the server. If the server crashes or is shutdown, the interlinks will be reloaded when the server is started. Instructions: 1. unzip the game distribution into your quake2 directory. Be sure to unzip ip recursively (pkunzip -d, "use folder names" in winzip, or tar zxvf on Linux). This will create a directory called "cluster", with a "game" directory beneath that which contains the source code and copying info for this modification. 2. start the server: quake2 +set dedicated 1 +set deathmatch 1 [+set admin_password ] +map [+set rcon_password ] [+set port ] *See note Parameters in []'s are optional. This mod should be run only on a dedicated quake2 server. "+set deathmatch 1" overcomes some CPU utilization issues in iD's 3.10 patch for quake2. "+set admin_password " sets the cluster administrator password. A client is authenticated using his password variable, so if you want to administer your cluster (add/remove interlinks, list exits, etc..) set your password on your quake2 client by typing set password "the password I used on the server comand line" at the q2 client console. (press ~ to bring up a console on the client). "+set port " is option, *NOTE: if you are running MORE than one instance of a cluster server on a machine, you MUST set the port number on subsequent instances of the server. This is true for any quake2 server machine that is running more than one game at a time. The admin_password defaults to "logic", so unless you want everyone in the world to create and remove exits from your cluster, you will need to set this parameter. The port defaults to 27910, and the map will default to base1 if they are omitted. If there are multiple cluster servers running on the same machine, then the first one started is running the database. The rest detect this and terminate their referral database processes. If each server in the cluster is on a different machine, then each server will be running a database process. Client CMD's cmd spawn exit This creates an exit link entity. The name is not important until you go to link it. The ENTRANCE on the other server that this entity will link to MUST have the same name! No exit will appear until there is a valid link between servers. If the remote server is full, the exit will not appear (don't worry, it is there). cmd spawn entrance This is the other side of the link. Multiple exits can point to the same entrance *as long as they all have the same name*. The entrance entity sends information to various exits on the network --that it exists, and that it will or will not accept players on the server (e.g. full server). Entrance entity names MUST be unique for each machine (just the machine, other machines on the network can have entrances with the same name). cmd link This links an exit entity to an entrance entity on the remote Q2 server. The entrance entity must have the same name as the exit that is linking to it. There is no need to know the port number of the remote q2 server. There is a referral service running on the remote system that will point the exit to the correct instance of quake2. cmd delete link Removes a link entity from the server. If it is an entrance, then all of its corresponding exits on the cluster will turn off (not be deleted, just turn off). cmd list links Lists all of the link entities on a server, along with a brief status. Entrance entities are always ready to accept connections. Exit entities are either NOT YET LINKED, LINKED TO, or WAITING FOR A HEARTBEAT. If it is NOT YET LINKED to another server, then issue a cmd link . If it is WAITING FOR A HEARTBEAT, then be sure that the entrance on the remote server exists and has the same name. cmd list servers Lists all servers participating in the cluster. It is partially broken in this version of the protocol. Servers that leave the cluster are not properly removed from the list. cmd invinc [