Opened 10 years ago

Closed 7 years ago

#2400 closed enhancement (needsinfo)

[PATCH / DISCUSSION] Handle players which leave a MP game and do not rejoin

Reported by: Michael Owned by:
Priority: Nice to Have Milestone:
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by elexis)

If players leave during a multi-player game and don't rejoin, this should be handled because I think that in most cases the remaining player will also quit the game.

--> Many MP games are effectively "abandoned".

(see also #2373 where discussion about that started.)

Attachments (1)

playerTimeout_v1.patch (6.6 KB ) - added by Michael 10 years ago.
Automatic timeout of players which have left a multi-player game. For testing the timeout is just 15 seconds long!

Download all attachments as: .zip

Change History (19)

comment:1 by Michael, 10 years ago

IMO the player which has left the game should loose it because leaving a running game is for me like resigning.

BUT the player should have a reasonable time to rejoin the game because it maybe wasn't his intention to leave the game (internet connection lost, hardware failure, game crashed, ...).

If I a start a MP game, I want to play against a human player and don't want to have to kill his idle units (in case that he has left). --> I would prefer an timeout of the player. If he does not rejoin within f.e. 5 minutes he should loose the game.

by Michael, 10 years ago

Attachment: playerTimeout_v1.patch added

Automatic timeout of players which have left a multi-player game. For testing the timeout is just 15 seconds long!

comment:2 by Michael, 10 years ago

Keywords: patch review discussion added
Summary: Handle players which leave a MP game and do not rejoin[PATCH / DISCUSSION] Handle players which leave a MP game and do not rejoin

comment:3 by leper, 10 years ago

Component: Core engineUI & Simulation

If the host/other players know that the player that left wants to come back, they can still pause the game and wait for him to return (the timer is simulation side, so that should work just fine).

comment:4 by scythetwirler, 10 years ago

We should also beware of a possibility that the host can disconnect a network cable and claim a win due to "disconnection of opponent" after reconnecting right before the timeout runs out and the game report is sent to the bot. (Not sure if this is actually possible though).

comment:5 by Michael, 10 years ago

Owner: set to Michael

in reply to:  3 ; comment:6 by Michael, 10 years ago

Replying to leper:

If the host/other players know that the player that left wants to come back, they can still pause the game and wait for him to return (the timer is simulation side, so that should work just fine).

Yeah, this should work.

Replying to scythetwirler :

We should also beware of a possibility that the host can disconnect a network cable and claim a win due to "disconnection of opponent" after reconnecting right before the timeout runs out and the game report is sent to the bot. (Not sure if this is actually possible though).

I tried to do that but I was not able to manage it. But we should add some kind of check to prevent that explicitly.

Perhaps rateGame(..) of XpartaMuPP.py can be used for that but I don't know how. (Don't rate the game if the host was disconnected to the lobby server during the game. Or is the connection ended when a game starts ?)

Last edited 10 years ago by Michael (previous) (diff)

comment:7 by Josh, 10 years ago

The bot currently tries to be semi-intelligent about who to rank. In this case, since the simulation is supposed to run synchronously on every client - every client must turn in exactly the same report for a game to be ranked.

in reply to:  6 comment:8 by scythetwirler, 10 years ago

Replying to boeseRaupe:

Replying to scythetwirler :

We should also beware of a possibility that the host can disconnect a network cable and claim a win due to "disconnection of opponent" after reconnecting right before the timeout runs out and the game report is sent to the bot. (Not sure if this is actually possible though).

I tried to do that but I was not able to manage it. But we should add some kind of check to prevent that explicitly.

Perhaps rateGame(..) of XpartaMuPP.py can be used for that but I don't know how. (Don't rate the game if the host was disconnected to the lobby server during the game. Or is the connection ended when a game starts ?)

We could possibly use XMPP to check connection to the lobby server when other players get disconnected to prevent this.

comment:9 by Josh, 10 years ago

Keywords: MP removed
Milestone: Alpha 16Alpha 17

comment:10 by Josh, 10 years ago

Keywords: review removed

Although this is a good start towards graciously handling disconnects, it's not quite ready yet. When someone disconnects, the other players should be able to choose if they want to wait or if they want to drop the player.

We'll also need to think about how to handle dropped players when ranking games.

comment:11 by Itms, 10 years ago

Milestone: Alpha 17Alpha 18

comment:12 by scythetwirler, 10 years ago

A lot of possible solutions I'm thinking of would require #2305 to be implemented, as if a host quits due to a technical glitch, he can't rejoin.

comment:13 by Rolf Sievers, 10 years ago

When leaving leads to an automatic loss, there should be an alternative way to draw a game. An option to “request a draw” should be added, which then asks the opponent for their consent.

It needs some safeguards to prevent abuse. Spamming draw requests comes to mind. A dialog distracting or blocking player input would also be abusable. (e.g. when I hit the unsuspecting foe with a draw request during a crucial encounter.)

I'd prefer the wording “request draw” over “offer draw”.

in reply to:  13 comment:14 by scythetwirler, 10 years ago

Replying to rolf.sievers:

When leaving leads to an automatic loss, there should be an alternative way to draw a game. An option to “request a draw” should be added, which then asks the opponent for their consent.

It needs some safeguards to prevent abuse. Spamming draw requests comes to mind. A dialog distracting or blocking player input would also be abusable. (e.g. when I hit the unsuspecting foe with a draw request during a crucial encounter.)

I'd prefer the wording “request draw” over “offer draw”.

That's addressed in #2512.

comment:15 by Itms, 9 years ago

Milestone: Alpha 18Alpha 19

comment:16 by elexis, 9 years ago

If a player leaves the game, he shouldn't be defeated automatically! Often only irrelevant players leave the game.

(1) His units will turn into Gaia soldiers which attack the allies, since teammates are grouped together on most maps.

(2) Map control of that team is lost. Without the defeat, players can still garrisson towers and the CC to stop enemies from entering and taking over this area.

(3) If a player is defeated and is in between two allies and they trade, then the tradeline is killed, not protected anymore by the buildings and not usable at all until the leftovers are cleaned up by the old allies.


However in alpha 19 there is capturing. A more fair solution might be to give all units and structures to the allies (since the resources are transfered too #3265)

Another suggestion is #2632 (When player resigns, the entities belonging to the player should be deleted).

Last edited 9 years ago by elexis (previous) (diff)

comment:17 by Stan, 9 years ago

Keywords: leave resign discussion removed
Milestone: Alpha 19Backlog
Owner: Michael removed

Backlogging due to lack of progress.

comment:18 by elexis, 7 years ago

Description: modified (diff)
Milestone: Backlog
Resolution: needsinfo
Status: newclosed

Feel free to reopen this in case we have any kind of conclusion what would be better than the player just being marked as offline if he didn't resign.

About the proposed patch:

  • The attached patch doesn't prevent anyone from just marking any player as defeated or stopping that (cheat!).
  • If the player that disconnects sets a timeout for himself before disconnecting, then it is broken in multiplayer games as mentioned above (banning or otherwise disconnecting the other client doesn't trigger the timer)
  • Players that leave a team game without resigning might want to do so in order to avoid converting everything to gaia and destroying the allies trade routes.
  • An offline player is not hard to defeat to begin nor would waiting a long time be enjoyable to the players for the leaving client to be auto-defeated (nor would waiting a short time be reasonable).

Alternative solution:

  • Keep allowing players to rejoin even a long period after the leave.
  • Allow other players (observers, lobby players) to take the seat of another player (often used already by rejoining by IP)
  • Host rated 1v1s on dedicated servers by WFG (#3556) to prevent any kind of rating fakery and disallow joins as someone else (also needs #3549 to prevent rating fakery)
Note: See TracTickets for help on using tickets.