I am making an asymmetrical horror game similar to games like Forsaken and Die of Death. Currently I have a simple system where the server decides whether the attack lands. However, due to latency, the hitboxes end up spawning inside of/behind the player on their screen, sometimes even requiring them to run ahead of the target player to hit them.
I’m trying to think of what a better way to handle hitboxes would be, but multiplayer games are generally not my greatest strength, and I don’t know how to make it fair for both the sender and the receiver.
I’ve tried sending the hitboxes early based on latency, but that tightens the reaction time for others. Any ideas? It would be a huge help, thanks!
I myself don’t respect developers that set hitboxes completely on server for games as a main priority since i rarely get lower than 100 ping and it gets annoying especially with melee when you always have to be closer to someone and predict their moves, so i’d really prefer having a range limit for server (so ppl dont abuse high ping advantages and hitbox increasers) and respect the client more just like combat warriors does
i think you could also bring ping checks with that and etc to be more precise
It depends on that you really want. I always say security over anything then i end up arguing with random ppl, but client convenience can be important sometimes. If you want it to be client controlled but fair for everyone, take arsenal’s approach and let the client tell the server who was caught in the hitbox, then do some kind of distance or raycast check on the server to verify that the person could actually get hit, and maybe a direction check to make sure the person wasn’t behind the player unless you want exploiters to be able to make kill aura scripts. Or if you don’t feel like doing that, you can keep the hitboxes server controlled and just make them larger to compensate for latency
Detect on client and verify on server. So say you are making a gun system, create bullet on client and if it detects hit on the client it will tell the server. Server will judge whether the bullet was close enough to the character to detect the hit like within 3 studs and if it is then take damage.