Latest Posts

Topic: Diverging score graphs in multiplayer

PkK
Joined: 2012-01-06, 12:19
Posts: 230
Ranking
Widelands-Forum-Junkie
Posted at: 2021-12-12, 21:50

This morning, in a 6-player game (two humans - red and orange other players normal AI), I noticed that the score graphs for military power diverged: For the red player, red was shown as more powerful, while for the orange player, orange was shown as more powerful. At that time, orange had better soldiers (45 level two, while red had the same number of soldiers, but with some still at level 0 or 1), while red had better military buildings.

P.S.: For both players, current widelands was downloaded from git and compiled just before starting the game. Both machines were running Debian GNU/Linux testing updated just before compiling widelands. Both machines are based on AMD Ryzen APUs.

Edited: 2021-12-12, 21:52

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2071
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-12-13, 08:08

Thanks for reporting.
It would be good if you could provide us with a savegame.
Screenshots would be good as well.


Top Quote
PkK
Joined: 2012-01-06, 12:19
Posts: 230
Ranking
Widelands-Forum-Junkie
Posted at: 2021-12-13, 08:15

I'll see what I can do tonight (screenshots, reproduce the issue, see if it stays after save-reload). For now I just put yesterdays savegame at http://www.colecovision.eu/stuff/widelands-diverging-graphs/leo.wgf, but didn't check if the problem is still there on loading the game.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1522
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-12-13, 11:56

In this savegame both players have the same stats but this is no surprise since loading from a savegame restores the game state to what it was for the player who created the save. To get the full picture we'll also need a savegame from the other player (i.e. one created by Philipp and one created by Max) to see how they differ.


Top Quote
PkK
Joined: 2012-01-06, 12:19
Posts: 230
Ranking
Widelands-Forum-Junkie
Posted at: 2021-12-13, 12:27

Autosaves Max: http://www.colecovision.eu/stuff/widelands-diverging-graphs/autosave-max/

Autosaves Philipp: http://www.colecovision.eu/stuff/widelands-diverging-graphs/autosave-philipp/


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1522
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-12-13, 13:33

Both savegames show the same graphs for red and orange, however the graphs for yellow, green, and black differ. We might have a new desync on our hands somewhere – has someone else been noticing something odd in network games recently?

Edit: In Philipp's save, yellow and green have killed 5 and 4 enemy soldiers respectively, while in Max's save no fighting has happened yet (Max's save is 7 seconds head of Philipp's). Other stats also differ slightly for the AI players. Could it be that the AI accidentally alters the game state directly instead of sending a playercommand?

Edited: 2021-12-13, 13:38

Attachment: 5476.png (382.3 KB)

Top Quote
PkK
Joined: 2012-01-06, 12:19
Posts: 230
Ranking
Widelands-Forum-Junkie
Posted at: 2021-12-13, 13:42

Thanks for looking into it. Yesterday, the score graphs for red and orange were different on-screen for the two players. Unfortunately, I didn't think of taking screenshots.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2071
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-12-13, 14:06

for me the graphs look like all stats are different at least slightly. at least blue differs as well. orange and red are not of the same shape imho.
As far as I know all the AI takes place on one machine (the host) and is distributed to all participants.
What is really weird is that this did not desync. As our syncing is based on hashes did the change of UUId /SHA change something here?
But I have no glue yet just guessing.

Edit: maybe a different number of activated addons might have interference.

Edited: 2021-12-13, 14:25

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1522
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-12-13, 15:16

As far as I know all the AI takes place on one machine (the host) and is distributed to all participants.

Correct, but unfortunately it happens once in a while that some code is added which by mistake makes a change to the game state that is not distributed to the other clients. AI and UI are especially prone to this.

What is really weird is that this did not desync.

Unfortunately, a lot of multiplayer desyncs potentially go unnoticed because of a bug in the way the host requests the clients' sync hashes: https://github.com/widelands/widelands/issues/4917

As our syncing is based on hashes did the change of UUId /SHA change something here?

We use an MD5 checksum to check for desyncs. SHA1 is used only for the online gaming password, and UUID is used only to uniquely identify a client on the metaserver. So this change can't have affected this.

Edit: maybe a different number of activated addons might have interference.

Both savegames show that no saveload-critical add-ons were enabled, but yes the exact list of all enabled add-ons on both machines (if any) might be helpful


Top Quote
PkK
Joined: 2012-01-06, 12:19
Posts: 230
Ranking
Widelands-Forum-Junkie
Posted at: 2021-12-13, 15:40

Edit: maybe a different number of activated addons might have interference.

Both savegames show that no saveload-critical add-ons were enabled, but yes the exact list of all enabled add-ons on both machines (if any) might be helpful

Addons? Before starting the game, I deleted the old widelands direcories on both machines, downloaded widelands from git, compiled via "./compile.sh -r", started via "./widelands".

I did not delete .local/share/widelands on either machine, but AFAIK, there are only old savegames and a few custom maps not relevant to the game played yesterday.


Top Quote