Hit Detection

MrTeatime

Newbie
Joined
Jul 31, 2003
Messages
92
Reaction score
0
Has anyone heard anything about whether HL2 multiplayer will use client-side hit detection or server-side? HL1 and its mods use client-side, which gives player with good pings an advantage. Battlefield 1942 for instance uses server-side, which means you have to lead for lag, but its harder to cheat. Which do you think they will use? Which do you want them to use? I have a good connection, so I would like client-side. In BF 1942, you have to lead extra if the other person has a high ping. :/
 
Client Side all the way!!

Ive only got 56K and i HATE server side, it is the single most stupid thing in exsistance!!

I want to be able to shoot at my target and hit the prat!! not lead it for about 5 miles because of trigger lag and such like. Raven-Shield and BF1942 and the worst games in the world for online play I hate them for haveing server side.

All HL mods are amazing for having client side, it works sooo well, why change a good thing?

BTW, i do realise that over long distances that i would have to lead a target but that is something that should be programmed into the game engine not just because they cant get a decent net code.
 
well, serverside leads to things like shooting your whole magazine at a guy at point blanc range, and still don't hit him. Client side is, when you hit somebody, he is hit. however, as you said, its easier to tell the server "I hit him, I hit him", without actually doing so.
 
Hmm, I thought that HL still had server-side hit detection, but it compensates for lag, as well as having client-side prediction of the hit-detection to produce effects such as blood sprays etc.
 
well if a guy lags and well you "hit him" and tell the server yay i hit him.... the server will get confused since well if the person lagged, yo actually might not have hit him at all, but it looked like it due to you lag... i think anyway... but it is fully up to the server admin, what whould be server side and what should be client side, as far as i know ;)
 
HL uses server side and client side hit detection i believe, i hope HL2 does the same
 
HL uses server side hit detection. However it uses lag correction to compensate that's why you may think it's client side. But it's not. Client side hit detection would be silly.

Hacks wouldn't need aimbots if you could just tell the server "I hit the enemy".. lol :p
 
Originally posted by |CC|Hudson
HL uses server side and client side hit detection i believe, i hope HL2 does the same

exactly. who said you can't use both?
 
Hm, that's interesting. I was pretty sure HL used client side, but I certainly wouldn't rule out a combination of both.
 
HL is 0% client-side hit detection.

The effects you see instantly after you shoot are guesses done by your computer. In some cases you will see a miss but the server counts a hit or vice versa.

The information about when you shot, your lag, and the enemy's lag are taken into consideration by the server to see if the enemy was in your line of fire at the time of the shot.

To show that this is true you can turn off all the guess work done by your computer using a few variables... the server will still compensate for the lag (you don't have to lead) but your shots will seem delayed and your computer will wait for confirmation of what happened before it shows anything.

These are some variables that were introduced when the new netcode was added:
- sv_unlag (enable lag compensation)
- sv_unlagsamples (number of client ping samples to average together to determine the ping the server will try to compensate for)
- cl_lb (prediction of blood splats)
- cl_lc (lag compensation if sv_unlag is 1)
- cl_lw (weapon animations and sounds don't wait for confirmation)
- cl_nopred (disable client-side prediction)
 
There is no client side hit detection as said above. Allowing the clients decide when they hit the enemy is the stupidest god damn thing I've ever heard. HL1 has lots of little features that CybrMan said to make it "feel" like you were playing on a LAN but its all prediction and lag correction.
 
Just like playing cowboys and indians...
"I shot him he's dead!!"
"nu-uh! you didn't hit me i killed you!"
*fists fly*
 
That's very interesting. If you fire at enemy in HL and it looks like you hit him to you, will the server use the enemy's position according to the enemy, or according to what you see? It seems in BF that it's according to where the enemy says he is. So if an enemy with a high ping is running, he's farther ahead than it looks to youl. You have to lead extra in order to compensate. Does HL function the same way? I was under the impression that it worked differently, so that your computer's estimation of the enemy's position was used to determine whether you hit him or not. Or am I wrong altogether?
 
It's where the server thinks the players are that matters... not what either player's computer says.

The server keeps track of players' recent movements.

The amount of movement that is stored depends on a variable called sv_maxunlag (which sets how far back, in seconds, the server's records go).

When you fire it sends the position, angle, and the average of a certain number of recent pings (determined by sv_unlagsamples).
The server takes this data and compares it to the record of players' recent movements.
For example, if you shot through a door and had a ping of 200 it would check to see if there was anyone on the other side of the door .2 seconds ago.
If there was someone there it would register as a hit.
 
Oh, I see now. If implementing features like these so drastically improves the netcode, why don't all mutliplayer games implement them? It seems as though it would go a long way towards improving BF 1942 and others.
 
Ok, so i was wrong, HL doesnt use client side :)

HOWEVER, whatever the hell it does use i hope they use it for HL2.

I think that we are all agreed that HL has the best FPS netcode out there whatever it is.
 
Ok it's a bit long, quite old, aimed at cs and doesn't account for all the new variables etc but it's still the best guide on the entire internet about how the HL engine in particular and client-server relations in general works in fps's and also the hl1 engine so give it a read.

http://www.summerblue.net/games/cs_report

Compulsory reading for ALL mojo clan members ;-)
 
Thank you very much! I was looking for something like that! This looks like a very thorough description, while the font is a little hard to read. I will save the file, change the font, and read it all! :cheese:
 
there were some pretty big changes in HL netcode (with the 1.1 patch) also. i remember that the sniper in TFC was completely different. some pppl said it ruined TFC csuse sniping took no skill. well, i duuno, becuse it just meant that you shot AT the enemy instead of wherever they'd be in a 1/4 of a second or whatever. back then the average ping was in the 200's though (and not for a 32 player server or anyhting). Well, i like hitting what i'm actually pointing at, so it's better now...

As for that guide: it's great. I ran into it about a year ago, really helped my understanding of what was going on, under the surface.

-Phision
 
Back
Top