Lag Compensation

Spektor56Spektor56 Members Join Date: 2010-11-10 Member: 74858Posts: 57
edited January 2013 in NS2 General Discussion
This game appears to allow either very high levels of interpolation or uses a very large buffer on the server for computing lag compensation. I was wondering what methods of latency compensation are used (interpolation, extrapolation, etc) and if there are client commands I can use to adjust these settings (updaterate, interpolation setting) etc. I see most servers I'm playing on at around 30 ticks, so about 50% of my frames should be interpolated frames.

But yea, my point is that the default lag compensation appears to compensate for very high latencies which is very annoying. Clearly behing behind corners on my screen and still losing health, or being hit by players that aren't even looking at me yet.

Also, the console doesn't give much feedback as to possible commands and/or invalid commands that are entered

Comments

  • statikgstatikg Members Join Date: 2012-09-19 Member: 159978Posts: 427 Fully active user
    What? I don't think I have ever heard of this happening in natural selection two.
  • thefonzthefonz Members Join Date: 2011-06-22 Member: 105847Posts: 491
    NS2 lag compensation is flawless. Hacks bro.

    /sarcasm.

    AFAIK compensation is set for about 150ms? Don't take anything I say as fact. Maybe someone who knows will post if you require a technical answer.
  • GuspazGuspaz Members, Constellation Join Date: 2002-11-01 Member: 2862Posts: 912
    I think you're confusing packetloss correction and latency compensation...

    Every modern game suffers from the shot-behind-corner issue, because they all feature latency compensation. The alternative is a return to the Quake 3 era where you have to lead all your shots by a variable amount determined by your ping at that exact second. Nobody wants to go back to that.
  • DavilDavil Florida, USAMembers, Constellation Join Date: 2012-08-14 Member: 155602Posts: 734
    edited January 2013
    "It's mostly the interpolation settings" would be the general consensus. That may change in the future so that server ops can set their own interp settings, but not 100% on when.
    Meh
  • BanditaBandita Members Join Date: 2013-01-18 Member: 180393Posts: 11
    Situation 1 -->
    Ping: Me 76, Enemy player 86
    avatars: Me (marine), Enemy player (Onos)

    Onos is in front of me and I'm shooting at it, but it turns away and runs around the corner. This took him about 2.5 seconds.
    Suddenly I'm down on the ground with no Onos around.

    Situation 2 -->
    Ping: Me 64, Enemy player 54
    avatars: Me (camo skulk), Enemy player (jetpack+ flamethrower marine)

    I'm walking on the wall and suddenly there is a manual radar ping. I see flames for about 0.3 seconds and die.

    Based on pings these shouldn't happen. But they do.
  • TSADroneTSADrone Members Join Date: 2012-12-01 Member: 173807Posts: 46
    They claim it's set to 100ms or something but it plays like it's much higher for me, at least .5 seconds (at a minimum) out of sync. This is with ~45ms latency and a great computer. I'd say at least 90% of my deaths as an alien feel like I am either out of LOS of the person who killed me, the person wasn't facing me, or I can see their shots missing but yet I still take damage and die.

    The worst part is marines with shotguns. As an alien, the only "skill" based dodging in NS2 consists of jumping madly around at random and praying.
  • matsomatso Master of Patches Members, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Shadow, NS2 Community Developer Join Date: 2002-11-05 Member: 7000Posts: 1,554 mod
    The difference between your view and the view of the guy attacking you is :
    100ms interp + your lag + their lag + 50ms server->client rate + 1 fps worth of ms + 30-50ms graphics card/display delay

    Assuming 75ms lag for both you and your enemy, the time difference between your worlds is about 350-400ms.

    However, do notice that that there is nothing special with the NS2 netcode here - it's pretty much the same as for any lag-compensated game (it's pretty much a copy of the Source netcode). The REAL difference is that NS2 players move faster and closer than most standard shooters, making the lag compensation more noticeable.

    After a while, you learn how it works and how to use it.
    Member of CDT, Senior Spark Engine Hacker
  • xDragonxDragon Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Join Date: 2012-04-04 Member: 149948Posts: 1,954 Fully active user
    edited January 2013
    I would say that source (atleast like CS:S) is better because of a couple key differences - Interp is calculated directly from client update rate (interp_ratio/ur) - makes for approx 30ms at default settings (interp ratio 2 IIRC). Having the higher tickrate also reduces the delay on updates from the server - NS2 Server would take atleast 33ms, 66 ticks drops that to 15ms - So that same situation for CS:S would be ~250ms or even a little lower.

    That said I think that as NS2 (and Spark) mature, we will hopefully be able to increase the server tickrate, and also the client update rate. The current client update rate of 20 makes any interpolation value <50 introduce warping. I would like to see server side settings to change these values (client update rate and tickrate), even if just for the smaller 6v6 games, as higher performance would benefit everyone, and there may be enough overhead in a 6v6 to support it. Also I would like to see these settings propogated to the clients on connect (currently I dont think the interpolation setting is, meaning it needs to be set again on every client connect).
  • turtsmcgurtturtsmcgurt Members, Reinforced - Supporter Join Date: 2012-11-01 Member: 165456Posts: 581 Advanced user
    edited January 2013
    QUOTE (matso @ Jan 18 2013, 01:52 PM) »
    The difference between your view and the view of the guy attacking you is :
    100ms interp + your lag + their lag + 50ms server->client rate + 1 fps worth of ms + 30-50ms graphics card/display delay

    Assuming 75ms lag for both you and your enemy, the time difference between your worlds is about 350-400ms.

    However, do notice that that there is nothing special with the NS2 netcode here - it's pretty much the same as for any lag-compensated game (it's pretty much a copy of the Source netcode). The REAL difference is that NS2 players move faster and closer than most standard shooters, making the lag compensation more noticeable.

    After a while, you learn how it works and how to use it.


    Something else people don't really think of is how long the alien models are relative to the player's camera. Both skulk and lerk are fairly long, giving marines slightly more time to hit you as you turn around a corner.
  • CommunistWithAGunCommunistWithAGun Local Propaganda Guy Members Join Date: 2003-04-30 Member: 15953Posts: 7,651 Advanced user
    QUOTE (matso @ Jan 18 2013, 03:52 PM) »
    The difference between your view and the view of the guy attacking you is :
    100ms interp + your lag + their lag + 50ms server->client rate + 1 fps worth of ms + 30-50ms graphics card/display delay

    Assuming 75ms lag for both you and your enemy, the time difference between your worlds is about 350-400ms.

    However, do notice that that there is nothing special with the NS2 netcode here - it's pretty much the same as for any lag-compensated game (it's pretty much a copy of the Source netcode). The REAL difference is that NS2 players move faster and closer than most standard shooters, making the lag compensation more noticeable.

    After a while, you learn how it works and how to use it.


    When will configuration changes on the client side be made available?

    IE: the spark variants of cl_cmdrate, rate, etc. I'd like to be able to optimize my settings for my personal setup.
    user posted image

    #BATTERY
  • AxehiltAxehilt Members Join Date: 2003-09-12 Member: 20796Posts: 198
    The sheer frequency that I hit stationary aliens who think they're hiding behind cover (because they can't see me) when they're not (because their model's foot sticks out) leads me to assume the OP complaining about the same situation.

    To some degree it's a problem deserving of a solution -- players expect that if they can't see you, you can't see them. But it's also a sort of unavoidable trait of long player models with a 1st person camera (a dog can't swivel its head and know with certainty that it can't be seen around a corner, but we humans are used to this being the case in both real-life and the overwhelming majority of FPSes on the market.)
  • NeoRussiaNeoRussia Members Join Date: 2012-08-04 Member: 154743Posts: 618
    QUOTE (turtsmcgurt @ Jan 18 2013, 07:55 PM) »
    Something else people don't really think of is how long the alien models are relative to the player's camera. Both skulk and lerk are fairly long, giving marines slightly more time to hit you as you turn around a corner.


    Actually, the player view comes from the start of the alien's neck, not the head. This is why if you can see a marine, you are usually sticking out and obvious if he is looking straight at you.
  • Spektor56Spektor56 Members Join Date: 2010-11-10 Member: 74858Posts: 57
    QUOTE (matso @ Jan 18 2013, 09:52 PM) »
    The difference between your view and the view of the guy attacking you is :
    100ms interp + your lag + their lag + 50ms server->client rate + 1 fps worth of ms + 30-50ms graphics card/display delay

    Assuming 75ms lag for both you and your enemy, the time difference between your worlds is about 350-400ms.

    However, do notice that that there is nothing special with the NS2 netcode here - it's pretty much the same as for any lag-compensated game (it's pretty much a copy of the Source netcode). The REAL difference is that NS2 players move faster and closer than most standard shooters, making the lag compensation more noticeable.

    After a while, you learn how it works and how to use it.


    So the game engine uses extrapolation as a fall-back mechanism like the source engine as well? Is there any information recorded regarding how many frames have been extrapolated? Also, it should be half of the latency (not round-trip delay) because the client does not request state updates from the server, the server should just send them at the clients set updaterate. If there's currently no way to set your updaterate I would assume you receive state updates at the tick rate of the server. I used to play cal-i level in counter-strike and other games, the netcode just seems a bit off to me for this one. Tribes Ascend is a very fast paced game as well, much faster than NS2, and the hit reg works wonderful. I'm getting 60fps pretty consistently with every graphic setting maxed.
  • DavilDavil Florida, USAMembers, Constellation Join Date: 2012-08-14 Member: 155602Posts: 734
    QUOTE (Spektor56 @ Jan 18 2013, 07:23 PM) »
    So the game engine uses extrapolation as a fall-back mechanism like the source engine as well? Is there any information recorded regarding how many frames have been extrapolated? Also, it should be half of the latency (not round-trip delay) because the client does not request state updates from the server, the server should just send them at the clients set updaterate. If there's currently no way to set your updaterate I would assume you receive state updates at the tick rate of the server. I used to play cal-i level in counter-strike and other games, the netcode just seems a bit off to me for this one. Tribes Ascend is a very fast paced game as well, much faster than NS2, and the hit reg works wonderful. I'm getting 60fps pretty consistently with every graphic setting maxed.

    From what I've read I believe both the client and the server are doing the extrapolation. Seems a bit off I suppose since the server makes the final call anyway.
    Meh
  • FrustrationFrustration Members Join Date: 2013-01-19 Member: 180628Posts: 53
    I'm so glad someone else besides me is having this issue.

    I can't believe how people can be so calm about it though.

    How are people suppose to judge the situation if they are not safe when they should be.

    I'm not talking about running behind corners and still dying - which is not too good either, but I can live with that.

    Crap like dying in 0,001 sec after they've barely seen you.But if you were that Marine, you'd have to shoot 1 full clip into a skulk to take it down.

    How is one suppose to adapt to this if you get killed before you even see the threat ?
  • CommunistWithAGunCommunistWithAGun Local Propaganda Guy Members Join Date: 2003-04-30 Member: 15953Posts: 7,651 Advanced user
    The delay is god awful, much worse than anyone is complaining about. I was testing with a friend, his ping was 78 minewas 45, and he just jumped across a doorway into and out of my vision, we were the only two people present, and I could stop shooting about a half second after I "thought" I killed him and he continued taking damage and died.

    This needs to be resolved.
    user posted image

    #BATTERY
  • DamDSxDamDSx Members Join Date: 2004-08-10 Member: 30506Posts: 311
    interp and I think it is 100ms
  • Spektor56Spektor56 Members Join Date: 2010-11-10 Member: 74858Posts: 57
    edited January 2013
    100ms interp in this day and age is insanely high... 100ms interp compensate for latencies up to 200ms, and if you have 200ms you're either playing in the wrong region, or live in an amish community
  • AWhiteAWhite Members Join Date: 2007-07-26 Member: 61685Posts: 60
    Pretty sure stomp is a special case (of broke) and shouldn't be considered in the interp conundrum.
  • VitdomVitdom Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow, WC 2013 - Shadow Join Date: 2012-04-30 Member: 151345Posts: 285 Advanced user
    edited January 2013
    I don't think there is a console command to configure your net settings.

    QUOTE (xDragon @ Jan 18 2013, 11:38 PM) »
    That said I think that as NS2 (and Spark) mature, we will hopefully be able to increase the server tickrate, and also the client update rate. The current client update rate of 20 makes any interpolation value <50 introduce warping. I would like to see server side settings to change these values (client update rate and tickrate), even if just for the smaller 6v6 games, as higher performance would benefit everyone, and there may be enough overhead in a 6v6 to support it. Also I would like to see these settings propogated to the clients on connect (currently I dont think the interpolation setting is, meaning it needs to be set again on every client connect).

    Why do you want to increase the server tickrate? And are there really any network command settings for the interpolation?

    QUOTE (Spektor56 @ Jan 19 2013, 04:23 AM) »
    So the game engine uses extrapolation as a fall-back mechanism like the source engine as well? Is there any information recorded regarding how many frames have been extrapolated? Also, it should be half of the latency (not round-trip delay) because the client does not request state updates from the server, the server should just send them at the clients set updaterate. If there's currently no way to set your updaterate I would assume you receive state updates at the tick rate of the server. I used to play cal-i level in counter-strike and other games, the netcode just seems a bit off to me for this one. Tribes Ascend is a very fast paced game as well, much faster than NS2, and the hit reg works wonderful. I'm getting 60fps pretty consistently with every graphic setting maxed.

    The current update rate is 20 Hz. It needs to increase in order to lower the interpolation buffer delay.

    QUOTE (Davil @ Jan 19 2013, 04:27 AM) »
    From what I've read I believe both the client and the server are doing the extrapolation. Seems a bit off I suppose since the server makes the final call anyway.

    Only the client does the extrapolation, it wouldn't make any sense if the server would because it's the server who's the master and decides everything. If it'd extrapolate then the whole design is very bad, because the server is by-design sending inaccurate state data to the clients.

    If you're thinking of prediction though; if there wouldn't have been any prediction you would've noticed a long delay when you are sending move commands to the server and once you receive the move states back from the server you would actually start to move, where the delay is decided by your latency to the server. High prediction durations(hence high ping/latency) in general is bad for your own experience, because since the server is the master, you have a higher chance of receiving an overriding state in case something unpredictable happens, which warps you into the correct postition etc.

    QUOTE (Spektor56 @ Jan 19 2013, 10:03 PM) »
    100ms interp in this day and age is insanely high... 100ms interp compensate for latencies up to 200ms, and if you have 200ms you're either playing in the wrong region, or live in an amish community

    Interpolation and lag compensation are different things. They are not interchangeable terms.

    --

    While we are discussing interpolation / lag compensation! Since UWE is adding first person spectating to the game, I am just wondering if the first person spectating mode will be lag compensated to match the remote player's actual world state, and actual view, so that you are truly watching the world from the remotely spectated player's eyes. CS, CSS, + LOADS of other games, do NOT utilize lag compensation for FPSpeccing. Please enable full lag compensation for FPSpeccing in NS2 UWE!!! It would look and feel soo ugly if you wouldn't. :(
    Post edited by Unknown User on
    Steam profile
    Hyperdata for breakfast. Hyperdata for lunch. Hyperdata for dinner. Hyperdata for supper. Hyperdata as snacks!
    Dream hyperdata! Speak hyperdata! Live hyperdata! Be hyperdata!


    Nothing like the smell of distress bacon and egg lock in the morning! -- KwisatzHaderach
  • matsomatso Master of Patches Members, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Shadow, NS2 Community Developer Join Date: 2002-11-05 Member: 7000Posts: 1,554 mod
    QUOTE (NeoRussia @ Jan 19 2013, 04:05 AM) »
    Actually, the player view comes from the start of the alien's neck, not the head. This is why if you can see a marine, you are usually sticking out and obvious if he is looking straight at you.


    No, player view is on the vertical (y) axis of the model. So if a skulk can see a marine player, the marine can see half the skulks model. This does screw up attempting to sneak any kind of peek as an alien, as if you want to look down a corridor, you need to expose half your body.

    Hard to do anything about it - sticking the viewpoint at the eye position would make turning around without moving look really weird (you would rotate around your head, flicking your behind around), alternatively your eye position would move in space when you turn around, something that would feel weird and possibly cause quite a bit of motion sickness.
    Member of CDT, Senior Spark Engine Hacker
  • Spektor56Spektor56 Members Join Date: 2010-11-10 Member: 74858Posts: 57
    edited January 2013
    QUOTE (Vitdom @ Jan 20 2013, 01:35 AM) »
    Interpolation and lag compensation are different things. They do not affect each other.


    They do actually, interpolation adds a buffer to every game state received by the game client, adding additional latency based on the interpolation setting. When the server computes the latency compensation it must know the interpolation setting of the client (additional latency added by the client)

    image

    Server is at the top, and client is at the bottom obviously. Assuming a 150ms buffer as stated by another user, 60ms latency and a 33ms interp setting should result in approximately 62% usage of the buffer. Of course, this is assuming an ideal system where there is no graphics delay, packet loss, or choke.
    Post edited by Unknown User on
  • soccerguy243soccerguy243 Members, WC 2013 - Supporter Join Date: 2012-12-22 Member: 175920Posts: 515 Advanced user
    I think better damage indicators for aliens would help. There have been times where I take 100% of the damage to kill me before i can even hit the spacebar and jump off the extractor.

    Even as lerk if i'm perched somewhere I take nearly 100% damage before i can get even one flap of my wings...
Sign In or Register to comment.