Interp?

male_fatalitiesmale_fatalities ausns2.org Join Date: 2004-03-06 Member: 27185Members, Constellation
<div class="IPBDescription">So how high is it set?</div>Does anyone know the value of interp in NS2?

Thing's i've noticed when both players on 40-60 ping
- Both skulk/marine standing still, bite range is acceptable
- Leaping skulks seem to bite me from 5m away
- Cele skulks seem to bite me from 3-4m away

It seems when I'm marine, I have to time the jump atleast a full 2-3m before the skulk reaches me. Compare this to NS1 where you time the jump just as the skulk is about to collide into you.

FYI for those wondering what interpolation is:

<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->"Interp" is essentially how CS:S interprets differences in latency. It's sources way to deal with lag. Basically both parties(the shooter and the shootie) send all their data to the server with their respective timestamps. The server receives and interprets the data and gives the kill to whoevers shot should have hit first according the the info it receives when balanced against the latency statistics between the two parties.<!--QuoteEnd--></div><!--QuoteEEnd-->

Comments

  • _Necro__Necro_ Join Date: 2011-02-15 Member: 81895Members, Reinforced - Shadow
    I'M not sure, but I think it was reduced to 75ms around build 219 or something.
  • male_fatalitiesmale_fatalities ausns2.org Join Date: 2004-03-06 Member: 27185Members, Constellation
    <!--quoteo(post=1989653:date=Oct 11 2012, 10:03 PM:name=_Necro_)--><div class='quotetop'>QUOTE (_Necro_ @ Oct 11 2012, 10:03 PM) <a href="index.php?act=findpost&pid=1989653"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'M not sure, but I think it was reduced to 75ms around build 219 or something.<!--QuoteEnd--></div><!--QuoteEEnd-->

    There were patch notes saying they did something to interp. But it feels like they increased it rather then decreased it
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    100ms as far as I know.
  • VeNeMVeNeM Join Date: 2002-07-13 Member: 928Members
    100 is way too gd high if thats the case.
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    I think the way it is worked out is: the server sends you 20 updates a second, that is one update every 50ms. They then double this to compensate for packet drops, so you will still have 2 packets to interpolate between.
  • elodeaelodea Editlodea Join Date: 2009-06-20 Member: 67877Members, Reinforced - Shadow
    Pretty sure its 100ms. Atleast thats what the step size is in the lua? = 0.1
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Interpolation is default set to 100ms in NS2 currently, down from 150 several patches ago.
  • DavilDavil Florida, USA Join Date: 2012-08-14 Member: 155602Members, Constellation
    When the game is finished being optimized I'm sure they'll lower it to something reasonable. But yea it is pretty irritating being halfway down a vent and still being shot to death cause someone is lagging.
  • havok?havok? Join Date: 2012-05-22 Member: 152462Members, NS2 Map Tester
  • KarrdeKarrde Join Date: 2003-05-13 Member: 16264Members
    It would be nice if we could set our own interps on the fly ala the way TF2 allows us to manipulate the client part of compensation. You can decide for yourself what works best based on your own ping and to what degree of warping you'll tolerate to get the distances right.
  • male_fatalitiesmale_fatalities ausns2.org Join Date: 2004-03-06 Member: 27185Members, Constellation
    <!--quoteo(post=1989818:date=Oct 12 2012, 04:29 AM:name=Karrde)--><div class='quotetop'>QUOTE (Karrde @ Oct 12 2012, 04:29 AM) <a href="index.php?act=findpost&pid=1989818"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It would be nice if we could set our own interps on the fly ala the way TF2 allows us to manipulate the client part of compensation. You can decide for yourself what works best based on your own ping and to what degree of warping you'll tolerate to get the distances right.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Has anyone tried editing their own .lua file
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    It would be blocked via consistency checking anyway.
  • eh?eh? Join Date: 2012-03-03 Member: 147997Members
    There is a console command for changing the interpolation for the server (interp), but it is reset on map change and player join (iirc).

    So you would need to use DAK atm if you wanted to run a server with a lower interp without constantly re-entering the console command.
  • FloodinatorFloodinator [HBZ] Member Join Date: 2005-02-22 Member: 42087Members, Reinforced - Shadow
    <!--quoteo(post=1990013:date=Oct 12 2012, 04:14 AM:name=eh?)--><div class='quotetop'>QUOTE (eh? @ Oct 12 2012, 04:14 AM) <a href="index.php?act=findpost&pid=1990013"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->There is a console command for changing the interpolation for the server (interp), but it is reset on map change and player join (iirc).

    So you would need to use DAK atm if you wanted to run a server with a lower interp without constantly re-entering the console command.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Jup that is right.
    Our servers run with an interp of 50ms, but there isn't such a big difference to 100ms.
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    Out of curiosity, what happens if you set it to 0ms?
  • KuddlyKalliKuddlyKalli Yuggera Country Join Date: 2010-12-23 Member: 75905Members, NS2 Playtester, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester
    <!--coloro:#FFC0CB--><span style="color:#FFC0CB"><!--/coloro-->Something, somewhere is creating an illusion of "lag" between players with low pings on a quality server that results in dying to gunfire long after you've gone around a corner and left the marine's line of sight. It <b>needs</b> to be addressed, and this interp seems to be the most likely culprit.<!--colorc--></span><!--/colorc-->
  • shadershader Join Date: 2003-02-07 Member: 13247Members
    edited October 2012
    <!--quoteo(post=1990131:date=Oct 12 2012, 01:25 AM:name=Kallistrate)--><div class='quotetop'>QUOTE (Kallistrate @ Oct 12 2012, 01:25 AM) <a href="index.php?act=findpost&pid=1990131"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--coloro:#FFC0CB--><span style="color:#FFC0CB"><!--/coloro-->Something, somewhere is creating an illusion of "lag" between players with low pings on a quality server that results in dying to gunfire long after you've gone around a corner and left the marine's line of sight. It <b>needs</b> to be addressed, and this interp seems to be the most likely culprit.<!--colorc--></span><!--/colorc--><!--QuoteEnd--></div><!--QuoteEEnd-->

    "Shot around a corner" is a downside of lag compensation. The upside of lag-compensation is you don't have to lead your targets - if you press fire while they are under your crosshair then it's a hit.

    Shot round a corner happens when someone shot you while you were in view, but the message that they fired had to get from them to the server, then the server had to calculate if it hit, then send the message that you got hit to you. While all that was happening you moved around the corner.

    The alternative is Quake style - no "shot around a corner", but you have to aim ahead of where you see the enemy.

    Interpolation is a different thing to lag compensation - it is needed so other players appear to move smoothly on your screen - if you had 0ms interp then you'd just see the other players jumping around from spot to spot 20 times a second as you get your updates from the server, which is hard to aim at (and dodge). Instead you see a slightly delayed version of the world that is smoothly interpolated between the most recent update from the server and the previous one. The server takes the interpolation amount into account when lag-compensating your shots (that is, it knows you are seeing a slightly delayed version of the world, and when it "rewinds time" to see if your shot would have hit, it rewinds it to the point in time you were seeing when you pressed fire).


    EDIT: the issues with dodging and collision etc are probably just unavoidable side-effects of client-side prediction. Your position in the world is up to date, but where you see everyone else is slightly delayed. It is the other way around on their machine (they see themselves up to date and you slightly delayed). There is no way around it without a faster internet.. Lowering interp to 50ms might work on a rock-solid LAN, but you couldn't go lower than that unless the server started sending updates more frequently than one every 50ms. On the internet where packets get dropped and delayed, 100ms is probably as low as you could go for interp unless the server update rate was increased.
  • _Necro__Necro_ Join Date: 2011-02-15 Member: 81895Members, Reinforced - Shadow
    Nice explanation shader! Most people tend to forget that there are physical borders you simply can't break. There is the speed of light (300,000km per second). Although, the speed the electric signal moves through copper wire is 152,400 km per second. (In Fiberglas nearly the same.)

    In theory that would make a delay in a connection from Berlin to New York (=6,392 km) of 0.042 seconds = 42ms. (One way! Before you get an answer it takes twice as long!)
    BUT there isn't a straight cable. There is an amount of routers and switches the signal has to go through. In this devices the electrical signal gets processed (decoding and packeting) and that takes a while, slowing the connection further down to around 120ms. And don't forget that also the game-server needs do process the data and send it back to you.

    Sure, now you will say: You shouldn't play on a server so far away and you are right. But this was just an example. The delay gets smaller if you connect to a server in your country. But it will never be 0ms! So always keep in mind when playing a fast paced 1st person shooter. What you see isn't the reality. This just isn't physical possible. You always see things some time in the past. Only with some tricks like interpolation and lag compensation, you perceive the illusion of real time.
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    edited October 2012
    The higher the interp is though, the more likely getting shot around corners and bitten from 5 ft away will happen, since the player attacking you is seeing further back in time. If interp is 100ms, then the player shooting you is seeing where you were 100ms ago (e.g. still not around the corner), if it were lower then it wouldn't happen as much since the enemies view of your position would be closer to where you actually are on your client. Obviously there will always be some delay, but higher interp just exacerbates the problem.

    I think 50ms is as low as you can go with 20 updates a second. I imagine setting it to lower than that would just be like turning it off entirely, since there would never be 2 updates to interpolate between. I would be interested in experimenting with turning it off though to see how it effects the game.

    For me, ideally we would be getting 60 updates a second and then turning off interp or turning it down to 16.6ms would be possible with minimal disruption to gameplay. Of course, if you were playing against clients with 30fps then you would see them glitching since they wouldn't be sending enough updates, so perhaps it is better to wait until performance is higher for everyone...
  • VitdomVitdom Join Date: 2012-04-30 Member: 151345Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow, WC 2013 - Shadow
    edited October 2012
    +1 to shaders explanation, interpolation is different from lag compensation

    everyone should read shaders post. it is accurate

    Wilson you should also read shaders post. Interpolation does not decide if players can shoot other behind corners etc., that is lag compensation which does not have a variable "setting". Lag compensation is decided by each players latency to the game server.

    Simple explanation: C1 has 5 latency, C2 has 200 latency (sorry I am mixing up C1 & 2's latencies with ping but I hope you get the idea). C2 comes around a corner and immediately sees C1, however, C2's position is -200 ms back in his actual position in the game state, in C1's view. Which means that it takes 205 ms before C1 sees C2 coming around the corner. Lag compensation is decided by each clients latency and can not be changed (effect e.g. in Source is setting cl_cmdrate to min value decreases the clients "visible latency", due to the way it is calculated, but not it's actual ping).

    C1 can fire at C2 204 ms after C2 has fired at C1 in reality, and still C1 fires first in the server's lag compensated result.

    Interpolation on the other hand is when you have two <u>net game state frames</u>. The game states are then INTERPOLATED, to avoid choppy movement, or if you have with one or several more frames missing in between, it is interpolated to avoid the activation of the EXTRAPOLATION and PREDICTED STATE ERROR-ADJUST(very restricted and often abused by hackers) routines.

    There is far more to it than this but I hope I brought some additional explanation.
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    Yeah, but what I am saying is, interpolation adds an extra 100ms view delay to everyone, since you need that buffer in order to have 2 packets to interpolate between.

    So if you have two players facing each other and one starts strafing to the left, in his first person view he sees himself moving right away, but the player watching him won't see him move until: both clients latency + interp delay. (time it takes the packet to reach him, plus view delay from interpolation)

    So the higher that interp value, the more the moving player can move before the other sees it. I.E. the more likely he is to be shot around a corner from his perspective or bitten from 5ft away.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    As you said, you'd have to increase the amount of updates from the client, essentially doubling network traffic to get it to the point of quake 3 standards. (which has less traffic to send in comparison afaik)
  • shadershader Join Date: 2003-02-07 Member: 13247Members
    edited October 2012
    <!--quoteo(post=1990628:date=Oct 12 2012, 07:15 PM:name=Wilson)--><div class='quotetop'>QUOTE (Wilson @ Oct 12 2012, 07:15 PM) <a href="index.php?act=findpost&pid=1990628"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Yeah, but what I am saying is, interpolation adds an extra 100ms view delay to everyone, since you need that buffer in order to have 2 packets to interpolate between.

    So if you have two players facing each other and one starts strafing to the left, in his first person view he sees himself moving right away, but the player watching him won't see him move until: both clients latency + interp delay. (time it takes the packet to reach him, plus view delay from interpolation)

    So the higher that interp value, the more the moving player can move before the other sees it. I.E. the more likely he is to be shot around a corner from his perspective or bitten from 5ft away.<!--QuoteEnd--></div><!--QuoteEEnd-->


    Interpolation does exacerbate the "shot around a corner" effect, because while you were running around the corner, interp means that the player who shot you was seeing where you were 100ms + half their ping in the past. And lag compensation means that the server calculates their shot against what they were seeing at that point in time.

    But the main point is you can't do without interpolation. Smooth movement of your targets is essential for any action game. Any game that draws the world more frequently than it updates the game state needs interpolation. Even RTS games and single player games use interpolation - they might have the game logic running at 10fps, then the display runs as fast as your computer can go, interpolating between the last two game frames (that would be 100ms interp).

    Another cause of all this inconsistency between players views of the world is <b>client-side prediction</b>. This was introduced in QuakeWorld, an update to Quake (ie Quake 1). In networked Quake games, when you pressed a movement or attack key, the message went to the server, the server calculated the result, then sent a message back to you telling your client to update your position. That meant that if you had a 250ms ping, there was at least a 250ms + the interpolation amount delay between you pressing forward, and your character actually moving forward. This really kills the "feel" in an action game. (Quake wasn't meant to be played over the internet, but people did it anyway).

    QuakeWorld was designed for internet play. With client-side prediction, when you press a movement key, two things happen. 1) a movement message gets sent to the server 2) your local client just assumes the server will OK the move, and goes ahead and updates your players position. The client knows the level layout so it can tell if you are going to bump into level geometry, and it has a slightly delayed version of the other players locations so it can make a reasonable guess about wether you'll hit another player. If the server got a different result (eg because another player had moved into your path but your client didn't know that yet), then when it sends the result of the move back your position will be updated - this is why when the server is lagging, or you have high ping, you occasionally jump around and rubber band a bit - your client was predicting different results of your moves than the server calculated.

    Upside of prediction is more responsive player movement - you don't have to wait for the server to OK your move, you just move straight away, and most of the time the server got the same result, so it's all smooth.

    The downside is that now your local "predicted" position is ahead of where other players think you are. Similarly, other players see themselves ahead of where you think they are. Because NS2 is melee vs range, the inconsistencies in player position might be more apparent, as player-to-player collisions are more likely to get different results between the predicted version on the client and the actual one on the server.

    [deleted a bunch of calculations about prediction timing inconsistencies - anyone know if NS2 interpolates the local player position or not? It recalcs this every frame, so technically wouldn't need to]
  • VitdomVitdom Join Date: 2012-04-30 Member: 151345Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow, WC 2013 - Shadow
    edited October 2012
    I haven't measured how much data traffic NS2 uses but 100 ms of max interpolation duration is definitely a lot. The network messages need to be optimized to allow a higher rate of state updates from today's ~20 fps (does it show in net_stats?), lowering the interpolation. Then again there are struggles keeping games smooth above 25 players. Just getting the fps up to 30 will allow for the interpolation to be decreased to 67 ms, which is a big difference.

    I don't know about the reason why there is a performance limit of 25 players at this stage but the next priority should be increasing the update rate to 30 fps. It was raised from 17 to 20 in one of the latest patches? Which is a very good direction.

    Btw if you set the interpolation duration to 0 ms, interpolation will be disabled and all other player movement you see will be chunky and only update at 20 fps even though your rendering rate is 60 fps.
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    <!--quoteo(post=1990754:date=Oct 13 2012, 07:56 AM:name=shader)--><div class='quotetop'>QUOTE (shader @ Oct 13 2012, 07:56 AM) <a href="index.php?act=findpost&pid=1990754"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->But the main point is you can't do without interpolation.<!--QuoteEnd--></div><!--QuoteEEnd-->

    You can if you have 60 updates a second from the server instead of 20. I don't know if spark will ever have that though.
  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    <!--quoteo(post=1991179:date=Oct 14 2012, 07:52 AM:name=Wilson)--><div class='quotetop'>QUOTE (Wilson @ Oct 14 2012, 07:52 AM) <a href="index.php?act=findpost&pid=1991179"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->You can if you have 60 updates a second from the server instead of 20. I don't know if spark will ever have that though.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Packets are not guaranteed to arrive or guaranteed to arrive in the order they are sent.

    If you send packets like so: 1...2...3...4...5...6...7...8...9... what you actually end up getting can look like this: ...1...2.....4.3...5....6..7.......9....
  • _Necro__Necro_ Join Date: 2011-02-15 Member: 81895Members, Reinforced - Shadow
    <!--quoteo(post=1991179:date=Oct 14 2012, 02:52 PM:name=Wilson)--><div class='quotetop'>QUOTE (Wilson @ Oct 14 2012, 02:52 PM) <a href="index.php?act=findpost&pid=1991179"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->You can if you have 60 updates a second from the server instead of 20. I don't know if spark will ever have that though.<!--QuoteEnd--></div><!--QuoteEEnd-->
    What Soylent_green said. PLUS there is much more data to send in NS2 than in Quake.
    In Quake you only need to send player-positions, -directions and -state. What weapon the player holds and when a weapon is collected from the map. Maybe the state of some doors or elevators and thats it.

    In NS2 you need to send in addition to the above, the position, direction and state of every building and AI-Unit. (That includes cysts!) That gets you a lot more traffic. And therefor a lower possible update rate.
Sign In or Register to comment.