Does NS2 have unlagged hit detection?

zeepzeep Join Date: 2002-11-01 Member: 3367Members
edited August 2013 in NS2 General Discussion
What often happens to me playing as Skulk is that i.e. I'm taking fire from a Marine, run around a corner / hide behind a wall for cover. Then, when i'm behind the corner / wall, so out of his line of fire, i suddenly die anyway.

First i thought i wasn't quick enough, but this happens a lot now that i'm noticing it.

I live in the Netherlands and play on low ping UK/Ger/NL servers. My ping is never above 60 so i figure it's not me lagging out..

What causes this behavior? Does NS2 have unlagged hit detection? I'm also fairly sure the server is not running some weird mod.

Not whining though. NS2 rocks. Cheers!

Comments

  • ResRes Join Date: 2003-08-27 Member: 20245Members
    edited August 2013
    There's a couple of things you need to know.

    Just because on your screen your view is behind a wall, doesn't necessarily mean your model is all the way behind the wall, this is because of the length of the Alien models and where the 'camera' is positioned, which I believe they said is in the middle of the model.

    Also, NS2 uses lag compensation similar to that of the Source engine as they have already stated.

    Also, the faster the models move the more the netcode makes it *appear* like there is higher lag compensation, but that is not actually the case and you can move fairly fast in NS2.
  • zeepzeep Join Date: 2002-11-01 Member: 3367Members
    edited August 2013
    Res wrote: »
    There's a couple of things you need to know.

    Just because on your screen your view is behind a wall, doesn't necessarily mean your model is all the way behind the wall, this is because of the length of the Alien models and where the 'camera' is positioned, which I believe they said is in the middle of the model.
    I see. Now that i think about it, the other day i was facing another Skulk and noticed his eyes were also higher that my viewpoint. Hopefully UW will fix that at some point... :(

    Here you see my viewpoint is lower than where the actual Skulk head is. (The picture doesn't show it really good though.)
    http://steamcommunity.com/sharedfiles/filedetails/?id=171884095

    Res wrote: »
    Also, NS2 uses lag compensation similar to that of the Source engine as they have already stated.

    Also, the faster the models move the more the netcode makes it *appear* like there is higher lag compensation, but that is not actually the case and you can move fairly fast in NS2.
    I didn't know that. I will read up on netcode for NS2. Maybe there are some client variables i can tweak to make my connection more "equal" to in-game movement.
  • elodeaelodea Editlodea Join Date: 2009-06-20 Member: 67877Members, Reinforced - Shadow
    zeep wrote: »
    Res wrote: »
    There's a couple of things you need to know.

    Just because on your screen your view is behind a wall, doesn't necessarily mean your model is all the way behind the wall, this is because of the length of the Alien models and where the 'camera' is positioned, which I believe they said is in the middle of the model.
    I see. Now that i think about it, the other day i was facing another Skulk and noticed his eyes were also higher that my viewpoint. Hopefully UW will fix that at some point... :(

    Here you see my viewpoint is lower than where the actual Skulk head is. (The picture doesn't show it really good though.)
    http://steamcommunity.com/sharedfiles/filedetails/?id=171884095

    Res wrote: »
    Also, NS2 uses lag compensation similar to that of the Source engine as they have already stated.

    Also, the faster the models move the more the netcode makes it *appear* like there is higher lag compensation, but that is not actually the case and you can move fairly fast in NS2.
    I didn't know that. I will read up on netcode for NS2. Maybe there are some client variables i can tweak to make my connection more "equal" to in-game movement.
    That's probably because the view camera is from the skulk mouth, not the eyes. As for the camera being in the middle of the model, I think that is the best solution they can do due to turning animations and stuff?

    Afaik, there are no client variables that you can tweak. It's all server side - the move rate and interp that is.
  • NeokenNeoken Bruges, Belgium Join Date: 2004-03-20 Member: 27447Members, NS2 Playtester, Reinforced - Shadow, WC 2013 - Silver, Subnautica Playtester
    edited August 2013
    Yeah, the camera originates from the center of the model. I think it's because a camera originating from the eyes/mouth of the model would feel unnatural for us humans when turning around. So you just have to take into account, when you move back behind a wall just slightly, your chin might still be showing. :)
  • _Necro__Necro_ Join Date: 2011-02-15 Member: 81895Members, Reinforced - Shadow
    edited August 2013
    Also remember, that there is no real-time possible over the internet. There is always a delay, because of physics.
    NS2 netcode is "what you aim at is what you hit". But when we play together, my reality is different from yours. My Ping + your Ping (and the interp on top).

    Anyway. It's the fairest method possible. If I shoot you and can hit you, I will hit you. If you bite me and can do that, it will count too. The alternative would be to get misses when your target is about to turn around the corner. But because the misses would be calculated by the server, you would see hits at first but after a few milliseconds you would get the signal that you have misted. This would be even more frustrating.

    In fact every game has this problem of "shot around the corner" but because NS2 is very fast and the skulk model is longish you feel it more.

    The only thing you can do, is to remember yourself, that your reality can't be the same the other players see. (read: speed of light) So if you got shot around the corner, it wasn't the fault of some net code. It was you, that didn't retreat in time because you missed to account the different timings of players. Always think 150ms in the future. It's the same when strafe jumping to evade an incoming skulk. Remember, that his view will be 150ms in the future. He reaches you 150ms before you see him in bite range. So you need to evade sooner. Another example: You are engaging as skulk or lerk to an marine. You walljump / fly in a straight line at him, because he isn't shooting and you want to get as fast as possible in range. But in fact he has started to shoot at you 150ms ago. You just don't see it yet in your reality. So all you have is to do is: Evade before you see him shooting. You see a marine? Start evading! Don't wait until he shoots you.

    That's also why you die so incredibly fast when camping. The marine needs 9 - 10 bullets to kill you. With the fast firing speed of the LMG those 10 bullets are fired before you even see him start firing.
  • bERt0rbERt0r Join Date: 2005-03-23 Member: 46181Members
    edited August 2013
    The thing is, other shooters have such crappy movement exactly because of this mechanic. The have slow movement mechanics so the effects the OP lists do not affect the game as much. Melee vs Ranged combat beeing non-existent in most is also a factor.

    I disagree with your alternative. The alternative would be the client calculating the enemy positions ahead of what data it currently gets, so when you shoot what you see and the target did not change directions meanwhile, you still hit it. What system is fairer is up to you to decide but I think that this think 150ms ahead thing is very harsh on new players who will think something is off when they see the effects.
  • cooliticcoolitic Right behind you Join Date: 2013-04-02 Member: 184609Members
    This is not something that you "fix". It's a matter of implementing the camera, and this implementation is better than others you can think of.
  • bizbiz Join Date: 2012-11-05 Member: 167386Members
    it's not the camera

    it's the engine treating people with 300 ping as first class players

    not going to waste time arguing whether that's good or bad or fair or unfair, but there are other ways of doing things

    eg. lag compensation up to 100 ms, but you have to lead your shots beyond that
    eg. giving high-ping players an option to render a predicted model to assist in leading shots



    and the 'damage all at once' is probably a separate bug entirely
  • KamamuraKamamura Join Date: 2013-03-06 Member: 183736Members, Reinforced - Gold
    Just look at the night sky, you may see stars that ceased to exist thousands of years ago, but since the information only travels at the speed of light, you still see them being okay and shining happily.

    The universe sucks, it's full of lag.

    But seriously, as a game creator, you have to compromise, because the server and each client runs his own version of "reality". The faster the game is, the faster the models move, the more they are hit by the lag.

    Would you rather see your shots go through the enemy model, or would you rather receive hits from someone around the corner? The creators (wisely) chose the latter.

  • bERt0rbERt0r Join Date: 2005-03-23 Member: 46181Members
    I have bad news for you: Light travels faster than bullets.
  • StrikerX3StrikerX3 Join Date: 2012-11-08 Member: 168423Members, Reinforced - Shadow
    I'd like to see someone play this game as aliens without lag compensation and about 150ms of ping. Go ahead, try to lead your target with a melee attack and still keep track of where it is. Tons of fun when your target also knows how to dodge.

    Even if it's incredibly annoying to get killed halfway through a vent/behind walls, I'd take this over no compensation anytime. Even if I had 50 ms or less ping.

    Also, hitreg is fine. NS2 actually has one of the best hitregs I've ever seen, with false positives/negatives being very rare.

    We've had this discussion before, and this is not the kind of thing we want.
  • JektJekt Join Date: 2012-02-05 Member: 143714Members, Squad Five Blue, Reinforced - Shadow
    edited August 2013
    I've found its usually bullets going through the skulks legs. It's the most frustrating on the lerk at range, the spread at long distance + moving wing hitboxes can induce some rage.

    Not necessarily hitreg problems, or problems at all.
  • ResRes Join Date: 2003-08-27 Member: 20245Members
    yep, anyone who complains about hit registry needs to actually take a slow motion video because you'll see that it is the bullets going inbetween skulks legs or just barely missing.

    Unlike a lot of FPS games, the hit "boxes" are very closely bound to the skulk, in fact the hit box may as well be the skulk model because it is that close. While most FPS games stitch together boxes or spheres to approximate the model, which doesn't leave room for bullets to miss inbetween legs.
  • xBlueXFoxxxBlueXFoxx Join Date: 2013-06-07 Member: 185497Members, Reinforced - Supporter
    I will take client side hit registration over poorly synchronized server checked hit coordination any day. If players have a high ping they basically do not see you evade shots until X ms later, causing you to die around corners or when you're hit box is out of their line of sight on your client. The only real resolution for this is LAN play or kick high ping 150ms+ users.

    Poor upload rate/quality can also be a key factor in this too, as your movement also has a delay when sent to the server then to the client, in NS2 where it only takes a fraction of a second of spraying to kill a skulk, this is a very big factor.
  • StrikerX3StrikerX3 Join Date: 2012-11-08 Member: 168423Members, Reinforced - Shadow
    edited August 2013
    xBlueXFoxx wrote: »
    I will take client side hit registration over poorly synchronized server checked hit coordination any day.
    You just created a major security breach. Hackers can now headshot anything anywhere because clients now have to trust each other, even if other clients are lying, because the server won't be able to judge whether a shot is a hit or miss (since that task is now delegated to the clients). Or, if you want to make clients judge each other, you could have a hacker reject any and all hits on him. You could make everyone check everyone, but that's an incredibly costly solution. Not only that would increase network and processing requirements to O(n^2) (in English: the costs increase by the square of the number of players), it would also make game data synchronization a nightmare and everyone would be as laggy as the player with the highest ping. That works fine for RTS games, but not for FPS.

    The clients have to depend on the server because 1) it's cheaper and easier and 2) to prevent those very straightforward methods of cheating.

    Also, NS2's hitreg is not poorly synchronized at all, I'm pretty sure of that. Unless you're calling "getting killed behind a wall" poor synchronization. That's just a consequence of ping compensation, deal with it. Keep in mind laggy players have to deal with it too.
    xBlueXFoxx wrote: »
    LAN play
    Ok, not a bad idea... if you can gather 16-24 people together all the time.
    xBlueXFoxx wrote: »
    kick high ping 150ms+ users.
    Thank you, I can no longer play NS2 because there are only 5 servers in the whole world which would not kick me, and none of these are populated anymore.
  • NarfwakNarfwak Join Date: 2002-11-02 Member: 5258Members, Super Administrators, Forum Admins, NS1 Playtester, Playtest Lead, Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow, Subnautica PT Lead, NS2 Community Developer
    edited August 2013
    What's often frustrating for many players is that getting shot while stationary on a skulk or lerk with the rifle does so much damage by the time that they receive the damage feedback they're dead or almost dead. Moral of the story - don't sit still if you can help it.

    If you really think having high ping gives you an advantage then you're being silly. It's far more common for a high ping player to be reacting to a situation that no longer is - like shooting a skulk running at them that's really already next to them and killing them - than for a high ping player to happen to kill someone around a corner because of prediction.
  • bizbiz Join Date: 2012-11-05 Member: 167386Members
    if you play against high-ping marines, you are basically dead if you don't move around a lot, even if you react to enemies approaching within half a second
    if you play against low-ping marines, you are easily discovered if you move around a lot

    players aren't going to adjust their style based on the pings of the enemy because each opponent will have different ping

    that's an awful way to play the game

    yeah it's sad that people don't live near active servers, but it's even sadder that these guys don't have the courtesy to play alien
  • ezekelezekel Join Date: 2012-11-29 Member: 173589Members, NS2 Map Tester
    edited August 2013
    I understand what you're all saying to an extent

    But here's what I don't get

    In warsow you move faster than you ever can in ns2 but so long as your ping is below 60~ you'll never encounter a 'behind wall' or 'that hit but didn't register'

    Is it because that game is updating that much faster? Or is it because the lag comp whatever is not existent or much lower (because once you start pinging above 80 it becomes a different game, ex: if you want to hit someone you need to now aim where they are going to be, not where they are (this only occurs when your ping begins to be 70+)

    And in all honesty, I prefer that much more; ever since games started adapting whatever this is; I've had nothing but complaints about how online is playing

    Meanwhile I can jump on serious sam the second encounter original, go online, and feel no problems what so ever as long as I've entered a server which I ping nicely too

    Heck it even happened on consoles, compare halo 2 to halo 3, halo 2 always and I mean always felt like you were scoring hits (if you've played it)

    But that game is much slower, anyway I don't know the science but I feel we've went backwards in video games with this netcode mechanic, feel free to disagree all you want but that's my opinion on it
  • BensonBenson Join Date: 2012-03-07 Member: 148303Members, Reinforced - Shadow, WC 2013 - Shadow
    Res wrote: »
    yep, anyone who complains about hit registry needs to actually take a slow motion video because you'll see that it is the bullets going inbetween skulks legs or just barely missing.

    Unlike a lot of FPS games, the hit "boxes" are very closely bound to the skulk, in fact the hit box may as well be the skulk model because it is that close. While most FPS games stitch together boxes or spheres to approximate the model, which doesn't leave room for bullets to miss inbetween legs.

    I've always found that the "hitbox" is the model in NS2.

    Perhaps, due to the speed and strange shapes of the alien lifeforms, the approximated boxes might be a good thing, at least as far as the near misses are concerned (i.e. slightly larger boxes around the leg joints

    It would be much easier to understand for new players, and be enough of a "nerf" to aliens to possibly assist with balance (more bullets hit on average = more engagements won for marines)

    Just a thought.
  • zeepzeep Join Date: 2002-11-01 Member: 3367Members
    A lot of different opinions, i guess there's no one good solution.
    What i do feel is that it sucks getting killed in a spot where i no longer am. It's like i'm compensating for that other guy with a high ping.
    I'll try a US server today, see if it holds up.
  • StrikerX3StrikerX3 Join Date: 2012-11-08 Member: 168423Members, Reinforced - Shadow
    edited August 2013
    The only actually good solution is to find a way to reduce our pings as close to zero as possible, but that involves building a LAN (very impractical) or breaking the known laws of physics (even more impractical). Quantum entanglement looks promising, but we still don't know how to transfer information with it. So, for now, we absolutely need some form of lag compensation, or certain games will become very hard to play.

    Also, you might get killed behind walls by the high ping player, but that's it. On the other hand, that player feels like he's getting killed behind walls by anyone on the server, which is far more annoying than just one player being able to do it to you.
  • zeepzeep Join Date: 2002-11-01 Member: 3367Members
    edited August 2013
    Yeah, i won't be losing any sleep over it. I'm grateful that i can play this game at all.

    *edit not anymore since 252 omg*
  • bERt0rbERt0r Join Date: 2005-03-23 Member: 46181Members
    edited August 2013
    There has always been lagcompensation in gaming it was just the method that was changed. The old lagcompensation involved the clients predicting where the the target will be by the time your fire signal reaches the server. The less ping, the more accurate that prediction was.

    Now the server has to remember positions of each player for a couple of seconds. If Client A fires on Client B, the server gets this signal after Client A's ping time X. Then he has to go back these X milliseconds and determine whether Client B was where Client A fired at that time.

    The problem: Lets say Client A's ping is high, say 500 and Client B's ping is low, say 50. If Client A gets a shot on Client B, Client B will realize that only after 500 + 50 = 550 milliseconds. If both players had hitscan weapons like in other shooters, this would be no problem, whoever aims better wins. In NS2 however this is not the case. A big part of melee-ranged skill comes from reacting to your enemy's movements, ambushing, flanking, attacking from behind.

    If Player A's skulk with his 500 ping ambushes Player B's marine from behind (or cloaked as in previous versions) the marine will notice he is getting chewed on 500 ms after Player A started attacking. After 500 ms, the skulk will have gotting in another 2 bites and the marine will be dead without knowing what happend.

    Same scenario with skulks sitting in corners and getting instagibbed by a marine who spots them. Or getting killed even though a marine is facing another direction. Intelligent dodging is not possible with this mechanic, if you want to evade bullets you just have to move as chaotic as possible regardless of where you see the marine's are aiming at, because most likely they are not.
  • SammeySammey Join Date: 2012-06-14 Member: 153266Members, Reinforced - Shadow
    I understand why this happens, but it is the #1 reason for my nerdrage in NS2. Specially as a lerk! Ahh those moments where you start breathing again because you think you got away clean out of a fight, and then suddenly die, because some laggy player emptied his handgun a few seconds back :P
  • StrikerX3StrikerX3 Join Date: 2012-11-08 Member: 168423Members, Reinforced - Shadow
    edited August 2013
    bERt0r wrote: »
    If Player A's skulk with his 500 ping ambushes Player B's marine from behind (or cloaked as in previous versions) the marine will notice he is getting chewed on 500 ms after Player A started attacking. After 500 ms, the skulk will have gotting in another 2 bites and the marine will be dead without knowing what happend.

    Nope, that's inverted. The skulk is the low ping player there, whereas the marine is the high ping. It's hard to explain that using text only and I don't have the time to draw stuff here, but what you said is accurate if you switch the pings.

    Here's what would happen in your scenario (assuming the marine is standing still and the skulk gets a surprise attack, but loses; also assuming armor 3 and no medpacks):
    - Skulk POV: he gets into the room, sees the marine, proceeds to attack him. The marine will stand still for at least 550 ms + whatever reaction time it takes for the marine to move. The client might register two bites before the marine starts dodging and shooting him, but the damage takes a little longer to register. Eventually the skulk dies, after landing a couple more bites (which would be enough to kill the marine for sure), but the last bite doesn't register the damage because of lag.
    - Marine POV: marine is standing on the room, when suddenly a skulk attacks him. He starts dodging and shooting, but the skulk keeps biting the air where the marine was 550 ms before and lands two bites on him. His shots hit the skulk, his damage registers almost immediately. Eventually the skulk dies, but not before the marine takes one more bite.

    The skulk will call BS because he thought he landed 4 or 5 bites. The marine will tell him he only took 3 bites.
  • bERt0rbERt0r Join Date: 2005-03-23 Member: 46181Members
    edited August 2013
    Uhhh, you said exactly the same thing, you just gave the marine armor 3. I was specifically adressing the issue of cloaking being so OP in pubs a few builds ago.
Sign In or Register to comment.