Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

In an MMO (not even necessarily an MMORPG) what are some techniques for dealing with players disconnecting in the middle of PvP?

In particular - how do you avoid adversely affecting people who get disconnected due to network (or even real-life) issues, while not adversely affecting those people that are engaging them?

And, importantly, how do you ensure that disconnecting cannot be used as a method of cheating?

share|improve this question
add comment

9 Answers

up vote 13 down vote accepted

We had this problem with some online CCGs that I worked on. Best solution I've seen:

1) Players MUST connect to the server, not to each other directly, and you should NEVER pass IP addresses of opponents in the data you stream to the players. This prevents denial-of-service attacks where a player forces their opponent offline for the win.

2) Dropped connection = you lose, opponent wins. We must assume that if you dropped, it was a drop to avoid certain loss.

3) Disconnects attempt to reconnect for a period of time, so that a slight net hiccup doesn't force you to lose through no fault of your own. Ideally, the time is long enough to allow someone to reconnect if they accidentally kicked the cable, but short enough that the opponent doesn't get frustrated and fall asleep while waiting. I think we found about 45 to 60 seconds felt right.

4) Allow players to report their opponents. This is a necessary catch-all to prevent anyone finding some annoying way around your policy. Like, maybe being so verbally abusive that the opponent drops just to get out of there, or continually disconnecting and reconnecting to stretch the game length, or stonewalling to avoid a loss, or whatever. You can't stop ALL bad behavior, but you can include an in-game mechanism to report it, and then let your customer support department handle the rest.

share|improve this answer
add comment

Popular MMORPG RuneScape uses a 1 minute timer. When you disconnect, your character remains in the world for a full minute, vulnerable to attacks and what not.

share|improve this answer
1  
Same for DAoC. It works great, since if you do not do this, people can disconnect to avoid fights. There used to be a "Quit To Desktop" /qtd command in DAoC that made people quit instantly, and it was removed due to this. –  Ólafur Waage Jul 20 '10 at 17:41
add comment

I had to tackle this problem once in an online racing game where players who were losing would often turn off their consoles to avoid the loss appearing on their records. However it applies very well for any PvP situation.

My solution went like this:

  1. At the beginning of the match, once all the players have joined and play is about to begin, calculate what the outcome would be if our player loses the match. In our racing game, 'lost' means 'came in last place' and the usual outcome would be 'minus N points from the players rank'.

  2. Save the outcome to a secure location (Savegame, leaderboard, Online data area, etc).

  3. Along with the outcome, store a 'GameStarted' flag. This just signifies that the game has begun. We'll need it later on.

  4. When the game completes, calculate the actual outcome and apply it to the players score/stats. Unset the 'GameStarted' flag. This is the normal game-completion process.

  5. However, if the player disconnects, pulls his cable or powers off, eventually they'll return back to the games menu. In the menu code, we do a check for the 'GameStarted' flag. If it is set, we're sure that we've detected an in-game disconnection from earlier. We can then apply the stored outcome to the players score/stats. It will be the same as if the player lost the game. It's also a good idea to put up an alert informing the player of what's happening. Then, once he sees that there are consequences for disconnecting mid-game, you'll see that behaviour start to change.

share|improve this answer
    
That's pretty cunning. Obviously it can't apply equally well to all game types but the concept of calculating the potential consequences up-front is a nice one. –  Kylotan Jul 29 '10 at 14:37
1  
Pretty harsh for accidental disconnection, though, could use a solution in that area. –  Kzqai Oct 28 '10 at 21:37
add comment

I think the only way to pull this off would be a matter of the structure of your game. Theres' two ways to make cheating less desirable: punishment or reward. So if you don't want adverse punishment think of ways to reward the player who didn't drop.

Instead of the reward from PvP being the loot of the conquered's body (which makes dropping a very bad thing) make winning bestow some reward like exp., gold, or something else entirely (Points? Ranking?). If one of the players is kicked off then the remaining player receives the reward and the player who was kicked off gains nothing but loses nothing. Unless it's a ranking system in which case the player leaving might lose some ranking points.

share|improve this answer
    
That's a unique analysis, I like it. –  Kzqai Oct 28 '10 at 21:31
    
This could be exploited by two players that know each other. They can repeat this as often as they like, because the loser gets no penality. –  unor Jun 16 '13 at 12:08
add comment

The one who disconnected will die once he gets stabbed enough, and the other one will be credited for the kill. Anything more lenient will be exploited.

Generally there's a 1- to 5-minute timer before your body leaves the world.

share|improve this answer
add comment

Lineage II does it like this:

  • You can't exit the game client during a fight - any fight starts, no matter if you attacked, got attacked or healed a team mate who's fighting and you are in "fighting stance", which lasts for 15 seconds after the last such action was made.
  • If you disconnect anyway or your game crashes, your character stays in the game for those 15 seconds before disappearing. It even continues auto-attacking whatever it was attacking, but not using skills - same as it would if you went AFK.
  • There is a way to disconnect instantly, however, by reconnecting to the same account with another client. This is regarded as borderline cheating by the community when done in PvP, and some cheat tools have an option to use it as well, so it isn't being used much there. When biting too much to chew in PvE however, some people still use this trick to avoid unnecessary deaths (though there are in-game items which allow almost the same, namely the "blessed scrolls of escape").
  • Reconnecting to a PvP-flagged zone (castle ground during a siege, for example) and some specific non-instanced epic boss areas moves the character to the nearest town (safe zone) instead. Thus, disconnecting there to avoid "losing" carries a penalty for your team, which means it is strongly discouraged by the social norms of the game.

Personally, I would do it similarly, only allow the players to pre-define the actions their character is taking on disconnection (stay and fight, run to the nearest safe zone avoiding aggro, use a regular scroll of escape, use a blessed scroll of escape, ...) and have the characters persist in the game world even if the player isn't logged in.

share|improve this answer
    
Nice! I like it! :) –  Click Ok Aug 7 '11 at 0:28
add comment

There is no way to determine what caused the disconnection (did the power go off? did I rage throw my machine against a wall?), so you can only assume that the user is trying (or would try) to cheat and make them vulnerable for X minutes.

share|improve this answer
add comment

The way this is handled by EVE Online is as follows:

  • Ship starts to engage warp 15 seconds after disconnect. If it is warp scrambled the ship will not warp away. (Your character's ship will start to "run away" after 15 seconds, unless it is "trapped" by another player)

  • PVP timer (time until player "runs away" while engaged in PvP combat) is set to 3 minutes. (This is to counter a number of other timers).

  • NPC timer stays at 1 minute, but ship warps away after 15 seconds unless warp scrambled by NPC.

  • When a ship is target locked by player, it should switch to the pvp timer (to counter it using the 1 min timer if it disconnects under circumstances where it isn't targetable until the timer is set).

share|improve this answer
1  
add comment

If you have a way of modeling the players usual patterns in battle you could send them into an AI mode until they reconnect or the battle is over whichever comes first. But don't give them any rewards (exp, items, etc.) for the battle unless they return in X amount of time.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.