Page 1 of 3

Client-Side Hit Detection?

Posted: 2007-07-19 08:25
by xseeyax
Right now BF2 (and consequently PR) uses server-side hit detection, which is the reason why when you shoot someone they don't always die when they should (if anyone wants me to really explain it then PM me, or my xfire is xseeyax). This is especially problematic in overseas servers. Have the developers thought of rewriting the network code to include client-side hit detection instead?

Posted: 2007-07-19 08:48
by Figisaacnewton
think about it dude.

Client side hit detection.

Thats impossible.

It could only possibly be client side if you some how shot your self.

To make the whole process clientside, you'd have to have have all the other players... playing... on your computer. Which they arn't.

Posted: 2007-07-19 08:57
by xseeyax
Figisaacnewton wrote:think about it dude.

Client side hit detection.

Thats impossible.

It could only possibly be client side if you some how shot your self.

To make the whole process clientside, you'd have to have have all the other players... playing... on your computer. Which they arn't.
It is possible can a dev please respond or someone who knows what they are talking about?

Posted: 2007-07-19 09:44
by Harrelson
it is possible, games like call of duty use client side hit detection

maybe we could have client side hit detection and leave the servers to handle everything else. rally points, spawns etc and make it a bit less laggy

Posted: 2007-07-19 10:06
by Hardtman
With client-side hit-detection we would have the problem of lag.

Imagine this:You see somebody aiming at you.He has a ping of 300,you of 60. You run behind cover before he can shoot,so far so good.

But from his point of view you are not behind cover,so he shoots, his client registers a hit and you are dead although should have survived.

The server-side detection is not great,but with the reduction of the running speed,this problem was minimalized, and maybe even some more improvements might come.

Posted: 2007-07-19 11:28
by xseeyax
Hardtman wrote:With client-side hit-detection we would have the problem of lag.

Imagine this:You see somebody aiming at you.He has a ping of 300,you of 60. You run behind cover before he can shoot,so far so good.

But from his point of view you are not behind cover,so he shoots, his client registers a hit and you are dead although should have survived.

The server-side detection is not great,but with the reduction of the running speed,this problem was minimalized, and maybe even some more improvements might come.
True but picture this I shoot a guy twice in the head and there is blood and everything but he just shakes it off, turns around and shoots me. If I shoot a guy in the head he should die.

It does that because if you have lag then you actually see the guy in a spot that he is not in like if he is running the host can actually see the true location of the guy because it takes no time at all to transfer that information to the server client since he is the host, but if you aren't the host then you will actually see the "lagged" version of the guy and he will be further back on your screen than he actually is.

That is why you have to lead your shots even more. Same thing if the person is idle, so its actually better to shoot a little bit right or left of him if he doesn't die when you have the sight right on him because the actual spot could be a little to the right or left. That does not happen with client-side hit detection. Plus who plays with 300 ping.

Posted: 2007-07-19 11:38
by Outlawz7
In older games, they had big hit boxes around the player, so you just had to shoot near his head to kill him :?

And the famous bullet-to-the-foot-and-insta-kill :roll:

How about having both server and client side hit detection combined?

Posted: 2007-07-19 11:50
by xseeyax
I don't that would be possible

Posted: 2007-07-19 11:52
by Wolfe
xseeyax wrote:It is possible can a dev please respond or someone who knows what they are talking about?
2 reasons why client-side is bad. Sounds nice, but it would double your ping and promote hacking. Here's why:

First, server side hit detection requires a signal from your computer to the server to determine of you hit your target. Client side requires a signal from your computer, to the server, then on to the computer of the person whom you are shooting.

Second, you think cheating is bad now? Imagine client-side hit detection where hackers could edit local files to remove their own hit detection making them virtually impossible to kill.

Until a quantum modem is invented, we'll just have to deal with pings.

Posted: 2007-07-19 12:02
by xseeyax
Wolfe wrote:2 reasons why client-side is bad. Sounds nice, but it would double your ping and promote hacking. Here's why:

First, server side hit detection requires a signal from your computer to the server to determine of you hit your target. Client side requires a signal from your computer, to the server, then on to the computer of the person whom you are shooting.

Second, you think cheating is bad now? Imagine client-side hit detection where hackers could edit local files to remove their own hit detection making them virtually impossible to kill.

Until a quantum modem is invented, we'll just have to deal with pings.
Yeah that's my one worry is that people will start hacking, but I did read up on server side hit prediction. It works pretty much the same way as server side hit detection but say you shoot someone in the head then the server will then go back in time to see if like a mili second later you were there and actually took the shot instead of going well he did get shot but he moved therefore he didn't get killed.

This one actually goes back and checks if he actually did get shot at that time. And will give you the kill. Now I think we SHOULD have this one because you wont have ping problems, won't have hackers and WILL give us our kills when we shoot someone. So devs, is there anyway you could make a patch just for pr with server side hit prediction?

Posted: 2007-07-19 13:02
by geogob
Both client-side and server-side detection sounds a bit like the quake3 way of doing things. Not sure if it would work well with PR in a context were every single bullet counts.

Posted: 2007-07-19 14:14
by Zodiaccup
I guess it's hardcoded.

And I don't like the idea. I prefer it when the hit registration is controlled by the server.

Posted: 2007-07-19 14:57
by EyesOnly
Heaven for cheat coders? ;)

Posted: 2007-07-19 15:58
by VipersGhost
I played with a ping of about 60-80...hit detection is great for me. I played a server last night with a ping of 16...I didn't even notice the difference. I pop guys on the run at 300+ m all the time....I've headshooted the drivers out of insurgent trucks. A lot of guys are just plain bad shots tbh. If a guy is sitting there and you shoot his head....he will die no matter what your connection is if he doesn't move. In those situations the hit detection is flippin perfect *stationary target*. Only on the move would lag come into play.

Posted: 2007-07-19 20:41
by xseeyax
Wolfe wrote:2 reasons why client-side is bad. Sounds nice, but it would double your ping and promote hacking. Here's why:

First, server side hit detection requires a signal from your computer to the server to determine of you hit your target. Client side requires a signal from your computer, to the server, then on to the computer of the person whom you are shooting.

Second, you think cheating is bad now? Imagine client-side hit detection where hackers could edit local files to remove their own hit detection making them virtually impossible to kill.

Until a quantum modem is invented, we'll just have to deal with pings.
It wouldn't double your ping, first of all. Your ping is your ping. No matter the hit detection used, your ping is never "doubled." In fact, the effects of ping will be almost non-existent with client-side hit detection.

Your example of "a signal from your computer, to the server, then on to the computer of the person whom you are shooting" is the same for all types of hit detection. Image

As far as cheating goes, there's a possibility it could come into play. However, the PR community is all about playing realistically and cheating is not very rampant at all. I don't think it's much to be worried about to be honest. If anything, server-side hit prediction would eliminate that issue. Counter Strike: Source uses server-side hit prediction and works very well. I wouldn't expect the devs to try to implement that, as client-side would be much easier to put in.

There was a project that was done awhile back for Unreal Tournament to get around the server-side hit detection, which is an obvious problem for shooters. It was called Zeroping (link here). Hopefully someone here is savvy enough to put something similar together for Battlefield 2.

Here's also a link for some of you to read up on to gain a little more knowledge on the subject:

Lag Compensation

I'd love for a developer to share some insight on this subject.

Posted: 2007-07-19 21:05
by SiN|ScarFace
Sounds like this would fall into the category all wishful things go into, HARDCODED.

It's not even that bad, esp for a game that can handle 64 players with minimal lag. Lead moving targets.

Posted: 2007-07-19 21:58
by xseeyax
SiN|ScarFace wrote:Sounds like this would fall into the category all wishful things go into, HARDCODED.

It's not even that bad, esp for a game that can handle 64 players with minimal lag. Lead moving targets.
I don't think it'd be hardcoded, but I won't speculate until a dev confirms one way or the other.

Posted: 2007-07-19 22:29
by Leo
For some reason, .609 is horrible for me, they can be standing completely still, 10 meters from me, I shoot them in the head, I see blood, but nothing happens.

It takes 3 bursts to take someone down. It was much better in .607, I don't know, maybe it was just that one server or something is wrong on my side.

Posted: 2007-07-19 23:16
by xseeyax
Leo wrote:For some reason, .609 is horrible for me, they can be standing completely still, 10 meters from me, I shoot them in the head, I see blood, but nothing happens.

It takes 3 bursts to take someone down. It was much better in .607, I don't know, maybe it was just that one server or something is wrong on my side.
Yeah I hear you. That's a common problem with all server-side hit detection games though. It mostly depends on the server you're playing on; obviously the lower the ping the better. But in these types of games it's imperative.

Posted: 2007-07-19 23:59
by Outlawz7
have to go with Leo - I was in a T90, shot 10 rounds into the US sniper, guy stays down, jumps up and runs away. WTF?
Think, he got shot by someone else or bleeded out, when I found his body behind the ridge, but still...