Difference between revisions of "Server (UFO2000)"

From UFOpaedia
Jump to navigation Jump to search
Line 35: Line 35:
  
 
=Setting up your own game server=
 
=Setting up your own game server=
In principle, for playing online, you ''do need'' an online server. Usually the public <code>ufo2000.net</code> server should do just fine. But maybe you want to set up a private server or a backup server. In order to do so, you can either use the supplied [http://prdownloads.sourceforge.net/ufo2000/ufo2000-0.9.1176-beta.exe?download precompiled ufo2000.exe] from the [[http://ufo2000.sourceforge.net project page]], or for linux, you will need to compile it yourself. Don't worry, the latter is no real problem.
+
In principle, for playing online, you ''do need'' an online server. Usually the public <code>ufo2000.net</code> server should do just fine. But maybe you want to set up a private server or a backup server. In order to do so, you can either use the supplied [http://prdownloads.sourceforge.net/ufo2000/ufo2000-0.9.1176-beta.exe?download precompiled ufo2000.exe] from the [http://ufo2000.sourceforge.net project page], or for linux, you will need to compile it yourself. Don't worry, the latter is no real problem.
  
 
==Requirements==
 
==Requirements==

Revision as of 11:41, 25 May 2015

Logging in to the game server

The server connecting screen

Pressing "connect to internet server" will take you to the server connection screen. In this screen you will see a login box with three lines: Serverconnect.jpg

The Official server

The first is the server location line. It should say: ufo2000.net:2000 if you want to login to the official UFO2000 game server. All players should log into this server, if available.

Error trying to connect

If you receive this message: Failconnect.jpg It may be so that the official server can't be reached currently. There is a back-up server which you can play on.

The Back-up Server

Change the first line of the login box to one of the following servers:

  • ufo2000.kostax.cz:2000
  • ufo2000.openxcom.com
  • mobile-infanterie.gamersunitonline.net (will only be online on request for a shot period of time, contact: 7saturn@gmx.de
to play on the back-up server.

Your player name for your account

In the second line you have to enter your desired player name: In the picture this is Mister Kill. A maximum of 16 characters is set for your player name

The password for your player name account

The third line is the password line. Enter your desired password here. BEWARE!! There is NO WAY OF RETREIVING a lost password so WRITE DOWN YOUR PASSWORD!!

Also be sure not to use any valuable passwords with this service.

The Auto-login box

Leave the autologin box emty. (if you have autologin on you can't change your name unless you disable it first. Do this in the ufo2000.ini file in the ufo2000 folder)

Connecting to the server

To login to the server press OK!

Setting up your own game server

In principle, for playing online, you do need an online server. Usually the public ufo2000.net server should do just fine. But maybe you want to set up a private server or a backup server. In order to do so, you can either use the supplied precompiled ufo2000.exe from the project page, or for linux, you will need to compile it yourself. Don't worry, the latter is no real problem.

Requirements

First, you will need the following to libraries:

  • libhawknl-dev
  • libsqlite3-dev

If you have never before compiled anything, it might be necessary, to also install the Build essentials. Here's an example for installing these libraries on an ubuntu 14.04:

 sudo apt-get install libhawknl-dev libsqlite3-dev build-essential

After that, you will need the source files of UFO2000. To obtain them, you can use the svn-repository:

Getting the sources

svn checkout svn://svn.code.sf.net/p/ufo2000/code/trunk ufo2000-code
cd ufo2000-code 

This downloads the current svn-version of UFO2000 into the directory ufo2000-code and switches into that new directory. You can as well get that with the .tar.bz2-file from the project site.

Compiling the server

After that, you only need to compile it with

make server

That's it. You then should find a binary named ufo2000-srv.

Running the server

Starting and stopping

You can either start it manually (stopping with CTRL+C) or let it be done by an init-script. For the moment, it is not recommended, to use the demonized-mode, as there have been [reports of problems with that].

Ports and routers

When running, the server automatically opens up a tiny web server, showing the current players on the server. You can reach it via http://<server-adress>:2000. The Port 2000 (TCP) is also the port, where the server listens for connections of the game. If you run it behind a NAT (e. g. used by most home routers), you will also need to forward that port to the computer, running the service.

Configuration

The file ufo2000-srv.conf contains a few options for configuration:

daemonize               = 0
tcp_port                = 2000
players_count_limit     = 32
connections_count_limit = 64
login_time_limit        = 10000
username_size_limit     = 25
packet_size_limit       = 65536

Most of it should be rather self explaining. As said before, for the moment better not use the deamonize-option.

Stats and passwords

For all games, there is a function for recording of results. These results are saved in the file ufo2000.db. All users connecting to the server, will have the opportunity to choose a password, when connecting the first time with a certain user name. This password will remain! It's saved as a MD5-hash, and can only be changed by manipulating the database-table ufo2000_users. You can either delete a user completely, or let him give you a new password-hash. The user has no way of changing it himself and you won't have any means of recovering a lost password, as there are only hashes in the table.

Logs

The file ufo2000-srv.log contains running-logs. If you experience problems, first look there, to further isolate the problem.