- 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.
"Resync" command
Moderator: GZDoom Developers
- 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
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:
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: "Resync" command
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.
- Chris
- Posts: 2942
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: "Resync" command
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.
IIRC, the suggestion was shot down because it'd be too difficult to do.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: "Resync" command
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.
So, this makes this a 'no' by default.
- Chris
- Posts: 2942
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: "Resync" command
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: "Resync" command
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?
- Chris
- Posts: 2942
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: "Resync" command
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.
Re: "Resync" command
Since it was about a console command, the computers were supposed to be told that they have desynced by the players.Graf Zahl wrote:Thinking about it, how are the computers supposed to recognize that they have desynced?
- 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
Exactly. Sync "detection" is entirely up to the players, thus Resync has to be triggered manually through the console.Gez wrote:Since it was about a console command, the computers were supposed to be told that they have desynced by the players.Graf Zahl wrote:Thinking about it, how are the computers supposed to recognize that they have desynced?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: "Resync" command
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.
- Chris
- Posts: 2942
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: "Resync" command
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.
Re: "Resync" command
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.
Re: "Resync" command
"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.Chris wrote:IIRC, even though it's not a true client-server model, ZDoom still marks a certain player as the server.
[SEMI-EDIT] Kate hinted to it, but that's what.
- 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
So this kinda indirectly came up during some discussion on the HD Discord.
Is there any hope of possibly revisiting this idea?
Is there any hope of possibly revisiting this idea?
- Player701
-
- Posts: 1640
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: "Resync" command
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 )
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.
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.