[No] "Resync" command

Moderator: GZDoom Developers

"Resync" command

Postby wildweasel » Sat Dec 25, 2010 5:49 am

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
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: "Resync" command

Postby Graf Zahl » Sat Dec 25, 2010 6:06 am

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: "Resync" command

Postby Chris » Sat Dec 25, 2010 3:03 pm

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
Chris
 
Joined: 17 Jul 2003

Re: "Resync" command

Postby Graf Zahl » Sat Dec 25, 2010 4:14 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: "Resync" command

Postby Chris » Sat Dec 25, 2010 4:29 pm

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
Chris
 
Joined: 17 Jul 2003

Re: "Resync" command

Postby Graf Zahl » Sat Dec 25, 2010 4:51 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: "Resync" command

Postby Chris » Sat Dec 25, 2010 5:10 pm

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.
User avatar
Chris
 
Joined: 17 Jul 2003

Re: "Resync" command

Postby Gez » Sat Dec 25, 2010 5:17 pm

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:
Gez
 
 
 
Joined: 06 Jul 2007

Re: "Resync" command

Postby wildweasel » Sat Dec 25, 2010 5:20 pm

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
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: "Resync" command

Postby Graf Zahl » Sat Dec 25, 2010 5:45 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: "Resync" command

Postby Chris » Sat Dec 25, 2010 5:54 pm

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
Chris
 
Joined: 17 Jul 2003

Re: "Resync" command

Postby Kate » Sat Dec 25, 2010 11:27 pm

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
Kate
... in loving memory ...
 
Joined: 15 Jul 2003

Re: "Resync" command

Postby Xaser » Sat Dec 25, 2010 11:33 pm

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
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: "Resync" command

Postby Matt » Fri May 31, 2019 4:23 pm

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

Is there any hope of possibly revisiting this idea?
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: "Resync" command

Postby Player701 » Sat Jun 01, 2019 1:44 am

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.
User avatar
Player701
You are now breathing manually.
 
Joined: 13 May 2009
Location: Russian Federation
Discord: Player701#8214

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 3 guests