Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#2373 closed defect (fixed)

[PATCH] Confirm user resignation on exit game.

Reported by: scythetwirler Owned by: Michael
Priority: Must Have Milestone: Alpha 16
Component: UI & Simulation Keywords:
Cc: Patch:

Description

Many players are not aware that exiting does not include resigning, and thus, many games are effectively "abandoned". Clicking "Exit" should bring up a dialog with "Confirm resignation".

Attachments (9)

resignation.patch (708 bytes ) - added by Michael 9 years ago.
More information was added to the question.
resignation_v2.patch (5.1 KB ) - added by Michael 9 years ago.
Exit is possible only after the game is over; reordered menu.
resignation_v3_WIP.patch (17.4 KB ) - added by Michael 9 years ago.
Problem left with resign and then quit
resignation_v3.patch (16.7 KB ) - added by Michael 9 years ago.
Works for at least two players.
resignation_v3.2.patch (16.7 KB ) - added by Michael 9 years ago.
Fixed bug with more than 2 players; thx to leper for testing and help.
resignation_v4.patch (10.4 KB ) - added by Michael 9 years ago.
Split patch.
resignation_v5.patch (9.6 KB ) - added by Michael 9 years ago.
Moved Engine.EndGame?() to timer instead of leaveGame.
resignation_v6.patch (10.6 KB ) - added by Michael 9 years ago.
Moved timer back to leaveGame. Timer is not executed after SwitchGuiPage()
resignation_v7.patch (7.9 KB ) - added by Michael 9 years ago.
Now without timer because fixed problem with messages are not send when game ends.

Download all attachments as: .zip

Change History (33)

comment:1 by scythetwirler, 9 years ago

Keywords: simple added

by Michael, 9 years ago

Attachment: resignation.patch added

More information was added to the question.

comment:2 by Michael, 9 years ago

Perhaps it's enough to add some more information to the dialog ?

comment:3 by sanderd17, 9 years ago

boeseRaupe, the problem is that quitting does NOT resign. So in a multiplayer game, the game is won by nobody, which means there is no score update.

by Michael, 9 years ago

Attachment: resignation_v2.patch added

Exit is possible only after the game is over; reordered menu.

comment:4 by Michael, 9 years ago

Ah, I see. I attached another version.

comment:5 by Michael, 9 years ago

Keywords: patch review added
Owner: set to Michael
Summary: Confirm user resignation on exit game.[PATCH] Confirm user resignation on exit game.

comment:6 by Josh, 9 years ago

Keywords: reviewed added; review removed

Patch looks good to me and in my opinion can be committed.

in reply to:  6 comment:7 by Michael, 9 years ago

Replying to Josh:

Patch looks good to me and in my opinion can be committed.

:) Any other opinions ?

comment:8 by historic_bruno, 9 years ago

I understand the problem this patch is trying to fix, but it doesn't seem like the right solution. Isn't it still possible to close the game with Alt-F4 or in windowed mode, clicking e.g. the 'X' button? That won't trigger a resign, but the player is gone nonetheless. It should be possible to exit via the menus without resigning too, maybe I'm having connection problems and need a reboot, but I intend to rejoin.

The problem you want to solve, I think, is players who are gone from the game but aren't returning. It's not something that can be solved through their UI, because they might simply lose internet access or have a crash on their end. I think that should be handled somehow, maybe with a timeout.

The multiplayer exit dialog is misleading though, maybe it can be rephrased to explain the difference between exit with or without resigning?

comment:9 by historic_bruno, 9 years ago

How about clicking exit brings up a choice, "You are exiting the game, will you return later?", then have options "No, I want to resign" and "Yes, I will return"

comment:10 by Josh, 9 years ago

I like that idea.

comment:11 by Michael, 9 years ago

Me2. I'll work on that.

comment:12 by leper, 9 years ago

Keywords: reviewed removed

by Michael, 9 years ago

Attachment: resignation_v3_WIP.patch added

Problem left with resign and then quit

by Michael, 9 years ago

Attachment: resignation_v3.patch added

Works for at least two players.

comment:13 by Michael, 9 years ago

What does the patch do in a MP game:

  • add question after quit like historic_bruno suggested
  • starts an timeout if a player leaves the game (currently 15 seconds for testing).

What should be added in addition:

  • pause MP game when a player leaves and let the remaining players vote if the pause should last during the timeout or not.

by Michael, 9 years ago

Attachment: resignation_v3.2.patch added

Fixed bug with more than 2 players; thx to leper for testing and help.

comment:14 by Josh, 9 years ago

With a quick read-through the patch looks alright, but what exactly would be the point of a timeout? If the player just disconnected it shouldn't ever mark the player as resigned (which would confuse the leaderboard ranking system). In my opinion they should remain in the "active" state until only one connected player is left or the end of the game is reached. In the case of only one remaining player, the remaining player should be asked if they would like to wait for the other player to rejoin or if they would like to quit. In the case that the game ends, the disconnected player should just be marked as in the "disconnected" state before data is sent to the multiplayer server.

by Michael, 9 years ago

Attachment: resignation_v4.patch added

Split patch.

comment:15 by Michael, 9 years ago

Because there seems to be the need for more discussion about how to handle players which do not rejoin, I split the patch into two parts.

resignation_v4.patch just adds the confirmation question which historic_bruno suggested. (onlay GUI changes)

For the rest I opend a new ticket: #2400

comment:16 by Michael, 9 years ago

Keywords: review added

by Michael, 9 years ago

Attachment: resignation_v5.patch added

Moved Engine.EndGame?() to timer instead of leaveGame.

by Michael, 9 years ago

Attachment: resignation_v6.patch added

Moved timer back to leaveGame. Timer is not executed after SwitchGuiPage()

comment:17 by Michael, 9 years ago

There might be a problem with the patch, if the player exits the game during the timeout because then the Timer would not be called.

Perhaps we should try to make the Engie send the Message before the game is exited an remove the timer...

by Michael, 9 years ago

Attachment: resignation_v7.patch added

Now without timer because fixed problem with messages are not send when game ends.

comment:18 by Michael, 9 years ago

resignation_v7.patch​ depends-on #2420

comment:19 by Josh, 9 years ago

Keywords: review removed

I would like to apologize for having left this here so long, the patch looks fine technically. I will test and commit the patch as soon as I have a clean SVN to apply it on.

comment:20 by leper, 9 years ago

Keywords: review added; game exit resign removed

comment:21 by JoshuaJB, 9 years ago

Resolution: fixed
Status: newclosed

In 14772:

Fix #2373. Have player resign if not returning to a networked game. Also notify host of networked game that by leaving all other players will be disconnected. Based off patch by boeseRaupe

comment:22 by Josh, 9 years ago

Keywords: simple patch review removed

Thanks for the patch, hope to see more. =)

in reply to:  22 comment:23 by Michael, 9 years ago

Replying to Josh:

Thanks for the patch, hope to see more. =)

I would like to do some more stuff but at the moment I have no time to do it. :/

comment:24 by elexis, 5 years ago

In 21837:

Fix network FSM errors when a client closes the game during the loading screen or rejoin synchronization stage, fixes #4594, refs 3199.

Fix comments claiming to ensure reliability when in reality there is only a small likelihood of the message being received.

Broken by rP14732 / refs #2420 which was a preparation for rP14772 / refs #2373, which hence didn't actually work and was circumvented by rP15106 without clarification.
Might have caused #3643.
Differential Revision: https://code.wildfiregames.com/D1557
Reviewed By: Imarok

Note: See TracTickets for help on using tickets.