Real unattended multiplayer server mode?

For topics that do not fit in another sub-forum.

Moderator: Oberlus

Post Reply
Message
Author
UltraDMA
Space Krill
Posts: 2
Joined: Tue Dec 02, 2014 3:51 pm

Real unattended multiplayer server mode?

#1 Post by UltraDMA »

Hello,

if I understood correctly, a multiplayer-server still requires a local player to make his turns.
I strongly recommend to implement a real server-mode where the server runs entirely unattended and all players use remote client computers.
Then, a server can be run on a rented server and slow-running games with daily turn calculations become possible.

But maybe I just misunderstood the documentation ...

Cheers,
UltraDMA.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Real unattended multiplayer server mode?

#2 Post by Dilvish »

UltraDMA wrote:if I understood correctly, a multiplayer-server still requires a local player to make his turns.... But maybe I just misunderstood the documentation ...
The online documentation was incomplete, and the info available via command line --help was also spotty. I've augmented the Multiplayer wiki page with instructions for running multiplayer with an external server. I've only done a bit of testing of those instructions, though, so please speak up if you run into trouble or if any of the instructions are not clear enough.

Geoff, Vezzra, it would probably be good if you could double check my Windows and OSX references (plus any additional checking of the instructions that you care to do).
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Real unattended multiplayer server mode?

#3 Post by Geoff the Medio »

(As stated elsewhere) you don't need the --force-external-server for a multiplayer game. It's only needed for starting a single player game with an already-running server.

You can also type the server address into the multiplayer connect dialog; command line switches aren't needed.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Real unattended multiplayer server mode?

#4 Post by Dilvish »

Geoff the Medio wrote:(As stated elsewhere) you don't need the --force-external-server for a multiplayer game. It's only needed for starting a single player game with an already-running server.
Hmm, ok I guess I got misled by one of my initial tests. Without that switch, when going into the multiplayer setup screen my client launches an new freeoriond server process. I had thought I had tested if it was actually using that new server process, and that's why I had written it up as I did. But looking into it again now, I see that the new server process goes zombie immediately and is not used. At this point I'm not sure if I had botched my previous test, or if there is something more funky going on, but I've gone ahead and rewritten the multiplayer instructions to drop the --force-external-server.
Geoff the Medio wrote:You can also type the server address into the multiplayer connect dialog; command line switches aren't needed.
I can't type anything into that address box unless I choose 'join' rather than 'host', and in that case the screen simply goes black upon hitting 'ok', instead of progressing to the multiplayer setup screen. Does it work differently on Windows?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Real unattended multiplayer server mode?

#5 Post by Geoff the Medio »

Dilvish wrote:Without that switch, when going into the multiplayer setup screen my client launches an new freeoriond server process.
Hmm... odd... If I launch a freeoriond.exe before starting freeorion.exe and hosting a new game a localhost, I don't get any extra freeoriond.exe starting, even without the swtich...

UltraDMA
Space Krill
Posts: 2
Joined: Tue Dec 02, 2014 3:51 pm

Re: Real unattended multiplayer server mode?

#6 Post by UltraDMA »

That sounds interesting. I'll revisit the documentation soon and think of setting up a server.

Thanks!

Still one question:
Does the server have any user interface beside the console I/O? So, are there any requirements concerning the graphics system as for the clients?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Real unattended multiplayer server mode?

#7 Post by Geoff the Medio »

UltraDMA wrote:Does the server have any user interface beside the console I/O?
Not directly, although it can read config.xml and is sent instructions by the human client.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Real unattended multiplayer server mode?

#8 Post by Geoff the Medio »

Dilvish wrote:I can't type anything into th[e server] address box unless I choose 'join' rather than 'host', and in that case the screen simply goes black upon hitting 'ok', instead of progressing to the multiplayer setup screen.
You might be right about needing to use --force-external-server in the case of hosting a remote multiplayer server... But in that case, if you can't type in a server address, how can you join a remote server as the host at all then?

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Real unattended multiplayer server mode?

#9 Post by Dilvish »

Geoff the Medio wrote:But in that case, if you can't type in a server address, how can you join a remote server as the host at all then?
from freeorion --help:

Code: Select all

--external-server-address
     Address to connect to in external server mode. If used, this client
     becomes the manager of the game. | Default: localhost
manager ~= host. I tested and this works; I tried to explain it slightly more fully than this on the wiki page, but perhaps didn't succeed well. I did indicate that only the 'host' of the game should connect in this fashion. I did not test what happens if more than one person tries to connect to the server in this fashion.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Real unattended multiplayer server mode?

#10 Post by Dilvish »

UltraDMA wrote:Does the server have any user interface beside the console I/O? So, are there any requirements concerning the graphics system as for the clients?
After being started the only input to the server is via networking with the clients. So, it will just sit waiting for a client to connect; I don't think there is currently any way to have it only allow host connections from certain IPs or somesuch, but if you wanted that and can do a modest bit of C++ putting some kind of gate in place shouldn't be too bad. It has a small bit of output to the console-- "FreeOrion server waiting for network events" upon startup, and error messages such as if the content files don't have the right structure, and probably if there is a networking error.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply