Latency Compensation
Imbalanxd
Join Date: 2011-06-15 Member: 104581Members
<div class="IPBDescription">Is it in, is it working, is it coming?</div>So let me just start off by saying that I am not one of those people who don't understand what a beta is, and I'm not here to bash a game that clearly isn't finished yet and isn't meant to be. By the same token, I disagree about certain methods of game design and development taking place, and the priorities assigned to certain aspects of NS2, but everyone has their own opinions. So the following is merely curiosity. I don't expect UW to suddenly accept my point of view as correct and begin implementing what I want, I just want to know the reasons behind certain choices.
That being said: WHERE THE HELL IS THE LATENCY COMPENSATION?
I live in South Africa, a place not necessarily known for its bustling gaming community, but none the less, a place where NS1 thrived. At the moment however, support is scarce as most people aren't willing to pre-order, so those that have make do with playing with 6-7 other pre-orderers once or twice a week. The problem comes in when I go to international servers to play, which is what I do for the majority of my games.
So I'm no fool, and I'm not new to gaming. I know lag makes games harder, FPSs especially, but the problem here is not the latency, its the fact that the game is doing nothing to compensate for it. If I have 300ms to a server, the server informs me that my target, be it skulk or marine, is at point x. This being an FPS, I aim at x and begin to fire, which then takes 300ms to return to the server, at which point my target has moves on to point x+600 ms. This means there is no way in hell I am going to hit a target that is rapidly changing its position. And this isn't a new problem, its obviously existed since network gaming began, and there are numerous algorithms for correcting it, and they are all well documented.
The thing that confuses me is that I have seen the word latency compensation in change logs, as if it is present in the game. Now I obviously have no concrete evidence, but in my honest opinion there is no way that player's positions are being lag corrected at the moment. That being the case, why isn't in the game yet? Now NS2 is an amazing accomplishment, it really is, but I'm a developer too, and I don't see the difficulty in putting a simple time warp algorithm that rolls back player positions based on client latencies. It wouldn't be the easiest thing in the world, and maybe not the fastest, but its a vital part of any multiplayer game and is going to have to be done at some point.
I personally think the problem is this open beta approach. While it is good for some things, I think the inclination is not so introduce anything that could negatively affect game play. That sounds logical, but it has negative consequences. For example, with the average server tick rates as low as they currently are, I think the devs are skeptical about adding to server strain with server side compensation processing. Thats all well and good, but its going to have to go in sometime, and it could be a train wreck if its all left till the end because optimisations need to take all factors into account. If the scripts are optimised for servers without lag compensation, whats going to happen when its introduced?
Anyway, just the opinion of a laggy int.
That being said: WHERE THE HELL IS THE LATENCY COMPENSATION?
I live in South Africa, a place not necessarily known for its bustling gaming community, but none the less, a place where NS1 thrived. At the moment however, support is scarce as most people aren't willing to pre-order, so those that have make do with playing with 6-7 other pre-orderers once or twice a week. The problem comes in when I go to international servers to play, which is what I do for the majority of my games.
So I'm no fool, and I'm not new to gaming. I know lag makes games harder, FPSs especially, but the problem here is not the latency, its the fact that the game is doing nothing to compensate for it. If I have 300ms to a server, the server informs me that my target, be it skulk or marine, is at point x. This being an FPS, I aim at x and begin to fire, which then takes 300ms to return to the server, at which point my target has moves on to point x+600 ms. This means there is no way in hell I am going to hit a target that is rapidly changing its position. And this isn't a new problem, its obviously existed since network gaming began, and there are numerous algorithms for correcting it, and they are all well documented.
The thing that confuses me is that I have seen the word latency compensation in change logs, as if it is present in the game. Now I obviously have no concrete evidence, but in my honest opinion there is no way that player's positions are being lag corrected at the moment. That being the case, why isn't in the game yet? Now NS2 is an amazing accomplishment, it really is, but I'm a developer too, and I don't see the difficulty in putting a simple time warp algorithm that rolls back player positions based on client latencies. It wouldn't be the easiest thing in the world, and maybe not the fastest, but its a vital part of any multiplayer game and is going to have to be done at some point.
I personally think the problem is this open beta approach. While it is good for some things, I think the inclination is not so introduce anything that could negatively affect game play. That sounds logical, but it has negative consequences. For example, with the average server tick rates as low as they currently are, I think the devs are skeptical about adding to server strain with server side compensation processing. Thats all well and good, but its going to have to go in sometime, and it could be a train wreck if its all left till the end because optimisations need to take all factors into account. If the scripts are optimised for servers without lag compensation, whats going to happen when its introduced?
Anyway, just the opinion of a laggy int.
Comments
<a href="https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking#Lag_compensation" target="_blank">https://developer.valvesoftware.com/wiki/So...ag_compensation</a>
<a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=116894" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=116894</a>
Well no. Any degree of latency can be compensated for in theory due to the relative simplicity of the process. However most games won't store player's positions older than 1 second (1000ms). The reason people think pings like 300ms are unplayable is due to jitter. You can play a game with a latency of 10 seconds, as long as the latency is always exactly 10 seconds and does not change, it can easily be compensated. However this is essentially never the case. Since the main cause of high latency in most games is a dodgy connection, jitter is likely to be high. When a players latency is constantly changing by a large degree, the compensation will almost never be correct, and will make the game unplayable. My problem is just plain distance however. My ping hardly ever varies by more than 20ms.
But no, games like half life 1 have been and still do easily compensate for latencies well past 500ms. It isn't ideal, but bluntly put, if I shoot something and I aim correctly, I will hit it. The same cannot be said for NS2 in its current state.
But no, games like half life 1 have been and still do easily compensate for latencies well past 500ms. It isn't ideal, but bluntly put, if I shoot something and I aim correctly, I will hit it. The same cannot be said for NS2 in its current state.<!--QuoteEnd--></div><!--QuoteEEnd-->
Latency should not be compensated more than 100ms, in my opinion. Otherwise having a high ping gives you an unfair advantage.
If you have 500 ping then start shooting me, you put half a second of bullets into me before I even see that you've started shooting. That's fundamentally unfair. It also sucks when you die after you've been around a corner for half a second.
If you have 500 ping then start shooting me, you put half a second of bullets into me before I even see that you've started shooting. That's fundamentally unfair. It also sucks when you die after you've been around a corner for half a second.<!--QuoteEnd--></div><!--QuoteEEnd-->
It all works both ways. The lagger gets the drop on you, you get the drop on the lagger, either way someone is getting 500ms for free. The difference is the information you base your actions on is fresh, whereas the lagger is basing his actions on old information. Either way that's irrelevant, the only thing that matters is that its fair. Without that, you are basically playing a game of who-has-the-best-connection. 90% of games out today are already games of who-has-the-best-fps/resolution, I would hate to think what gaming would become if it was all just down to your rig.
But no, games like half life 1 have been and still do easily compensate for latencies well past 500ms. It isn't ideal, but bluntly put, if I shoot something and I aim correctly, I will hit it. The same cannot be said for NS2 in its current state.<!--QuoteEnd--></div><!--QuoteEEnd-->
Yeah, I guess I should have clarified that its possible for much higher levels of latency compensation, but the cost is more rubberbanding, as the server resets you and other players to their correct positions.
Also, I suspect part of the issue you described is due to poor server performance. 'Jitter' currently occurs in NS2 when server performance drops below 10 ticks/s. Each player's computer tries to compensate with more client-side prediction such that the server is constantly resetting the player's position (e.g. rubberbanding). Even before it becomes blatantly noticeable, you will experience frustrating 'hits that don't register' problems.
The difference is I would have a ~50ms "jump" on 14 of the 16 players in the game and they would have the same benefit over me. Then the one player in the game would have a 500ms jump back and forth. That 500ms player would always have +/- 500ms jumps. It's a lot harder for people to switch from 50ms to 500ms than it is for one person to always play at 500ms. It leads to grossly different outcomes depending on who you're shooting, even if everything else is held exactly the same.
Too many inconsistencies when the ping compensation is allowed to go >100ms.
Second, gaming shouldn't come down to your rig. But you should be expected to have a reasonable rig available. If you're playing from south africa, that's cool. But the euros/NAs/aussies that you're playing with shouldn't have to deal with inconsistent playstyles because of your ping. It basically burdens 15 people so the 16th can play better. 300 ping isn't really a reasonable ping to be playing consistently with.
What you are experiencing is probably not so much lack of lag-compensation, but simply low FPS due to your high latency, compounded by the extra erratic movement common in high-lag situations.
That being said ... you SHOULD shoot AT what you see on your screen - that's the design goal of the game at least. The server will lag compensate and figure out where you thought things were when you fired on your screen and compute the hit as seen on your client. Which is why you can get killed around the corner - to the shooter, you hadn't got around the corner yet.
The only prediction you need to do SHOULD be one frame. Unfortunately, at low FPS and considering the high speed of alien movement (13 m/sec), that amount of compensation can reach upto a meter.
In a lag-compensated game like NS2, the attacker always have the advantage. If you REACT when you take damage, its too late. You need to dodge and run pre-emptively.
I've been playing on an Australian server (from Sweden) and its doable at 350ms, with a good rig. But you have to know how to handle it. First, NEVER STOP MOVING. Second: KEEP MOVING. Third... well, you get the picture.
Too many inconsistencies when the ping compensation is allowed to go >100ms.
Second, gaming shouldn't come down to your rig. But you should be expected to have a reasonable rig available. If you're playing from south africa, that's cool. But the euros/NAs/aussies that you're playing with shouldn't have to deal with inconsistent playstyles because of your ping. It basically burdens 15 people so the 16th can play better. 300 ping isn't really a reasonable ping to be playing consistently with.<!--QuoteEnd--></div><!--QuoteEEnd-->
No, you're trying to over complicate things and I won't have it. Its an FPS, the playstyle is: shoot at what you see. It doesn't matter what ping your opponent has, you are going to shoot at them until they stop moving. In such a case, it is almost always preferable to have low ping. Back in NS1 days, on an engine which is lag compensated past 500ms, nobody (that I know of) was queuing up downloads so that they could get extra ping for that extra advantage.
Either way, you are thinking of it wrong. Sure, maybe accomodating players with 500ms isn't worth it, but it doesn't only work at very high pings. Say two players face off, one with 20ms, one with 100ms. Both are acceptable, but one is 5 times less than the other. In a system without compensation, that player has to be more accurate, and when things start to move faster, which I assume they are going to, even 100ms will cause misses.
<!--quoteo(post=1912042:date=Mar 11 2012, 11:30 AM:name=matso)--><div class='quotetop'>QUOTE (matso @ Mar 11 2012, 11:30 AM) <a href="index.php?act=findpost&pid=1912042"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The game has quite a bit of lag-compensation in it. Unfortunately, the lag compensations is quite expensive, CPU wise, and goes up with increased latency. As the game is already CPU limited, you need quite a good computer to be able to play at 300+ ms lag.
What you are experiencing is probably not so much lack of lag-compensation, but simply low FPS due to your high latency, compounded by the extra erratic movement common in high-lag situations.
That being said ... you SHOULD shoot AT what you see on your screen - that's the design goal of the game at least. The server will lag compensate and figure out where you thought things were when you fired on your screen and compute the hit as seen on your client. Which is why you can get killed around the corner - to the shooter, you hadn't got around the corner yet.
The only prediction you need to do SHOULD be one frame. Unfortunately, at low FPS and considering the high speed of alien movement (13 m/sec), that amount of compensation can reach upto a meter.
In a lag-compensated game like NS2, the attacker always have the advantage. If you REACT when you take damage, its too late. You need to dodge and run pre-emptively.
I've been playing on an Australian server (from Sweden) and its doable at 350ms, with a good rig. But you have to know how to handle it. First, NEVER STOP MOVING. Second: KEEP MOVING. Third... well, you get the picture.<!--QuoteEnd--></div><!--QuoteEEnd-->
I can't really speak about client side prediction, since in most cases it should be transparent to the user. However, prediction taking place on my system can't position correct other players because it doesn't have the required information. The FPS thing makes sense though, I do get remarkably better performance on local servers.
Either way, you are thinking of it wrong. Sure, maybe accomodating players with 500ms isn't worth it, but it doesn't only work at very high pings. Say two players face off, one with 20ms, one with 100ms. Both are acceptable, but one is 5 times less than the other. In a system without compensation, that player has to be more accurate, and when things start to move faster, which I assume they are going to, even 100ms will cause misses.<!--QuoteEnd--></div><!--QuoteEEnd-->
Which is why a 100ms latency compensation is acceptable. When you have people with 200 or 300+ ping, it's totally unreasonable to burden 15 players with extremely unintuitive deaths/kills because that one person has ###### internet or is playing in the wrong region.
I'm not saying latency compensation isn't good (it is good), but it should be capped at 100ms. That is a reasonable ping for people to be playing together. And if you have 150 ping, 100 ms of compensation will still drop you down to 50 ping which, again, is reasonable. If you're 200++ ping, you probably don't belong on the server you're playing on.
Your situation is one of those extremely rare, special cases where you don't really have any other option. That sucks, but so does playing with the aussies as a NA player. 300 pings really messes up NS2's gameplay for shooters and shootees.
That's the thing ... - the server runs the same input as your client, and rolls back all input and positions of entities to correctly position them at the same position they were located on your client. It can thus determine if you actually aimed correctly at enemies AS YOU SAW IT, and award hits.
Basically, every player is seeing a slightly different version of the world, and the server keeps track of this different version for every player.
In case you wonder, that's also one of the reasons why an NS2 server is such a CPU hog.
This is off-topic, but I thought I'd simply point out that if your ping is 300ms, then it would only take 150ms for your actions to reach the server, not another 300ms.
I'm 100% sure that server side latency compensation either isn't implemented yet, or its not working. So if you think it does exist, then I guess UWE need to be informed that its not working as intended, and if you think someone with high ping is somehow getting an advantage, I suggest you start doing it right instead of wrong.
gonna have to agree with this..
and what everyone else is saying, that losing my 50 res fade even though i did the right thing going around the corner is frustrating, and giving somebody an advantage who shouldnt be etc.
this issue will only become more apparent with more players in ns2, when your latency choices are better and there would be no reason to accommodate players for joining outside their region. (Even though i, personally, dont have any issues being under 100 ms)
Can you give specifics examples that make you think it's not working properly ?
Maybe I should make a video of it. Basically I can empty shotgun shot after shotgun shot into skulks, hearing them make there default pain noise, seeing my screen go green with alien blood, and having the hit indicator on the cross-hair light up, but they will never take any damage. The only way I can reliably kill aliens is when they run in a straight line that is parallel to my view. That way even though I'm shooting at where I currently see them, it is still overlapping with where they were 1 or 2 seconds ago. This is not the case when playing on local servers though. It could however be the frame rate prediction thing mentioned by someone earlier. I noticed that frame rate and client tick rate are directly related at the moment, which is quite worrying. That is to say, when I have 40 FPS, my tick rate is high (around 30-40), but when my FPS drops in combat to around 10-20, my tick rate drops below 10.
Also, for those who think you are being "shot around corners", you clearly do not understand how latency compensation works. Do you think the player is guiding his bullets around the corner with wizardry? Is that how you think it works? You blink in as a fade, everyone shoots at you, you blink out. Thats the way it works, laggers or no. The only difference is, with laggers their bullets take a while to reach the server, and therefore a while to reach you. If the laggy-corner-shooting-player had a respectable ping of 50, the only difference is that you would have died far sooner. If anything it is a massive advantage because if you can kill the laggy player before his information reaches the server, it will be discarded because he is already dead.
The point is from my POV (and by extension every other non-lagger in the game), you're going to be killing me a whopping half a second after I've moved behind cover on my screen. This is incredibly frustrating and confusing for people to play against. It's also effectively impossible to play competitively against someone with 150++ ping.
The fact that a 500 ping player could shoot for half a second before the receiving player would get a notification is reason alone to not support huge latency compensation. I think latency compensation is great and the tradeoffs are relatively minor when it is limited. But it has to be limited to something reasonable. 100 ping compensation is reasonable.
same thing with ambushing skulks getting 2 hits in before it registers on your screen
but with high pingers, it works both ways, they wont notice your attacks either
To me that sounds like it's caused by low tick rate / high choke resulting in your actions --while being displayed on your local machine-- disappearing into the void rather than being registered by the server. Further optimizations of the code with take care of that.
<a href="http://web.cs.wpi.edu/~claypool/courses/4513-B03/papers/games/bernier.pdf" target="_blank">http://web.cs.wpi.edu/~claypool/courses/45...mes/bernier.pdf</a>
What do you mean by "client tick rate" ? the tick rate in net_stats refers to the server.
<a href="http://web.cs.wpi.edu/~claypool/courses/4513-B03/papers/games/bernier.pdf" target="_blank">http://web.cs.wpi.edu/~claypool/courses/45...mes/bernier.pdf</a>
What do you mean by "client tick rate" ? the tick rate in net_stats refers to the server.<!--QuoteEnd--></div><!--QuoteEEnd-->
I shall give it a read.
tick rate refers to rate of update. server tick rate is how often the server updates the game world, while client tick rate is how often I give input to the world around me. Tying this to frame rate can create some game breaking side effects. For example, BF3 directly ties your frame refresh rate to your world input rate. This results in many things, but the most pronounced affect is the fact that your rate of fire is directly limited by your frame rate. So if you have a weapon that fires 15 bullets a second, and your frame rate is 1, you will only be firing 1 bullet a second.
If you're interested you can see a video of it here <a href="http://www.youtube.com/watch?v=t9o5wiMoH_Q&feature=plcp&context=C45c8b13VDvjVQa1PpcFMZQfW4_Uxg_x6WrDUhh3d8sU6GrmhCXL8%3D" target="_blank">http://www.youtube.com/watch?v=t9o5wiMoH_Q...8sU6GrmhCXL8%3D</a>
Anyway, I don't need to tell you how bad this could be in a game like NS2. It also means that single "powerful" events can be lost entirely, such as bites and shotgun shots.
Does this mean the rifle shoots slower depending on fps? So that there is a minimum amount of fps you need to get the full attackspeed?
edit: and the best part is, if i limit the fps it doesnt do the damage, only after is stop recording and the fps shoots up again it suddently starts to unload all the bullets that i fired. (with correct attackspeed) Even tho while shooting at 1fps the game gives me the Command Station under attack warning etc.
<center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/zPzPzwjQkO0"></param><embed src="http://www.youtube.com/v/zPzPzwjQkO0" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
PS: this is my internal ns2_turtle version with changed lightning which i might show evil bob, and if he likes it we might see it in the official map... (tho i only finished marinestart so far)
Does this mean the rifle shoots slower depending on fps? So that there is a minimum amount of fps you need to get the full attackspeed?
edit: and the best part is, if i limit the fps it doesnt do the damage, only after is stop recording and the fps shoots up again it suddently starts to unload all the bullets that i fired.<!--QuoteEnd--></div><!--QuoteEEnd-->
Would you be able to test this in a source game like hl dm or l4d? I was under the impression that this whole business of having FPS directly related to update rate was the sign of poor implementation, but maybe its the standard method. I mean I know the update and draw stages are both apart of the game loop, but I would think the render stage would be a lower priority to the update stage.
But i got a feeling that we ll see the same.
I guess there is a minimum fps you need to fire at full speed. It really depends on the weapon and it's rate of fire.
I'm much more interested in if the lag compensation is not working correctly. It is probably a lot more obvious to see at high pings.