Forums › English Language Forums › General › Suggestions

Search

To the Game Developers: Change how client world updates to mitigate latency issues

15 replies [Last post]
Wed, 10/30/2013 - 23:59
Deleted-Knight's picture
Deleted-Knight

As with any online real-time multiplayer game, Spiral Knights suffer from inconsistent latency among players from different parts of the world. Latency is inevitable, but the effects it has can be mitigated.
I think latency is usually handled graphically in two different ways:
1) The client's world syncs with the server at fixed intervals (server sends out update after processing all data within a small window of time). The client's avatar updates with the rest of the world.
2) The client's world syncs itself with the server constantly (server sends out update after processing each piece of data). The client's avatar updates independently.

I'm thinking SK uses method 2. This makes latency harder to to deal with in gameplay.

Currently in PvE:
Latency allows a player to run across traps up to a second before they actually become inactive (on the computer screen). On the flip side, it also allows a player to be damaged by a monster that apparently missed them on the screen. Basically a player cannot effectively react to danger because they cannot perceive a danger based on where they see their avatar.

If you change to method 1:
The personal avatar does not update ahead of the rest of the world. While it may take longer for the avatar to respond to input, it's actions and position would be in sync with that of the rest of the virtual world. A player would always see his avatar get hit at the right place and can better anticipate future danger.
Although the player's effective reaction time is reduced, he can more accurately judge distances between his avatar and the objects of the world. It is much easier to adapt to a slowed reaction time than a skewed perspective of distance.

Impact on PvP
Consider this hypothetical:
Person A can send/receive a packet of data to the server every 20 ms. Person B can send/receive a packet of data to the server every 60 ms.
At a given time = 0: A and B are standing next to each other. The same thing is seen on both persons' client worlds. Person A and Person B then simultaneously press the button to move forward, holding it for exactly 50 ms.
Under the current system...
Since the personal avatar is updated independently from the world:
B sees B run from time 0ms to time 50ms.
A sees A run from time 0ms to time 50ms.

What is really happening in the server?
B runs from time 20ms to time 70ms
A runs from time 60ms to time 110ms

How will they see each other run?
B sees A run from time 80ms to time 130ms
A sees B run from time 80ms to time 130ms

In actuality (the server state): A starts to run 30 ms after B starts.
On B's screen: A starts to run 80 ms after B starts. (B's perspective lags the server by 50 ms)
On A's screen: A starts to run 80ms before B starts. (A's perspective of chronology is wrong!)

Chronology of quick actions are not preserved in A's world just because A has 40ms more latency than B!
This is supported by the phenomenon in Lockdown matches in which some people's sword hits appear to do damage a half second before the sword actually swings. I would assume a similar phenomenon occur in gun bullets and bomb blasts, but those occur too quickly for the eye to catch.
It also explains why in Blast Network, people often complain about getting killed in a safe spot that they moved into just a fraction of a second before the bomb blast.

Again, if the personal avatar is updated with the rest of the world, such problems would not exist. Simultaneous events in the server will still be simultaneous in client world (just equally delayed by ping times). This allows players to accurately judge distances at any given time at the cost of a longer response time for commands. I think most players with significant latency would much rather have an accurate picture of location than a slightly shorter response time. People with insignificant latency would not suffer from such a change since the response time can only grow as large as their ping.

Disclaimer: I understand I have no actual knowledge of how SK manages graphics; however, experience tells me that events that are supposed to occur simultaneously are not always displayed so. If each client world is mirroring the server world accurately, two events that intersect at a single location on the server world should not intersect at different locations on the client's world.

PLEASE DO SOMETHING TO ADDRESS THIS PROBLEM

Thu, 10/31/2013 - 18:02
#1
Deleted-Knight's picture
Deleted-Knight
I would appreciate it if

I would appreciate it if people can keep this topic alive. It would definitely help with "drag lag" issues.

Fri, 11/01/2013 - 12:51
#2
Thunder-The-Bright's picture
Thunder-The-Bright
gods ain't gonna help you, son.

GMs read the suggestion forums and refer to devs. if you bump, you do that to get more attention from the community, cause after a while GMs just stop reading your suggestion.
anyway, not knowing anything about all you have said, I'll just walk away.

Sat, 11/02/2013 - 06:37
#3
Dust-Dragon's picture
Dust-Dragon
Beep.

I can't really tell what you're asking them to fix. As it stands, the client is essentially telling the server what it's doing and the server responds with what it knows has happened. As you'd expect, various latency amounts lead to clients being out-of-sync from one another. At a guess, you're suggesting the client does nothing except what the server tells it? You still suffer from sync issues as the rate at which packets are sent and received still vary. The server should always update clients at the same time, the sync problem comes from different clients receiving those packets at different times.

The straight-forward way to compensate is to have the client "guess" what's happening:
If A started moving, the server hasn't told me where they are yet, but I know they were moving left; so let's move them to the left.

Seems all fine, right? Unfortunately, no. The time at which it found out A started moving will be later than A actually did.

Now, let's look at what you're saying: Clients don't do any updating, they wait for the server to tell them. Now, the infrastructure is there already, but how will you sync the worlds when clients are receiving data at different rates? Fixed update times do help as when you update will depend on your ping only, yet, the game becomes generally more sluggish, and high-latency players will find the game "dragging" along (imagine a player having to wait 500ms just to move one step, but "jumping" instead of stepping).

So, you have two choices: 1) Seemingly reliable updating, but actually incorrect due to timing issues, or 2) More reliable updating, but generally more sluggish/jumpy game-play.

As much as latency annoys me, I, personally, prefer the first option.

PS: Graphics are managed by the client. It's the business-side of things you're referring to.

Sat, 11/02/2013 - 20:24
#4
Deleted-Knight's picture
Deleted-Knight
@Dust-Dragon

"The straight-forward way to compensate is to have the client "guess" what's happening:
If A started moving, the server hasn't told me where they are yet, but I know they were moving left; so let's move them to the left."

That's exactly what the problem is! The client moves the character before receiving data from the server. A's character running on the A client's screen is actually slightly ahead of the actual character running in the server. The problem is the rest of the world is slightly behind the server due to latency. So another character, B, that appears (on A's screen) to run beside A is actually running slightly ahead of A in the server. relative location totally screwed up.

"Fixed update times do help as when you update will depend on your ping only, yet, the game becomes generally more sluggish, and high-latency players will find the game "dragging" along (imagine a player having to wait 500ms just to move one step, but "jumping" instead of stepping)."

They won't jump because the server isn't sending out data at their ping rate. In your example, it would take 500ms for them to start running and 500ms for them to stop, but in between, the running would be as continuous as if their ping is zero. What's the point of seeing your character run in 1 ms, if in actuality it isn't moving until 499ms later? The server state is what counts.

Take an extreme case: 1 second ping.
You run towards a wall. On your screen, you would see your character run through the wall then get dragged back as the server data comes in. You appreciated the immediate feedback of running when you press the button, but ultimately your character did not move. With the second system, your character won't move for 2 seconds after pressing the button, but it never runs through the wall.
Now replace that wall with the square where a Trojan is about to smash down on. In the first case, you appear to run pass the hit zone, but you get dragged back and got hit. In the second case, your character doesn't start running in time and you end up hit. Suppose you want to avoid getting hit like that again in the future. What is easier to compensate?

In the first case, you must know how much you will get dragged back and figure out if you have enough time to get far enough to avoid the "drag range".
In the second case, you must know your average ping and determine if there is enough time to move pass before impact.
It's only natural for a person to accept what they see on their screen as reality. Thus, I think it is safe to assume people can more easily adapt to the latter than the former.

FYI:
I'm asking for a graphical fix, not a server-side fix. Make it so the clients only update when server data comes in. Updating the client without connection to the server is pointless and only creates an illusion of no latency.

Sat, 11/02/2013 - 20:39
#5
Deleted-Knight's picture
Deleted-Knight
Additional evidence

Additional evidence that the client avatar is updated independently from the rest of the world:
In Lockdown games, when you lose connection, everyone else starts running through the walls except you. Why is it that your character still responds to your input but nobody else seem to be displaying properly? Your client is updating the location of your character without receiving confirmation from the server. The server thinks you're standing still (or running into a wall), but on your screen you are moving.
A more accurate handling of disconnection would be the entire world freezes (ie. no new update after the last server contact).

Sun, 11/03/2013 - 01:01
#6
Hexzyle's picture
Hexzyle
When you're this swag this world just bows at your knees.

I wouldn't mind having a "shadow player" in the options, instead of the server always correcting your position, it would send you your current location, and your client would draw that on your screen. So you'll move, and then you'll see your shadow move and follow behind you. Using this you can VERY quickly determine if you're lagging or have completely disconnected.

Sun, 11/03/2013 - 03:32
#7
The-Vindicar's picture
The-Vindicar
>Updating the client without

>Updating the client without connection to the server is pointless and only creates an illusion of no latency.

It's called client-side prediction, and the reason stated is EXACTLY why it's implemented in games - because it makes lags much less noticeable, aside from extreme cases you're stating.

Sun, 11/03/2013 - 10:31
#8
Deleted-Knight's picture
Deleted-Knight
@HexzyleI actually like that

@Hexzyle
I actually like that idea a lot. Unfortunately that may require a lot more work to implement.

@Vindicar
Making lag less noticeable doesn't mean making less lag. Suppose you have to live real life like that. You throw a ball into the air and try to catch it. You see your hand connect with the ball, but guess what? It actually didn't. Even if you managed to train yourself to catch the ball every time, the visual feedback will show you "missing". On the flip side, if you can see the actual slow reaction of your hand, over time you can train yourself to give commands at earlier times to compensate and you always get correct visual feedback.

Sun, 11/03/2013 - 11:28
#9
The-Vindicar's picture
The-Vindicar
@Cradarc

It's a game, not a real world, it's illusional by definition, so it's important how you feel here, not what you actually get.
If you're suggesting disabling client-side prediction, it would make lag visible for every client, even if in reduced amount (not sure why, though).

Sun, 11/03/2013 - 15:13
#10
Thinslayer's picture
Thinslayer
Shadow Player

We have "shadow players," called battle sprites. I've noticed that they fall behind when I lag, staying at the spot I was right when the lag began, and catching back up to me when the lag ends.

Watch your sprite to see what I mean.

Sun, 11/03/2013 - 16:44
#11
Misty-Wellington's picture
Misty-Wellington
<insert witty comment here>

Although the player's effective reaction time is reduced, he can more accurately judge distances between his avatar and the objects of the world. It is much easier to adapt to a slowed reaction time than a skewed perspective of distance.
_____

Fixed:
It is much easier to adapt to a skewed perspective of distance than a slowed reaction time.

Slowed reactions isn't a fix and contradicts with your claim that you want to fix latency issues. You want to solve the problem of "What the server sees isn't going to be what you see", but then suddenly you want to solve an entirely different minor problem by making the initial problem caused by latency worse.

It's really easy to judge distances on this game because the world goes by a Grid system. All weapons in the game have distances that correlate with the grid system without being forced to use the grid system itself, allowing freedom of hitting/shooting omnidirectionally. I'd much rather take an estimate or practise with a weapon first to test how far it goes than get hit by an enemy that I would have dodged had I not had impaired reactions.

Sun, 11/03/2013 - 17:29
#12
Usevnsevnsixfivfor's picture
Usevnsevnsixfivfor

OOO won't fix their servers. Even if someone bribed them over $200,000.

Sun, 11/03/2013 - 19:43
#13
Deleted-Knight's picture
Deleted-Knight
@Misty

I think it's pretty clear you didn't comprehend my entire post and decided to take those few lines of of context.

Currently your distance-judging is impaired because the distance between objects you see on the screen is not necessarily the distance between objects on the server world. Suppose you are running past a bush. At the instant when you see yourself right next to the bush (one square away), the server actually sees you a little more than one square away from the bush.
It has nothing to do with how far away different things appear on your screen. It has to do with how the position of things on your screen is different than that on the server. Since the server state is what is reality, this means what you see on your screen is not the real location, and the distances are not necessarily the real distances.

You seem to be under the impression that if you see yourself move, you moved. Well, that's technically not true. Even if you see your character move at lightning reaction time, the server's reaction is delayed by latency and there's nothing you can do about it. Your reaction time isn't being more impaired, it's just that there would no longer be an illusion of non-impaired reaction time.

You can't "fix" latency. My suggestion is a way to make it easier for players to adjust for latency. Hence the choice of the word "mitigate".

Sun, 11/03/2013 - 19:53
#14
Deleted-Knight's picture
Deleted-Knight
Thinslayer,The battle

Thinslayer,
The battle sprites are useful for detecting massive lag spikes, but they don't help with normal latency issues. Especially when you're running, they tend to trail a little farther regardless and it will be hard to tell where exactly is your character's position on the server.
Plus, battle sprites are not allowed in PvP, where this issue is most significant and detrimental to game play.

Sun, 11/03/2013 - 20:09
#15
Deleted-Knight's picture
Deleted-Knight
An analogy to clear things up

Latency is a small hole in the bullet proof vest of Spiral Knights. The developers have covered up the entire vest with a nice opaque fabric so people won't see the hole and complain about the imperfect vest.
In practice, the vest blocks most bullets except for certain cases where the bullet hits the hole. In those cases, the players suffer.

What I'm asking:
Let us see where the hole is in our vest so that we can better protect it when dueling. It is really hard to protect a vulnerable spot if we can't see where it is. The hole is going to be there regardless if we see it or not, but I think people would rather have an ugly suit that they can better work with than a perfect looking suit with a hidden flaw that is hard to detect.

What a lot of people think I'm asking:
Instead of giving us vests with hidden holes, remove the holes and make the vests smaller.

Powered by Drupal, an open source content management system