The HL netcode and hit registration

By Fana in General, on August 30th, 2009 at 21:17. 9 Comments.

I came across an interesting post on a forum I frequent, regarding the Half-Life netcode:


Hit registration in HL games is a myth, its your latency.


HL games ( except for TF flavors ) use whats called “server authenticated shot registration” and here is how it works:


Server sends you relative positions of everyone around you.

You put your sight on their head.

Pull trigger.

Your client registers the hit and gives you blood splatter.

Your client sends the shot to the server.

The server looks at when it got the shot, compares it to where the server says that player is now.

Your target is not where you shot, discards the shot(took too long for your shot packet to reach server).

Server sends you new relative locations for everyone around you.


That’s what’s commonly called “server side shooting” and what the vast majority of online FPSes use. It is highly dependant upon your latency. Latency, not ping. Ping is a derivitive of latency, but ping is not latency.


Reg is a myth, its just shitty latency on your part.


Team Fortress flavors use what’s called “client side shooting with server authentication” and here is how it works:


Server sends you relative position of people around you.

You put crosshair on your target and pull trigger.

Your client registers the shot, sends it to server.

Server compares timestamp of your shot and where that player was when you shot.

If the server verifies that when you shot, they were under your crosshair, it gives you credit for the shot, target dies.


The 2nd is called “client side shooting” and is much more forgiveable with those with higher pings/latency than “server side shooting” setups. That’s why most people consider TF flavors easier to play, but its because of how they handle their shot mechanics.


That’s why the perception is those with a lower ping do much better, but it’s not about their ping, it’s their lower latency in a server side shooting game.


Of course this is from some random person on a random Internet forum, so I can’t guarantee the veracity of his claims, but it seems reasonable. NS seems to use the second method, what he calls “client side shooting with server authentication”, which would explain the infamous “sparks bug”. It also explains how you can get hit long after passing a corner, how shots that seemingly hit fail to do any damage and why that fucking LERK JUST WON’T FUCKING DIE FUCK. If this is true, some of us (ahem) should be feeling pretty embarassed by now.


So, is that it then? Is hit registration a myth? Have we been needlessly bashing Spanish connections and German rates? Is the notion of a German panzer just a mirage?

9 comments Comments

  1. #1 by frG on August 31, 2009, at 03:38

    The last method is indeed being used in HLDS NS, hence making it possible to play against americans and koreans.

    Fucking corners.

    I believe german and spanish connection are mostly pretty shit and have a great deal of packet loss (not all german connections) making it harder for the server to know the exact position as packets are getting dropped.

  2. #2 by Bacillus on August 31, 2009, at 08:56

    I had much worse reg and much more tanking capability with my old cable connection even without any indication of actual packet loss. I think it might have something to do with low upload speed.

  3. #3 by Fana on August 31, 2009, at 15:00

    Yeah, there’s no doubt that your connection quality and rates can effect your hit registration, but judging by this, other players’ connections and rates shouldn’t make that much of a difference. I don’t know though, it does seem opposite to my own experience. High pingers, for instance, seem harder to hit than low pingers.

  4. #4 by frG on August 31, 2009, at 15:38

    Yeah indeed, i read an article once where they explained HLDS in the finest detail, can’t find it anymore though :(

  5. #5 by jiriki on September 10, 2009, at 00:41

    We should really inform Flayra about having the 2nd method in NS2 if possible.

  6. #6 by jiriki on September 10, 2009, at 00:49

    What is said about the HL engine is true afaik. Also whining about reg is nonsense. I can’t understand that server would have different hitbox registration for different players. What it could have though is that the hitboxes are not where the model is, that is lagging. So saying 50% of my shots regged means either the hitbox would be swapping out of and in place between the shots which is unlikely, or more likely you would only be shooting its corners while its lagging behind the real model. Technically the hitbox could be anywhere, since your client is just predicting (extrapolating). That’s why some frags look obvious hits on your computer but are missing in HLTV demos.

  7. #7 by Fana on September 11, 2009, at 13:15

    I wouldn’t call it nonsense, but I’ve certainly been guilty of overstating its effect on gameplay in the past.

    Alpha testing should give us an idea of how the NS2 netcode performs.

  8. #8 by frG on October 5, 2009, at 18:47

    Ofc there is a difference in the hitbox registration on servers, since that registration is ultimately decided by the speed the server processes “events”, this processing is dependant on the server fps (the higher it is, the less delay there is on processing), so if a server is running at 60 fps, your gameplay experience WILL differ from a server with 500 fps.

    That some people do not notice this is beyond me, but its definitely a fact.

  9. #9 by Fana on October 9, 2009, at 00:30

    The argument could be made, that those differences are imperceptible to humans. I think I notice a difference, but I can’t be sure.



Add comment


Only registered users can post comments.