Coop causing desyncs
Moderator: Content Developer
Coop causing desyncs
I'm still seeing the coop desync every now and again. I believe this is how to reproduce it:
Have player 1 and 2 cooping, and have them both place and ready before player 3 connects/loads.
After 3 connects/loads, don't have 1/2 place or right click any more.
Player 3 will desync. The workaround is to wait until everyone connects before you place as a cooper.
Have player 1 and 2 cooping, and have them both place and ready before player 3 connects/loads.
After 3 connects/loads, don't have 1/2 place or right click any more.
Player 3 will desync. The workaround is to wait until everyone connects before you place as a cooper.
Re: Coop causing desyncs
Coop start points are sent as lua messages
If you aren't connected, you don't get the start point, and then desync on game start.
The solution is to send all start points thus far (if any) to each player when they connect, or change the way the gadget works.
This also causes desync if a player does not receive a 'side change' message, so re-placing after the person connects is not sufficient, you also need to re-change your side, if you changed your side to non-default before they connected.
If you aren't connected, you don't get the start point, and then desync on game start.
The solution is to send all start points thus far (if any) to each player when they connect, or change the way the gadget works.
This also causes desync if a player does not receive a 'side change' message, so re-placing after the person connects is not sufficient, you also need to re-change your side, if you changed your side to non-default before they connected.
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Coop causing desyncs
All previously selected startpositions are sent to a player when he connects, and are broadcasted another time when game starts for this exact reason...
Re: Coop causing desyncs
For spring, yes, for BAs mo_coop gadget, noAuswaschbar wrote:All previously selected startpositions are sent to a player when he connects, and are broadcasted another time when game starts for this exact reason...
Re: Coop causing desyncs
So you think the messages are getting dropped.
Another possibility is that they're loading at the wrong point, that normally you'd have some call related to loading then lua messages, and now it's in the wrong order.
Replays might help, one from each side.
Another possibility is that they're loading at the wrong point, that normally you'd have some call related to loading then lua messages, and now it's in the wrong order.
Replays might help, one from each side.
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Coop causing desyncs
I don't think, I know.lurker wrote:So you think the messages are getting dropped.
Re: Coop causing desyncs
Auswaschbar wrote:I don't think, I know.lurker wrote:So you think the messages are getting dropped.

- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: Coop causing desyncs
Coop almost always desyncs when someone drags their script onto spring.exe after a failed connection attempt I've noticed.
Re: Coop causing desyncs
Yes, because they weren't connected when the coop messages were sent.TheFatController wrote:Coop almost always desyncs when someone drags their script onto spring.exe after a failed connection attempt I've noticed.
Re: Coop causing desyncs
maybe change script to only send synced code on first frame? Then the rest can be unsynced (so maybe a late joiner has wrong core/arm info about a player)
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: Coop causing desyncs
Then you wouldn't know where your allies start points were.
It could resend everything on GameStart to reclarify it all, i'd much rather have access to a 'CountDownStart' callin instead tho rather than doing this in game.
(I'd also much rather have the existing functionality fixed
)
It could resend everything on GameStart to reclarify it all, i'd much rather have access to a 'CountDownStart' callin instead tho rather than doing this in game.
(I'd also much rather have the existing functionality fixed

-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Coop causing desyncs
Keep in mind that if you send in frame 1, it will arrive in frame >= 1, or not at all if the player dropped in between.YokoZar wrote:maybe change script to only send synced code on first frame? Then the rest can be unsynced (so maybe a late joiner has wrong core/arm info about a player)
Re: Coop causing desyncs
If a player joins, and you are a cooped player with a coop start point, send your current start point / faction to the joining player, if you have one.
Done.
Done.
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: Coop causing desyncs
Is there a player joined callin or anything similar tho?