Topic: Diverging score graphs in multiplayer
Nordfriese |
Posted at: 2022-02-27, 14:03
At gametime 0:17:19, player 5 (black) tries to build a stonemason's house. This succeeds on the host but fails on the client due to a tree having grown on the site of interest. By this time the tree growth pattern around the foresters has already visibly diverged. Will debug in more detail now. Top Quote |
hessenfarmer |
Posted at: 2022-02-27, 14:10
At least we now have a suspect Top Quote |
Nordfriese |
Posted at: 2022-02-27, 14:33
We don't, this was just an observation to narrow down the time of the desync The sync output is 21 million lines up to then as it is, which is kind of hard to work with. The first desync happens when a bob's position changes: In the host replay, the bob (serial 20cf) moves to 25×50; in the client replay, it moves to 24×4f. This happens at the exact gametime 00:12:15.517.
Makes things easier Will now try to catch the erratic bob with a debugger… Edit: The bob in question is a barbarian fisher belonging to player 7 who is walking towards node 39×77 (host) or 39×85 (client) Another edit: The desync happens in the pathfinding code, specifically Still investigating further… I found a discrepancy that happens right at the start: Node 39×84 contains the resource water for the host but fish for the client. So the first time a fisher is built nearby it goes out of sync. This map does not seem to define resources there so probably a bug in default resources computation… I can reproduce that starting a new LAN game on this map causes this divergence to arise immediately on the same node. Definitely a problem with default resources. Edit: Found the root cause, as always in an unexpected place: The main menu map preview! Preparing a fix now. Edited: 2022-02-27, 18:44
Top Quote |
Nordfriese |
Posted at: 2022-02-27, 18:50
Fix is up: https://github.com/widelands/widelands/pull/5288 The problem was that the code that renders the map preview in the Launch Game screen dirtied the map's description load order, which can affect the game state in unpredictable ways. Top Quote |
Nordfriese |
Posted at: 2022-02-28, 12:33
The fix has been merged now. Top Quote |
hessenfarmer |
Posted at: 2022-02-28, 13:50
@pkk It would be good if you could verify it is gone now. Top Quote |
PkK Topic Opener |
Posted at: 2022-03-13, 16:58
I just finished a 12 game hours game (4 players, 2 human, 2 ai), and did not encounter any problems. Top Quote |