Page 1 of 1

What I'm doing wrong setting up multiplayer game?

Posted: Thu Feb 01, 2018 4:48 pm
by Oberlus
Geoff the Medio wrote:Set up a multiplayer game with no human players, and just yourself as an observer or moderator. You can specify starting species, and have the turns run automatically.
I set up a multiplayer game using the GUI, myself as an observer, added 6 AIs and started the game. Then I got kicked out to the main screen with a "You are no longer connected to the server" or something like this.

I attach the freeorion(d).logs. It didn't go pass the first turn.

Re: What I'm doing wrong setting up multiplayer game?

Posted: Thu Feb 01, 2018 5:06 pm
by o01eg
17:39:24.595964 [debug] FSM : ServerFSM.cpp:239 : ServerFSM::HandleNonLobbyDisconnection : Lost connection to player #7, named "AI_7".
17:39:24.596019 [error] FSM : ServerFSM.cpp:258 : Player #7, named "AI_7"quit before empire was eliminated.
17:39:24.596031 [debug] FSM : ServerFSM.cpp:271 : ServerFSM::HandleNonLobbyDisconnection : All human players disconnected; server terminating.
17:39:24.596039 [error] FSM : ServerFSM.cpp:275 : Unable to recover server terminating.
Looks like AI_7 died. Do you have its log?

Re: What I'm doing wrong setting up multiplayer game?

Posted: Thu Feb 01, 2018 5:30 pm
by Oberlus
Actually yes (lost the other logs since I started another non-multiplayer game with 6 AIs).

Re: What I'm doing wrong setting up multiplayer game?

Posted: Thu Feb 01, 2018 8:30 pm
by Vezzra
Oberlus wrote:...added 6 AIs...
o01eg wrote:Looks like AI_7 died.
Um... something is not right here? With 6 AIs there shouldn't be an AI_7...?

Re: What I'm doing wrong setting up multiplayer game?

Posted: Fri Feb 02, 2018 6:39 am
by Oberlus
Maybe I added 7 AIs, now I can't tell...
I tried it again with 3 AIs and it worked fine (really laggy from turn 200 onwards). Sly vs Egassem vs Eaxaw. Sly pwns.

Re: What I'm doing wrong setting up multiplayer game?

Posted: Mon Feb 05, 2018 9:46 am
by dbenage-cx
From server log, looks like 7 Ais were added (although AI_7 is just the player name).

Don't think you hit this particular issue, but if changing branches where the python files change, might try removing *.pyc files before starting the game.
e.g. on linux from freeorion directory: $ find . -name *.pyc -delete (omit -delete to verify what will be deleted)

I assume by lag, you mean during the turn update/saving steps, if not can you describe the lag (and ignore the other questions).
Do the updates still take as long if you completely exit the client and reload?
Is there a noticeable change when saving between different save formats (Options->Other): binary, non-binary compressed, non-binary non-compressed?
With a game running where update/save lag is an issue, and without exiting, please click Next Turn after each step and see if there is a large improvement (each likely to have some).
- Move all of the AI log files to a new folder (or delete).
- Change logging for "ai general" and "python" to Error
- Move freeorion.log and freeoriond.log to the new folder (or delete).
- Change all other logging options to Info

Re: What I'm doing wrong setting up multiplayer game?

Posted: Mon Feb 05, 2018 11:58 am
by Oberlus
I've already "played" four of such games with me as observer and no other error/problem arised.
I've got FO crashes/unexpected exits when I first start FO after recompiling and starting a new game (few: maybe half the times), that does not happen again after I try to start the same game after the crash/exit. SO maybe this problem I got here was related to this behaviour.

dbenage-cx wrote:I assume by lag, you mean during the turn update/saving steps, if not can you describe the lag (and ignore the other questions).
Do the updates still take as long if you completely exit the client and reload?
Is there a noticeable change when saving between different save formats [...]?
The lag is as follows:
Right after I click on Start, the game begins and turns pass at around 2-3 turns per second without me doing anything else. In fact, I wouldn't know how to stop/pause the game, sitreps just keep coming (BTW, I don't know who's empire are the sitreps I see, so I base my considerations on what I can see from Pedia and statistics graphs).
As the game progresses, the rate at which turns pass goes down. By turn 150 each turn requires several seconds, from turn 250 onwards it may take 15 seconds per turn. This numbers depends on the number of AIs in the game and on the map size (obviously). The GUI is properly responsive during all this process, although the mouse my have some delay to move once the game is very advanced (more specifically, I notice no delay when moving mouse at the first turns, I notice it from turn 150 onwards, and the delay only applies for a pair of seconds when I start moving the mouse, then it keeps responsive if I keep moving it).
If I open to the save/load/options menu, I see the load and save options greyed out, and the game keeps going on behind the menu (turns keep advancing, ships move around the map, sitreps keep getting updated, etc.). If then I click on resign, the usual "save game is in progress" appears but seems to take a long time, and I just click on exit without saving. If then I go to the auto folder to check saves, there is no file at all (not even autosaves from previous single-player games). Looks like FO is trying to save files but that's is somehow overriden by the multiplayer setting?

Next game I'll set autosave rate to every 10 turns (instead of default 1) and see how this affects the lag, and repeat that using binary/non-binary-compressed/non-binary-uncompressed.

Re: What I'm doing wrong setting up multiplayer game?

Posted: Mon Feb 05, 2018 12:05 pm
by Geoff the Medio
Oberlus wrote:I've already "played" four of such games with me as observer
[...]
In fact, I wouldn't know how to stop/pause the game, sitreps just keep coming
If you "play" as a moderator, you can control when the turns progress. As an observer, they will advance as soon as each AI has submitted its turn / orders.

Re: What I'm doing wrong setting up multiplayer game?

Posted: Mon Feb 05, 2018 4:04 pm
by LGM-Doyle
This sounds like Issue #1816, where auto turn advance triggers the auto saves at the wrong time.

A workaround, as Geoff suggested, is to start as the Moderator and advance the turns manually.