project-navigation
Personal tools

Author Topic: Debian: ufoai-server package (dedicated)  (Read 4259 times)

Offline apo

  • Rookie
  • ***
  • Posts: 64
    • View Profile
Debian: ufoai-server package (dedicated)
« on: August 13, 2013, 04:51:03 pm »
Hi folks,

I'm working on an official release for Debian as I mentioned in this thread http://ufoai.org/forum/index.php/topic,7822.0.html.

One unresolved task is the ufoai-server package for the dedicated server of UFO:AI. I haven't played ufo in multiplayer mode yet. I understand that you need to open port 27910 to allow other players to join the server, if you host a listen server. However I can't see any dedicated internet servers to which i can connect to. Sorry if this seems like a silly question but does something like a master server exist for ufoai which announces dedicated servers around the globe? Or can't I simply connect to a internet server because there isn't any for the 2.5 developer version yet?

I'm also looking for more information about server cvars. I have found http://ufoai.org/wiki/Manual:FAQ#Multiplayer and http://ufoai.org/wiki/Cvars so far. My preliminary server package will contain a server.cfg in /etc/ufoai-server/ which is editable by users for a simple server wide ufoai-server installation.

The wiki says that the dedicated server needs all data pk3 files to function properly. However Mattn claimed that only 0base.pk3, 0ufos.pk3 and 0maps.pk3 should suffice. That sounds like a contradiction. What is true? :)

Is there a cvar to set the home directory of a user (the system wide Debian-ufoai server user) to another path?

What else do you deem important for a dedicated server package. What should be definitely included? Please voice your wishes here. :)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Debian: ufoai-server package (dedicated)
« Reply #1 on: August 13, 2013, 06:12:31 pm »
One unresolved task is the ufoai-server package for the dedicated server of UFO:AI. I haven't played ufo in multiplayer mode yet. I understand that you need to open port 27910 to allow other players to join the server, if you host a listen server. However I can't see any dedicated internet servers to which i can connect to. Sorry if this seems like a silly question but does something like a master server exist for ufoai which announces dedicated servers around the globe? Or can't I simply connect to a internet server because there isn't any for the 2.5 developer version yet?

It is possible that there just is no server - a list is here: http://ufoai.org/ufo/serverlist.txt (the masterserver url is in the cvar for the masterserver)

Quote
I'm also looking for more information about server cvars. I have found http://ufoai.org/wiki/Manual:FAQ#Multiplayer and http://ufoai.org/wiki/Cvars so far. My preliminary server package will contain a server.cfg in /etc/ufoai-server/ which is editable by users for a simple server wide ufoai-server installation.
The server cvars should all start with sv_* or g_* if you need a list, type "cvarlist g_" in the game console. But you might have to start a battlescape session to see all the g_* cvars (as they are created by the server game logic module that is only loaded when a map is active)

Quote
The wiki says that the dedicated server needs all data pk3 files to function properly. However Mattn claimed that only 0base.pk3, 0ufos.pk3 and 0maps.pk3 should suffice. That sounds like a contradiction. What is true? :)
Never ever trust that mattn guy. He's a strange one. Always double prove ;) I think I didn't say that I'm totally sure about it. This is something that must be checked.

Quote
Is there a cvar to set the home directory of a user (the system wide Debian-ufoai server user) to another path?
No, but you can override $HOME envvar - or - if you really don't like that (which i could understand), then i can add it to the latest master.

Offline apo

  • Rookie
  • ***
  • Posts: 64
    • View Profile
Re: Debian: ufoai-server package (dedicated)
« Reply #2 on: August 15, 2013, 07:37:51 pm »
It is possible that there just is no server - a list is here: http://ufoai.org/ufo/serverlist.txt (the masterserver url is in the cvar for the masterserver)

I saw an internet server today in addition to my local ufoai-server. It seems to work.

Quote
The server cvars should all start with sv_* or g_* if you need a list, type "cvarlist g_" in the game console. But you might have to start a battlescape session to see all the g_* cvars (as they are created by the server game logic module that is only loaded when a map is active)
Never ever trust that mattn guy. He's a strange one. Always double prove ;) I think I didn't say that I'm totally sure about it. This is something that must be checked.

Hehe. :) I'm experimenting only with 0base.pk3, 0ufos.pk3 and 0maps.pk3 for the server, so far there are no issues.

Quote
No, but you can override $HOME envvar - or - if you really don't like that (which i could understand), then i can add it to the latest master.

I think that shouldn't be necessary. Just to explain how the ufoai-server package works:

You can start the server with "service ufoai-server start".

On package installation a new user "Debian-ufoai" is created. This user owns /var/games/ufoai-server as $HOME directory for a simple but system-wide server setup.

There is one default configuration file in /etc/default/ufoai-server with whom you can pass default options to the daemon. By default the server uses a new and very basic Debian specific debian_server.cfg which resides in /etc/ufoai-server/server.cfg.

The executable is located at /usr/lib/ufoai-server/ufoded. In the same directory you can find the base directory but it contains only symlinks to the static *.pk3 files in /usr/share/games/ufoai and to our server.cfg in /etc/ufoai-server.

At last there is the ufoai-server wrapper script in /usr/games. I think a new "path_to_home" cvar isn't necessary at the moment. I can see that all logs are written to /var/games/ufoai-server/.ufoai/2.5-dev/base and I can also place mapcycle.txt in this directory and it is recognized by the server.

All in all the package is usable and simply needs some testing and some fine-tuning of the start parameters.