[0.12.0] Multiplayer Desync

Bugs that are actually features.
Post Reply
Fatmice
Filter Inserter
Filter Inserter
Posts: 808
Joined: Thu Dec 04, 2014 11:03 pm
Contact:

[0.12.0] Multiplayer Desync

Post by Fatmice »

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.
Desync-Fluid.png
Desync-Fluid.png (4.19 MiB) Viewed 4113 times
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
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

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.12.0] Multiplayer Desync

Post by Rseding91 »

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.
If you want to get ahold of me I'm almost always on Discord.

Fatmice
Filter Inserter
Filter Inserter
Posts: 808
Joined: Thu Dec 04, 2014 11:03 pm
Contact:

Re: [0.12.0] Multiplayer Desync

Post by Fatmice »

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.
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

Fatmice
Filter Inserter
Filter Inserter
Posts: 808
Joined: Thu Dec 04, 2014 11:03 pm
Contact:

Re: [0.12.0] Multiplayer Desync

Post by Fatmice »

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

Post Reply

Return to “Not a bug”