TUD Meta-server Project

Link to the old Meta-server

Introduction

The Meta-server will use a database (Mysql on Sourceforge?) to store all (un)necessary information. The task could be devided into:

web frontend with following features

Meta-server functionality

Game server part

ER diagram of the new DB Model behind the new Meta-server

Resulting Database tables (my suggestion)

CREATE TABLE
GAMES
(
	SERVER CHAR(200) NOT NULL,  #// hostname
	PORT INT NOT NULL,          
	STARTTIME INT,              #// I would yust store time_t time() here perhaps you have a better idea
	ADMIN CHAR(20),             # foreign key to PLAYERS table
	LASTMSG INT,                #// time again
	LEVELNAME CHAR(200),
        COMMENT CHAR(250),          #// missing in the ER-diag.
	MAXPL INT,                  #// how much clients are accepted
	SETPL INT,                  #// No. of startpositions (not the same as maxpl)
        VERSION CHAR(20),           #// server version 
        PVERSION CHAR(20),          #// protocol version (both are missing in tge ER diagram)
	PRIMARY KEY(SERVER,PORT)
)

CREATE TABLE CONNECTEDPL
(
	NICK CHAR(20) NOT NULL,
	SERVER CHAR(200) NOT NULL,
	PORT INT NOT NULL,
	IDONSERVER INT NOT NULL,      #// is needed because it is allowed to connect twice 
                                      #// (also it doesn't work yet) - is missing in the ER-diagram
	UNITS INT NOT NULL DEFAULT 0,
	PING INT,
	REALSKIN CHAR(200) NOT NULL,  #// player perhaps doesn't have/use a own skin
        VERSION CHAR(20),             #// client ver., doesn't need protocol ver. 
                                      #// because he only is allowed to connect to the server \
                                      #//  if the versions match
	PRIMARY KEY(NICK,SERVER,PORT,IDONSERVER)
)

CREATE TABLE PLAYERS
(
	NICK CHAR(20) NOT NULL,
	SKIN CHAR(200),
	EMAIL CHAR(200),
	POINTS DOUBLE(8,2) NOT NULL DEFAULT 100,
	COMMENT CHAR(250),
	PASSWORD CHAR(100) NOT NULL,
	GAPLAYED INT NOT NULL DEFAULT 0,
	EXPIRE INT,                   # once again a time
	PRIMARY KEY(NICK)	
)
    

Messages (or Functions or RPC)

Sender is always the game server and recipient the Meta-server
TypeContentCommentReturn Value
Game startedSERVER,PORT,VERSION,PVERSION,ADMIN,PASSWORD,LEVELNAME,MAXPL,SETPL,COMMENTSTARTTIME and LASTMSG must be set,ADMIN PASSWORD must be checkedSUCCESS<=>PASSWORD correct
Game endSERVER,PORT,PASSWORD,WINNERS,LOOSERSADMIN PASSWORD must be checked, calculate new player points based on WINNERS and LOOSERS (both are lists of IDONSERVER and can't be calculated by the meta-server)SUCCESS<=>PASSWORD correct
Client info updateNICK,SERVER,PORT,IDONSERVER,UNITS,PING,REALSKIN,VERSION,CLIENTPASSWD,SERVERPASSWDLASTMSG must be set, both passwords must be checked, if player not already there insert himSUCCESS<=>passwords correct
Client left gameSERVER,PORT,IDONSERVER,CLIENTPASSWD,SERVERPASSWDLASTMSG must be set, both passwords must be checkedSUCCESS<=>passwords correct and player was there
Of course this is a quite simple approach and there is room for improvement. (But keep it simple ;-)
If you want start coding send an email to the TUD-ML


Jens Thiele
Last modified: Sun Feb 11 19:31:41 CET 2001