"Resync" command

Moderator: GZDoom Developers

User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

"Resync" command

Post by wildweasel »

As a sort of "temporary" solution to the problem of desynchronization in multiplayer, perhaps a console command could be added that attempts to resynchronize all players in a network game to the state of the hosting player (obviously this would be a server-only command). I'm no network expert, but perhaps it could just automate these steps:
  • When Resync is activated, the host machine saves a temporary save game.
  • A message is sent to all connected machines to reconnect to the host.
  • The game goes down. Once the game is closed, it immediately starts back up again using the same parameters, except if any players left before resync, the server would be configured to host minus those players (so a -host 6 would become a -host 4 if two players left).
  • The players all pretty much get tucked into a "limbo mode" while the next part occurs - the saved game is sent from the hosting player to all other players (somehow). The server sends the signal and all machines start from that saved game. Some attempt is made to make sure all players are in the same "bodies."
  • Game begins from that point.
Given my utter lack of knowledge in any things networking, I've probably just described something impossible, but I figure, don't know until I try.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Resync" command

Post by Graf Zahl »

wildweasel wrote: Given my utter lack of knowledge in any things networking, I've probably just described something impossible, but I figure, don't know until I try.

Most likely. I'll leave the last word to Randy but even if possible I have my doubts that it's ever done.
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: "Resync" command

Post by Chris »

I remember making a suggestion like this once (though I don't know if it was in the Feature Suggestions forums). The player designated as the "server" would keep an eye on desyncs, and if it found one, it'd make a save, alert the other players and send them the save, then have everyone "restart" from that save. The idea would be to make it happen transparently, so (unless you're on a slow connection/system) you'd not see more than a short hiccup in framerate. There could also be a notice about who desynced, so if it happens a lot, you can ask that player to leave.

IIRC, the suggestion was shot down because it'd be too difficult to do.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Resync" command

Post by Graf Zahl »

Thinking about it, how are the computers supposed to recognize that they have desynced? All they transmit is player movement data and a bit other stuff. They never know how the other computer's state looks like.

So, this makes this a 'no' by default.
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: "Resync" command

Post by Chris »

Doesn't the game display something on-screen when it desyncs? I don't really play multiplayer, but the few times i have, I could've sworn it displayed a "desync" message when it does.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Resync" command

Post by Graf Zahl »

Yes, but then it's mostly too late. The game has desynced long before that message normally so how would you sync a game where both sides disagree about the player states?
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: "Resync" command

Post by Chris »

By deferring to who's set as the "server". When a game detects it's been desynced, it would alert the server, which would then make a save of its game(state) and send it out to other players to automatically load.. to get everyone back on the same page, so to speak.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: "Resync" command

Post by Gez »

Graf Zahl wrote:Thinking about it, how are the computers supposed to recognize that they have desynced?
Since it was about a console command, the computers were supposed to be told that they have desynced by the players. :wink:
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: "Resync" command

Post by wildweasel »

Gez wrote:
Graf Zahl wrote:Thinking about it, how are the computers supposed to recognize that they have desynced?
Since it was about a console command, the computers were supposed to be told that they have desynced by the players. :wink:
Exactly. Sync "detection" is entirely up to the players, thus Resync has to be triggered manually through the console.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Resync" command

Post by Graf Zahl »

Still, to WHAT should they sync? You can be sure that both sides are most likely no longer in a coherent state for both players.
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: "Resync" command

Post by Chris »

To the player tagged as the server. IIRC, even though it's not a true client-server model, ZDoom still marks a certain player as the server. If different players disagree on the gamestate, then what the server says goes.
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Re: "Resync" command

Post by Kate »

Yeah, in this case I think it should be limited to net arbitrators, and the arbitrator that issued the command should sync the other clients to their gamestate.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: "Resync" command

Post by Xaser »

Chris wrote:IIRC, even though it's not a true client-server model, ZDoom still marks a certain player as the server.
"Arbitrator" is the term you're looking for, or at least that's what it's called in-game. The arbitrator gets server privileges (setting of dmflags, sv_ cvars, etc.), but they act no different from any other player from the networking side of things.

[SEMI-EDIT] Kate hinted to it, but that's what. :P
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: "Resync" command

Post by Matt »

So this kinda indirectly came up during some discussion on the HD Discord.

Is there any hope of possibly revisiting this idea?
User avatar
Player701
 
 
Posts: 1636
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: "Resync" command

Post by Player701 »

The final word is up to the developer team, of course, but I also wanted to share my own opinion on this. According to my observations, GZDoom's network code has improved significantly since 2010. Every desync that I've recently encountered happened due to broken mod code that did not take multiplayer support into account. (Some of that code was mine :P)

It can be difficult to debug, but almost every time it happens, it is usually not an engine issue but a mod issue. Failing the latter, it could also be the result of a certain player (or players) running different versions of PWADs than that of other players. A "resync" would definitely not help in this case, since it cannot fix differences in mod files.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”