Network model, lagouts, and possible improvements

No replies
BehindCurtai
Legacy Username

This is part technical, and part suggestion.

If I understand the networking and client/server model, then how SK works is something like this:

1. Any time you do something, the client sends your request/command off to the server, and then starts to show the graphics on the assumption that you will succeed. The client shows movements based on where your last server confirmed location was, and your current movement command. If you are unable to move -- for example, in bramble or on spikes -- the server will respond with "No, go back" and give that constant "move - return - move - return" effect.

This, along with some log messages that I've seen, indicates that the client is trying to send about 15 (max) "actions" per second to the server; the bramble/spikes bounce rate seems to indicate that the server tries to send about 4-8 updates per second to the client.

If that traffic is lost/dropped (it is UDP), then you can have the client showing your character flashing (because you just took damage), running around with no enemies anywhere, with the messages from the server saying "No longer flashing" or "Grey wolf now at (x, y)" being lost. Equally, when this is happening, the server isn't getting a constant stream from the client.

Alright, so what happens if the server doesn't get a stream of messages from the client?

Answer: Right now, it seems to be: Keep moving in the same direction you were. If you had shields up, keep them up; if not, don't put them up. Move straight ahead, no shields, no stopping, right into all them monsters that you just sent notice of off to the client.

===
Proposal:
Have client options for behavior during lagouts. These would be sent from the client to the server; unlike other options, these would be stored and processed on the server.

Options include:
Shields: Do you (A) Never force shields up, (B) Force shields always, (C) Force shields only if you won't have to give up a charged weapon.

Note that C is for people who run around with weapon strike charged instead of shields; if you get hit by an not-yet-seen monster, you'll lose your charge, and then put up your shield.

Movement: Do you (A) keep moving, (B) come to a stop, (C) Retreat from monsters if you put your shield up?

Combat: Do you (A) Never attack monsters during lagouts, (B) Always attack monsters in front of you, or (C) Attack any monster in range

If you have "Put shields up", then you won't attack. However, the combination of "Don't lose a charge" and "Attack monsters in front of you" would mean that if you had a charged strike, and go into lagout, you'll make one charged attack, and then shield. Combined with "retreat if you put your shield up", and lagouts are no longer insta-deaths.

Now, what causes lagouts? For me, the single biggest cause seems to be loading new monsters into the graphics card. Other people have had occasional network issues that they have written about.

And, I once (thankfully, only once) had a party member train mobs into the start zone while my client was still loading the level. That was fun :-).