Best Method for Multiplayer Bullet Hit Detection

Niodyan
Fri, 04 Jun 2021 09:05:36 +0000
Architectural and Design Visualization

Hello there.
I’ve been searching the internet and have struggled to find good data that answers my questions.

On the topic of multiplayer hit detection with bullets, is it best for the client to send an RPC to the server and for the server create it’s version of the projectile immedietly and continue like normal? Let me explain why I think this is awful:

I have programmed hit detection logic in C++ (no engine, just DirectX11) utilising Valve’s method, detailed in their renowned post here. This method purposfully renders other clients (relative to a local client) back in time resulting in no prediction, only interpolation, in the absence of packet loss. Due to this, in CSGO for example, when a player shoots, the time they shot is recorded (UE4 does seem to record timestamps of inputs I believe) and the server “rewinds” time to check if their version of the client hit anything when they shot at that given time. This is what gives CSGO some of the best hit detection of any game, there is no need to lead your

I am struggling to find any form of equivelent in UE4. It seems to be standard to just send an RPC to the server to create the projectile and continue as normal, none of this fancy rewinding stuff.

Question 1: But with that said, is there any way to replicate Valve’s method easily with the UE4 multiplayer system? Specifically, I’m asking if it is easy to check hit detection back in time. Does UE4 have any form of this in their own hit detection?

Question 2: I’ve had an epiphany whilst writting this out; the good old rubber duck method. Anyway, anyone who’s played games that use entirely projectile based bullets would probably agree that there seems to be a greater delay in hit detection than compared to"hitscan" and also you seem to need to lead your shots close up more than you might think. Is this because these games are actually just sending an RPC to the server to fire a projectile once the message arrives? This time delay would be hidden by the time it takes for bullets to travel. Has this become the industry standard for projectile based bullets in video games?

Thanks for reading guys, I appreciate your time greatly.

3 posts - 1 participant