Page 1 of 1
Hit Detection Delay - Explanation (geek question)
Posted: 2010-08-22 13:45
by Skull
hi,
mostly that thread is directed to the devs, beside anyone who might know.
ive been always wondering why it takes bf2 like .5-1 second to recognize hits. everybody knows that, everybody has seen an enemy taking fire, firing back, the he dies. thats why you could see the lovely "you have killed""you have been killed" message in vanilla bf2. im just curious about what takes so long. assuming you have a low ping the data should be on the server in less than 100ms, then the server just has to do things like set hitpoints, death animation and so on. im porgramming stuff quite a lot, also in my job, but never had anything to do with the bf2 engine in special.
regards, skull
Re: Hit Detection Delay - Explanation (geek question)
Posted: 2010-08-22 17:52
by Infantry4Ever
I would think it would be a conflict between two pings maybe.
Re: Hit Detection Delay - Explanation (geek question)
Posted: 2010-08-22 18:48
by goguapsy
Yep it's ping. You can see the difference in a server 300ping and 50ping. It IS a huge difference. Even to join and create squads it takes longer.
Re: Hit Detection Delay - Explanation (geek question)
Posted: 2010-08-22 22:41
by bad_nade
On situations where both players see each other longer than fraction of a second, ping doesn't matter. Server compensates ping and registers hit on the point where low ping player was at the time high ping player fired at him. That's why you can be killed behind cornes when you are running into safe. It's server killing player retrospectively due to ping differences.
Low ping players have upper hand only on situations where enemy pops up suddenly behind an obstacle. There player with very low ping have couple of hundreds of milliseconds more time to react than player with relatively high ping. But even there server and game client makes its best to level up the odds by extrapolating other characters movements based on their last know movement vectors.
Timing differences are problems that cannot be solved without short distance time traveling, but still BF2 is actually quite a sophisticated piece of netcode and it works remarkably well in very heterogeneous network environments.
Re: Hit Detection Delay - Explanation (geek question)
Posted: 2010-08-22 23:20
by goguapsy
Well, you can really see the difference in games like COD4 or CODWAW, which you fire first but the game doesn't register.
In BF2 the CQB situation doesn't happen that often to be noticed, but it happens.
Re: Hit Detection Delay - Explanation (geek question)
Posted: 2010-08-22 23:42
by BrownBadger
clueless_noob wrote:On situations where both players see each other longer than fraction of a second, ping doesn't matter. Server compensates ping and registers hit on the point where low ping player was at the time high ping player fired at him. That's why you can be killed behind cornes when you are running into safe. It's server killing player retrospectively due to ping differences.
Low ping players have upper hand only on situations where enemy pops up suddenly behind an obstacle. There player with very low ping have couple of hundreds of milliseconds more time to react than player with relatively high ping. But even there server and game client makes its best to level up the odds by extrapolating other characters movements based on their last know movement vectors.
Timing differences are problems that cannot be solved without short distance time traveling, but still BF2 is actually quite a sophisticated piece of netcode and it works remarkably well in very heterogeneous network environments.
Sounds about right. The corner thing happens quite a lot, but it's as fair as can be. That's something I've noticed in ArmA2 a difference where a running player skips to certain places even though you've fired at his last known location, nothing happens, and you're dead.