Rejoining game after crash/disconnect
Rigor
Join Date: 2011-02-05 Member: 80545Members
How tough would it be to modify the server code to recognize when a player reconnects to the server? I get a crash to desktop often enough that it would be nice if the server would give me a period of time to reconnect, realize I'm a player that went link dead and place me 1) back on the correct team and 2) keep my stats intact, including plasma count, score, kills, deaths, etc.
There should be two thresholds. First, to protect busy/full servers, there should be a less forgiving timer of 90 seconds after which your player slot becomes eligible to a new player if there are no other slots available on the server. If player slots are not exhausted, the timer should run to a total of 180 seconds during which you can resume your position on the server with your stats intact.
Nothing irritates me more than being dropped from a good game except when I rejoin and cannot even evolve to a Lerk or afford a shotgun.
Though it's a different issue, the server code needs to be changed to prevent someone from switching teams when it would imbalance the teams. For example, if the teams are 5vs5, I can join the opposite team, causing it to become 4vs6. The RR won't allow this, but you can get around it when you're already on a team.
There should be two thresholds. First, to protect busy/full servers, there should be a less forgiving timer of 90 seconds after which your player slot becomes eligible to a new player if there are no other slots available on the server. If player slots are not exhausted, the timer should run to a total of 180 seconds during which you can resume your position on the server with your stats intact.
Nothing irritates me more than being dropped from a good game except when I rejoin and cannot even evolve to a Lerk or afford a shotgun.
Though it's a different issue, the server code needs to be changed to prevent someone from switching teams when it would imbalance the teams. For example, if the teams are 5vs5, I can join the opposite team, causing it to become 4vs6. The RR won't allow this, but you can get around it when you're already on a team.
Comments
General disconnect protection would be great. The most frustrating thing is commanding a winning team, crashing, and then being unable to rejoin my original team. Though, fixing the crashes should probably be the priority.
I'll dot it down as a pending feature for GmOvrmind if Rigor would be so gracious.
That reminds me, we really need to bring back IP insta-frag and it should be deadly to members of either team. The spinning "arm" on the IP should also "bat" a skulk/lerk/gorge away, just for humor's sake. Both "features" prevent spawn camping.
I don't care to come back as an onos if I lost connection, unless of course I reconnect in time that nobody killed me and I didn't time out.
However, what IS important:
<ol type='1'><li>I come back with all my stats intact (deaths/kills)</li><li>I come back with all my personal resources intact</li><li>I don't have to wait for my old session to timeout before I can reconnect to the full server</li><li>I get my slot back in the case of a full server</li><li>I get back in with my name intact</li></ol>
If I get back in and find that my upgrades onos was killed, AT LEAST I may still have the resources to evolve again. Otherwise, it's skulk duty for 10 minutes. That of course depends on if the server was full and if someone got your slot between the time when your session timed out and you attempted to reconnect.
2. I come back with all my personal resources intact
3. I don't have to wait for my old session to timeout before I can reconnect to the full server
4. I get my slot back in the case of a full server
5. I get back in with my name intact<!--QuoteEnd--></div><!--QuoteEEnd-->
+1
exactly my thaught.
A few games back I was the last marine at the last hive.. 2 shots with my shotgun would have endet the game.
Then the game crashed.
after 10 minutes of rejoin attempts I was back in marine team only to see our base going down...
I was not able to do anything against it because I had not enough plasma to rearm.
(the pea shooter rifle was not enough to fight 2 fades)
That was frustrating!
I'll dot it down as a pending feature for GmOvrmind if Rigor would be so gracious.<!--QuoteEnd--></div><!--QuoteEEnd-->
Please do!
I'd love to see this incorporated in a build or two from now. This is the only thing about the game that really frustrates me.
Today, it either:
Denies you access because the server is full since your original session is still occupying a slot
OR
Connects you to the server and forces a name change and your original session stays until it times out
I assume you cannot help with that behavior, but what you could do is detect a reconnect from a player that dropped <i>y</i> seconds ago and grant them the resource count they had before they dropped. Is that what you were thinking?
Or can you actually interact with connection attempts, forcing the server to immediately terminate the original dropped session and then accept the request from the player who is reconnecting? I'm going to assume you cannot interact with this server behavior.
That was exactly what I was thinking.
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Or can you actually interact with connection attempts, forcing the server to immediately terminate the original dropped session and then accept the request from the player who is reconnecting? I'm going to assume you cannot interact with this server behavior.<!--QuoteEnd--></div><!--QuoteEEnd-->
As it stands, NS2-GmOvrmind(v4) will keep kicking you until your timed-out 'ghost' disappears from the server (it does this for stability reasons). The version I'm currently working on (v5) does it the other way around (kicks the timed-out 'ghost' when you're connected twice). However as you pointed out, a lot of the connecting-functionality is 'hidden' in the engine, and not accessible from the Lua-side of things. This includes detecting an incoming connection of a player BEFORE he has actually entered the game, which means the ghost-kicker I talked about just now, only works when the player was able to fully reconnect to the server again (meaning it won't work if the server was full when you dropped, as it will stay full and you can't reconnect).
What might be possible is to improve the detection of timed-out clients, for example by imposing stricter ping-requirements (a ping that exceeds 3-5 seconds = an auto-kick). This is something I can implement and leave to the server-operator's discretion.
Apart from requesting hooks for the lua code, I also think that the engine should handle stuff like session problems by itself. If a player with same steamid as a "ghost" on the server joins, the engine should be able of either merging those sessions, or atleast kick the ghost in favor of the new guy (in this case stuff like merging plasma should be done clientside).
Regardless of how the engine does it, there should also be a lua hook for such cases, so modders can handle rejoins from "crashes (disconnects that didnt terminate the session) separate to normal rejoins, as a disconnect might be exploited in some mods, but a crash is usually unintentionall.
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->in this case stuff like merging plasma should be done clientside<!--QuoteEnd--></div><!--QuoteEEnd-->
Plasma is stored on the server and imposed on the client, so I'm not sure what you ment there.