Hello,
I have a new multiplayer desync to report. This time it is around fluid and is somehow associated with my mod. Desync happens when fluid in pipe is very low and due some changes to the fluid characteristics, I think there is some sort of oscillation.
This desync was present in 0.11.22 and persist to now. I can reproduce this either with two local instance of Factorio or over the network with a friend.
Load the save game. Remove the fuel assemblies from the chest. Wait for a little bit while the fluid superheated-dry-steam is consumed. Desync should commence once the fluid starts to oscillate.
Savegame
Mod
[0.12.0] Multiplayer Desync
[0.12.0] Multiplayer Desync
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Re: [0.12.0] Multiplayer Desync
This is an issue with the way you've written the mod and not the game
On line 7 and 9 of your mod's control.lua you're setting local variables which are used to alter the game state in the on_tick event.
Player 1 loads the game: tickingA is set to 59.
Tick 1 happens: tickingA is reduced by 1 (now 58)
Player 2 connects to the game: tickingA for player 2 is set to 59
Tick 2 happens: tickingA is 58 for player 1 and 59 for player 2 - desync.
On line 7 and 9 of your mod's control.lua you're setting local variables which are used to alter the game state in the on_tick event.
Player 1 loads the game: tickingA is set to 59.
Tick 1 happens: tickingA is reduced by 1 (now 58)
Player 2 connects to the game: tickingA for player 2 is set to 59
Tick 2 happens: tickingA is 58 for player 1 and 59 for player 2 - desync.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.12.0] Multiplayer Desync
Okay, good to know, how do I go about fixing it? I was going to rewrite the ticker but don't have a good idea yet.
Now that I think about it more. If what you said is true, then why doesn't the desync happens immediately upon client connection? I've let the simulation run days with my friends and no desync will occur. It only happens when fluid starts to oscillate.
Now that I think about it more. If what you said is true, then why doesn't the desync happens immediately upon client connection? I've let the simulation run days with my friends and no desync will occur. It only happens when fluid starts to oscillate.
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Re: [0.12.0] Multiplayer Desync
Big Thank You to Rseding. I've fixed this bug.
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x