Rapid fire hit registration

SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Posts: 656Members, NS2 Playtester, Reinforced - Shadow
edited February 2012 in NS2 General Discussion
I feel like it's not working right
The topic title says most of everything.

I feel like that some rifle shots just disappear into a network void because I can't ever, ever remember killing a skulk with under 20 rounds from the rifle, even if the damned thing is running straight at me. Even with weapons 0 it should only take 10 bullets to kill a skulk. That means you should be able to kill 5 skulks with one clip. Impossible. Same thing with fades and gorges, can you ever remember killing either with just 30 rifle rounds? That's how many it takes with a level 0 rifle.

Also since the pistol's faster firing more has unlimited firing speed while you're jumping (possibly a bug, reported already in case it is), you can fire even faster than with the rifle with a script or if you bind firing to mousewheel (which is doable if you have any recent mouse with binding software). So I did that and tried to kill things with it. Skulks die 'sometimes' when I pump them with 10 pistol shots' worth lead, but not always. So this makes me extra suspicious.

I tried to modify the GUICrosshair.lua to give me a running count of how many bullets I've hit with the rifle to an enemy target, but the way deltaTimes, server lag and the function calls work, it's a very poor base for an exact system that reports one hit per one shot. I got it working 'somewhat', so that for every 50 rounds fired, on a relatively non-laggy server it reports about 40 hits. But that's still way kinda bad. Maybe the devs should do some testing of this kind?

The most annoying thing is that if you run a server on your own, you can see all the rifle shots register neatly against buildings and aliens that have been spawned with the "give <alien>" cheat. But maybe this is the reason that such a thing has gone unnoticed. If you spawn a heap of bots, the server starts getting choppy, but still everything registers nicely.

So there's some arguments already there against my claim, but also some for it. I feel like with 15 years of FPS experience I should be able to hit a skulk with 10 rifle rounds even occassionally, when it's running in a straight line, or towards me.

Thoughts?
Post edited by Unknown User on
«134

Comments

  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Posts: 1,754Members, NS2 Playtester, Squad Five Blue
    edited February 2012
    QUOTE (Skie @ Feb 9 2012, 10:32 PM) »
    I tried to modify the GUICrosshair.lua to give me a running count of how many bullets I've hit with the rifle to an enemy target, but the way deltaTimes, server lag and the function calls work, it's a very poor base for an exact system that reports one hit per one shot. I got it working 'somewhat', so that for every 50 rounds fired, on a relatively non-laggy server it reports about 40 hits. But that's still way kinda bad. Maybe the devs should do some testing of this kind?

    Are you sure GUICrosshair is the right place to set up a counter? If I'm not mistaken, it only checks once per client tick (frame) whether the damage indicator should be displayed. It does not, however, count the number of hits that occur in each frame.

    Could you show your modified code?
    Post edited by Unknown User on
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Posts: 1,397Members
    Yeah, this is really annoying. It makes it feel like the rifle is seriously underpowered as it takes half a clip to kill 1 skulk. Might be something to do with the net settings. Even at 30 tickrate the skulks move pretty quickly, which could effect the reg. I know that Max said in earlier builds he had the interpolation set at like 150ms which is very high. 66ms or even 33ms would be preferred.
    In-game name: Wilson

    My Crosshair Pack: LINK
  • mushookeesmushookees Join Date: 2008-03-26 Member: 63967Posts: 278Members
    edited February 2012
    its very inconsistent, sometimes i unload a half a clip into a skulk and he doesn't die :( its like often only 30-50% of my shots are being detected as hits, the rest arent, yet i see green blood spewing everywhere
    Post edited by Unknown User on
  • PlasmaPlasma Join Date: 2003-04-26 Member: 15855Posts: 605Members, Constellation, Squad Five Blue
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Posts: 656Members, NS2 Playtester, Reinforced - Shadow
    QUOTE (twiliteblue @ Feb 10 2012, 07:48 AM) »
    Are you sure GUICrosshair is the right place to set up a counter? If I'm not mistaken, it only checks once per client tick (frame) whether the damage indicator should be displayed. It does not, however, count the number of hits that occur in each frame.

    Could you show your modified code?

    I already did away with the code. I tried several different implementations and none of them worked well enough. It WAS a bad place for the code though, since indeed it was quite very random when it would give the 'true' when hitting a target. And it would trigger true several times per shot and you had to filter out only one 'hit' from all those deltaTime ticks. It was difficult because the second hit from the next rifle shot came very quickly as well.
    I've never written a single line of lua before yesterday so I'm sure it was bad in all kinds of ways, but I didn't know any other way to get the information about hitting a target from the client-side files. Just a quick dirty hack attempt.
  • TremanNTremanN Join Date: 2002-11-13 Member: 8471Posts: 96Members
    There's definitely something wrong with the hit registration. I don't know what it is but there's definitely a problem. Up close, I kill aliens with a shotgun that are not even on my screen sometimes. With my rifle, the aliens bleed but take way too many bullets to kill. Definitely feels like the bullets are getting 'lost.'
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Posts: 2,310Members, NS2 Playtester, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Community Dev Team
    Since this is a beta test, every possible help to track this problem down (if indeed it is one) would be great.

    By that i mean, get 2 people then try shooting a non moving skulk, then a moving one etc.
    Ollj: "ns_napo, the first good custom map ever" ns_napo
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Posts: 656Members, NS2 Playtester, Reinforced - Shadow
    QUOTE (Asraniel @ Feb 10 2012, 10:59 AM) »
    Since this is a beta test, every possible help to track this problem down (if indeed it is one) would be great.

    By that i mean, get 2 people then try shooting a non moving skulk, then a moving one etc.

    It might be just an interpolation issue. Too much of interpolation is bad if the ping is low. On higher ping servers it should be increased. That's what I learned from Source engine anyways.

    If someone would make a lua snippet that counts hits on enemies, that would help a lot I think. I tried but I'm not good at languages I've never written, and the NS2 codebase is a bit overwhelming.

    I've had problems with the shotgun as well, sometimes the pellets landing to an invisible body where the skulk was some time ago and killing him. And shooting a fade close-up is a constant nuisance, when all the pellets DEFINITELY should hit, only one or two hits. Crosshair exactly on the fade quite close up, four shots and it doesn't down him.
  • flyjumflyjum Join Date: 2012-01-07 Member: 139849Posts: 111Members
    QUOTE (Skie @ Feb 10 2012, 02:22 AM) »
    It might be just an interpolation issue. Too much of interpolation is bad if the ping is low. On higher ping servers it should be increased. That's what I learned from Source engine anyways.

    If someone would make a lua snippet that counts hits on enemies, that would help a lot I think. I tried but I'm not good at languages I've never written, and the NS2 codebase is a bit overwhelming.

    I've had problems with the shotgun as well, sometimes the pellets landing to an invisible body where the skulk was some time ago and killing him. And shooting a fade close-up is a constant nuisance, when all the pellets DEFINITELY should hit, only one or two hits. Crosshair exactly on the fade quite close up, four shots and it doesn't down him.


    I have had it a few times where I would be completely around a corner and half way down the hall and somehow the last bullet would kill me like 1.5 secs after it should have

    seems weird sometimes
  • BalderonBalderon Join Date: 2010-11-23 Member: 75215Posts: 15Members, Reinforced - Shadow
    I'm not 100% sure but I guess they're using a network system similiar to the one that the Source Engine has.

    If that is the case I also guess that the problem lies in the "lag compensation" and not the interpolation. Check it out here https://developer.valvesoftware.com/wiki/So...ag_compensation
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Posts: 1,397Members
    edited February 2012
    QUOTE (Skie @ Feb 10 2012, 09:22 AM) »
    It might be just an interpolation issue. Too much of interpolation is bad if the ping is low. On higher ping servers it should be increased. That's what I learned from Source engine anyways.


    I don't think that's correct. I see a lot of people spreading false information about interp and different source net settings.

    AFAIK, the interp smooths out the time between each packet. If you had 0 interp then it could sometimes appear as if the other players were jerking/skipping as it would only be updating 30 times a second. Interp basically delays what you see on screen by a set amount of time but then smooths out the changes between each packet. The problem is that then you aren't seeing exactly what the state of the server is, you are seeing back in time effectively. To compensate for this the game has lag compensation which is supposed to take your interp time and then rewind the server to check if you hit a target or not. The problem is that lag compensation isn't 100% accurate, so the higher the interp the more chance of errors and poor registration.

    The default setting for interp in source games is: 1000/tickrate x 2. As there is 1000 milliseconds in a second, it's the time that it takes between updates x 2. They times it by 2 to make sure if one packet is dropped the client still has an available packet to use to smooth between. That would mean that for 30 tickrate the interp would be 66.6ms

    My experience with it is actually the less interp the better hitreg. Even if you sometimes see other players warping, it's better to have that and be able to hit them than to have what appears to be nice smooth movement but shots not registering. For me 33.3ms or 0ms would be preferred but I'd really need to play with them to see. Hopefully they will allow users to change this setting manually once 1.0 is released.


    It doesn't matter if your ping is 10 or 150. You are still getting 30 packets a second, so your interpolation should be the same.


    Also, unless they have changed it since, the current setting in NS2 is 150ms. I think they increased it so much because the server performance was poor and constantly dropping to 20 and lower tickrates.
    Post edited by Unknown User on
    In-game name: Wilson

    My Crosshair Pack: LINK
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Posts: 1,731Members
    edited February 2012
    The bullets are fired in ClipWeapon.lua I think :

    I added a simple counter after self:ApplyBulletGameplayEffects(player, trace.entity, trace.endPoint, direction)

    CODE
                        numberOfHit = numberOfHit + 1
                        Print(ToString(numberOfHit))


    NumberOfHit was declared at the beginning of the file: local numberOfHit = 0

    Firing a single bullet at a powernode :

    image

    The server count the hit correctly but for some reason the client execute the code many times, anybody knows why ?

    Locally it seems to work fine, If I empty my rifle the server counter goes up by 50. Should be tested online, but I have to work also :(
    Post edited by Unknown User on
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Posts: 656Members, NS2 Playtester, Reinforced - Shadow
    Yuuki: That's the exact same problem I ran into when trying to do it in GUICrosshair.lua. Then I tried to filter the 'extra hits' per shot but that was too unreliable because of varying server tickrate. I don't know what exactly causes it in your case though.
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Posts: 1,650Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer admin
    t
    QUOTE (Wilson @ Feb 10 2012, 02:55 AM) »
    The problem is that then you aren't seeing exactly what the state of the server is, you are seeing back in time effectively. To compensate for this the game has lag compensation which is supposed to take your interp time and then rewind the server to check if you hit a target or not. The problem is that lag compensation isn't 100% accurate, so the higher the interp the more chance of errors and poor registration.

    I can't speak for the Source engine, but this is not true for Spark. The exact same interpolation that occurs on your client will happen on the server during lag compensation (based on exactly the same data that was sent to the client). It's always possible there are bugs, but there's nothing in design of the network system that should allow for hit registration errors.

    I don't understand why Source works this way, but the situation depicted in this image shouldn't happen in Spark.

    image
    Max McGuire
    Technical Director, Unknown Worlds Entertainment
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Posts: 1,650Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer admin
    QUOTE (Yuuki @ Feb 10 2012, 03:23 AM) »
    The server count the hit correctly but for some reason the client execute the code many times, anybody knows why ?

    Those lines that say Client* happened during client side prediction. You don't want to count those. Do something like this:

    CODE
    if not Shared.GetIsRunningPrediction()
      count= count + 1
    end

    Max McGuire
    Technical Director, Unknown Worlds Entertainment
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Posts: 1,397Members
    QUOTE (Max @ Feb 10 2012, 04:26 PM) »
    I can't speak for the Source engine, but this is not true for Spark. The exact same interpolation that occurs on your client will happen on the server during lag compensation (based on exactly the same data that was sent to the client). It's always possible there are bugs, but there's nothing in design of the network system that should allow for hit registration errors.

    I don't understand why Source works this way, but the situation depicted in this image shouldn't happen in Spark.

    I'm just speaking from experience of playing source games. I know that when you have high interpolation values then there is a tendency for hits not to register. I assume that's because lag compensation isn't 100% perfect, but it could be for some other reason.

    Perhaps the rifle needs a little more spread to make it more effective at killing skulks. It should be pretty easy to kill 3 skulks with 1 clip and yet it's a very rare occurrence at the moment.
    In-game name: Wilson

    My Crosshair Pack: LINK
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Posts: 656Members, NS2 Playtester, Reinforced - Shadow
    QUOTE (Wilson @ Feb 10 2012, 06:33 PM) »
    Perhaps the rifle needs a little more spread to make it more effective at killing skulks. It should be pretty easy to kill 3 skulks with 1 clip and yet it's a very rare occurrence at the moment.

    Nah, that would make it awful against things that lurk in the clorfs.
  • Mkk_BitestuffMkk_Bitestuff Join Date: 2003-01-17 Member: 12407Posts: 210Members
    I believe that happens in source is because of the way it calculates the time difference between when the shot was fired client side, and the current server time when received. It moves everything backwards based on that time differential, but I think that timing is a problem since hit box information is only calculated per server tick, and if your shot occurred between ticks there can be a slight difference in the hit box position. Generally Source helps get around that by increasing the tick rates to 66 or 100 and decreasing interpolation.

    On another note I notice a lot of choke in NS2 when a lot is going on, not sure if that may also be causing issues.
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Posts: 1,397Members
    QUOTE (Max @ Feb 10 2012, 04:26 PM) »
    The exact same interpolation that occurs on your client will happen on the server during lag compensation (based on exactly the same data that was sent to the client).


    What about loss and choke? If packets were lost while being sent to the client then would the lag compensation come "out of sync" with the server, causing hits not to register?
    In-game name: Wilson

    My Crosshair Pack: LINK
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Posts: 1,731Members
    QUOTE (Max @ Feb 10 2012, 05:27 PM) »
    Those lines that say Client* happened during client side prediction. You don't want to count those. Do something like this:

    CODE
    if not Shared.GetIsRunningPrediction()
      count= count + 1
    end


    Thanks for the answer. Probably I'm not understanding prediction but why would you predict that I shoot 8 times when I shoot only once, I mean the client knows I released the mouse button, and should stop to do all theses collision traces, no ?

    For the lag compensation, can someone give me a clear answer, where do I need to shoot in order to hit ? In front, exactly on the target, or behind, above ? I'm confused.
  • Mkk_BitestuffMkk_Bitestuff Join Date: 2003-01-17 Member: 12407Posts: 210Members
    In a lag compensated engine you would aim directly at your target if using a hit scan weapon. Projectile weapons which can get complicated because those are not always lag compensated (TF2 Soldier).
  • elodeaelodea Editlodea Join Date: 2009-06-20 Member: 67877Posts: 1,766Members, Reinforced - Shadow
    edited February 2012
    I saw a guy lag 'hacking' the other day although i can't say for sure if it was intentional..
    His ping was constantly 999 and his hits would occur such that if you rounded a corner, saw him, and instantly ran back around the corner, a few seconds later you would receive a stream of hits over a prolonged period as if you had just stood there for 2-3 seconds instead of running away.

    I understand that the interpolation is the same on the client but doesnt this mean the laggier you are, the less your targets are able to react to your 'moves'? Or have i confused something..
    Post edited by Unknown User on
    Gorge bilebomb forever.
  • BalmarkBalmark Join Date: 2002-11-01 Member: 3476Posts: 313Members, Constellation, Reinforced - Silver, Reinforced - Shadow, WC 2013 - Shadow
    Aye I suffer from this.. but it's crazy, in the same game, I would see 1 marine taking out 2 skulks while I'd be getting a 0-10 kill-death :/

    I'm generally not 'that' bad.. I do suffer from a lack of skill .. but down a long corridor.. I'd love to think I could hit something running straight at me :/

    (miss a previous-weapon key too :P but that's for another thread :P )


  • KrizzenKrizzen Join Date: 2011-12-16 Member: 138181Posts: 100Members
    QUOTE (Wilson @ Feb 10 2012, 11:33 AM) »
    It should be pretty easy to kill 3 skulks with 1 clip and yet it's a very rare occurrence at the moment.


    Really? So it should be easy for all marines to go 3:1 with a single magazine and the aliens actually have a fighting chance? That sir is farfetched.

    Back on topic:
    In 195, skulk bites don't seem to be registering like they were in 194. Maybe it's just me or maybe I'm attacking some really slippery marines.
  • Mkk_BitestuffMkk_Bitestuff Join Date: 2003-01-17 Member: 12407Posts: 210Members
    edited February 2012
    I believe it is 9 bullets to kill a skulk not on infestation in NS2. In NS1 it was 10 i believe, and I could kill 3 skulks with one lmg clip. Obviously further ranges will increase the amount of missed shots even with good accuracy so it was decently challenging to do. In NS2 it should be easier with the larger skulk, however i find i cannot kill one skulk with an entire clip at times... when other times they die in the old NS1 standard of 15 bullets.
    Post edited by Unknown User on
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Posts: 1,731Members
    QUOTE (Yuuki @ Feb 10 2012, 06:07 PM) »
    Thanks for the answer. Probably I'm not understanding prediction but why would you predict that I shoot 8 times when I shoot only once, I mean the client knows I released the mouse button, and should stop to do all theses collision traces, no ?


    I disabled the all function during prediction and played a game, it seems to work fine and it's like ten times less code to run. Maybe there is some problem when ping get's high, I don't know.
  • matsomatso Master of Patches Join Date: 2002-11-05 Member: 7000Posts: 1,460Members, NS2 Developer, Constellation, NS2 Playtester, Squad Five Silver, Reinforced - Shadow, Community Dev Team
    edited February 2012
    If you want to check the prediction code, you can always turn on bullet tracings. It sucks bandwidth, but for small games it should work fine.

    On a local server, open the console, type
    cheats 1
    trace b
    Close console

    Fire.

    Invite a friend for target practice. Green lines miss, red lines hit.

    Have fun.

    Oh, and trace m turns on melee tracing.
    Post edited by Unknown User on
    Did performance optimizations for UWE summer/autumn 2012. Not currently employed by UWE.
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Posts: 1,397Members
    QUOTE (matso @ Feb 11 2012, 11:47 AM) »
    If you want to check the prediction code, you can always turn on bullet tracings. It sucks bandwidth, but for small games it should work fine.

    On a local server, open the console, type
    cheats 1
    trace b
    Close console



    Seems weird that the bullets origin is directly inside the marines head. Shouldn't it be a bit lower, like at shoulder level in line with the weapon?
    In-game name: Wilson

    My Crosshair Pack: LINK
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Posts: 656Members, NS2 Playtester, Reinforced - Shadow
    QUOTE (Max @ Feb 10 2012, 06:26 PM) »
    It's always possible there are bugs, but there's nothing in design of the network system that should allow for hit registration errors.


    Except there is in a way. If you shoot a fade that blinks away right after your hit, you see the splash of green blood (client side I'm presuming), but the hit doesn't register because he blinks immediately after (happens before server-side). Same thing when you shoot at something right before you die. You see blood, but nothing happens damage-wise.

    I also find that seeing creatures move so much behind on the server is really annoying. Like if you are a skulk and biting down an extractor, it's pretty much impossible to run around the extractor and avoid hits from the marine's gun because on the marine's screen, he's already around the building and shooting at you when you still see him exactly on the other side. This definitely needs improvement.
  • derWalterderWalter Join Date: 2008-10-29 Member: 65323Posts: 634Members
    QUOTE (Skie @ Feb 11 2012, 03:59 PM) »
    Except there is in a way. If you shoot a fade that blinks away right after your hit, you see the splash of green blood (client side I'm presuming), but the hit doesn't register because he blinks immediately after (happens before server-side). Same thing when you shoot at something right before you die. You see blood, but nothing happens damage-wise.

    I also find that seeing creatures move so much behind on the server is really annoying. Like if you are a skulk and biting down an extractor, it's pretty much impossible to run around the extractor and avoid hits from the marine's gun because on the marine's screen, he's already around the building and shooting at you when you still see him exactly on the other side. This definitely needs improvement.

    +1
«134
Sign In or Register to comment.