1
\$\begingroup\$

Hybrid hit detection here refers to a architecture where client sends a hit claim to server and server verifies it with a tolerable error limit to confirm the hit or deny it.

This technique may work well with hit scan or instant hit weapons because you only have to check it for one frame/tick. But in case its a physics projectile I.e where an actual projectile flies to the target like a real bullet, the hit is the result of flight over more than one frames and varying physics state. As such verifying the hit could be very cumbersome and resource intensive.

So how would one go for server client hybrid approach in this scenario?

\$\endgroup\$
1
\$\begingroup\$

I solved a similar problem in a multiplayer spaceship game by using a different distance checker on the client and the server. Basically the client used a smaller collision radius, and the server used a larger collision radius.

The end result is that the client sometimes sees false negatives. At first he may think that he missed, but within a few hundred milliseconds he learns that the target was hit.

This turns out to work really well, because seeing your missile hit visually always turns into a hit, but not the other way around.

The example is on the incheon NPM package, click the demo link to see the game experience

\$\endgroup\$
  • \$\begingroup\$ So you mean server allowed for some margin of error for the client even if client missed on his local version? \$\endgroup\$ – Allahjane Jan 21 '17 at 3:28
  • \$\begingroup\$ Yes. In my case the client does not send a "hit claim" to the server. Rather the client reaches its own conclusion, but has to be able to deal with the server's final decision. \$\endgroup\$ – Gary Weiss Jan 22 '17 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.