Network:OwnServer

From Scrabble3D Manual
Revision as of 10:06, 20 May 2014 by Ocye (Talk | contribs) (Created page with 'There is no need to run your own service to play with your friends. In addition to use the public server you can run games via direct connection. An own server …')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

There is no need to run your own service to play with your friends. In addition to use the public server you can run games via direct connection. An own server makes only sense to provide it as 24/7 service for a large number of users.

The server program itself is available at Sourceforge, either for ARM CPUs (eg. SheevaPlug or Raspberry Pi) with the option to use mySQL 5.0 or 5.5, and for i386 with mySQL 5.0 (both run on Linux). The program utilizes port 5001; make sure the port forwarding is configured appropriately. Furthermore you need a working mySQL/MariaDB database management system that consists of a table "Users" (the database name is variable, e.g. Scrabble3D, the table name is fix).

The table "Users" has to consists of the following fields:

Name text
Passwd text
Key int(11) auto_increment
GamesPlayed int(11)
Rating int(11)
Registered datetime
LastConnect datetime
LastIP text
LastMac text
Messages text
AllowKibitz tinyint(1)
Email varchar(255) 

In case of an exeption after the first start it might help to create one entry: INSERT INTO `Users`(`Name`, `Passwd`, `Key`, `GamesPlayed`, `Rating`, `Registered`, `LastConnect`, `LastIP`, `LastMac`, `Messages`, `AllowKibitz`, `Email`) VALUES ('testuser','password','1','1','1000','12/08/2012','12/08/2012','192.168.1.1','11111111','blah','1','test@test.com');

The server program is not a daemon, which means you must not close the shell where you started it. Use a terminal multiplexer like GNU Screen to logout, nonetheless.

You can pass the following parameters with the program start:

ScrabbleServer v0.2
Parameters:
 -u <user>
 -p <password>
 -d <database>
 -h (Shows this help)

Those that are not specified as parameter have to be entered later. That makes sense for at least the password for security reason.

Errors are saved in /var/log/Scrabble3D, but most serial output goes to the shell.

Every game is stored as singular file with a running number. After a configurable period of non-access these files are deleted but backed up previously to the file backup.tar (it is just a tar ball and not packed automatically).

All variables are loaded at startup from the file ScrabbleServer.ini:

[News]
Current=Welcome to the Free International Scrabble3D Server! //Message shown on connect

[General]
GameNumber=43834 //internal value; file name increment
MaxDaysForStoredGames=7 //games that are not accessed within this time are backed up
NumberOfBestPlayers=20 //how many players should be reported on best info
MaxNumberOfAccounts=3 //max number of accounts per user (MAC address counts)
TimeToAfk=600000 //time without action until user is treated as away from keyboard in ms 

[Banned_UID]
91:0e:4a:bf:10:d3=0 //you can ban users based on their MAC address; set value to 1 to activate 

To provide access to your server you may insert the address manually in the local Scrabble3D.conf:

<Servers Count="2">
 <f0 Name="Free International Scrabble3D Server" Address="scrabble3d.ignorelist.com"/>
 <f1 Name="FISS (old address)" Address="scrabble.game-server.cc"/>
</Servers>

In case of a dynamically allocated IP address a DNS service provider is very useful. If your server runs 24/7 and if you want to make it public for all people the better way is to publish your address via automatical update. Please contact the author for this option.

GeoLogo.png Language:

DeutschEnglishEspañolFrançaisGaeilgeGàidhligItalianoSvenska