Coop causing desyncs

Coop causing desyncs

Classic game design, maintained to please you...

Moderator: Content Developer

Post Reply
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Coop causing desyncs

Post by YokoZar »

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.
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Coop causing desyncs

Post by Niobium »

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.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Coop causing desyncs

Post by Auswaschbar »

All previously selected startpositions are sent to a player when he connects, and are broadcasted another time when game starts for this exact reason...
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Coop causing desyncs

Post by Niobium »

Auswaschbar 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...
For spring, yes, for BAs mo_coop gadget, no
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Coop causing desyncs

Post by lurker »

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.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Coop causing desyncs

Post by Auswaschbar »

lurker wrote:So you think the messages are getting dropped.
I don't think, I know.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Coop causing desyncs

Post by Regret »

Auswaschbar wrote:
lurker wrote:So you think the messages are getting dropped.
I don't think, I know.
Image
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Coop causing desyncs

Post by TheFatController »

Coop almost always desyncs when someone drags their script onto spring.exe after a failed connection attempt I've noticed.
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Coop causing desyncs

Post by Niobium »

TheFatController wrote:Coop almost always desyncs when someone drags their script onto spring.exe after a failed connection attempt I've noticed.
Yes, because they weren't connected when the coop messages were sent.
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: Coop causing desyncs

Post by YokoZar »

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)
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Coop causing desyncs

Post by TheFatController »

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 ;) )
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Coop causing desyncs

Post by Auswaschbar »

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)
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.
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Coop causing desyncs

Post by Niobium »

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.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Coop causing desyncs

Post by TheFatController »

Is there a player joined callin or anything similar tho?
Post Reply

Return to “Balanced Annihilation”