Hi everyone,
I'm working on a game where players fight as wizards. The issue I'm facing is detecting hits on entities from spells.
There are two scenarios I've been thinking of:
Scenario 1 (client detects hits): Player 1 has 10 second latency, he hits an entity on his screen, the hit is sent to the host and the hit packet is sent to all other clients. These clients render the hit on the entity.
The issue with this scenario is that if the entity moves on the host while the hit is being sent from player 1's machine, the spell with go past the entity on the other clients screens, but the hit will still register. This would look weird. Think of a bullet going past a guy but the guy still takes damage.
Scenario 2 (host checks client hit): Player 1 has 10 second latency, the player hits an entity and sends the hit to the host to confirm it. If the projectile hits the entity on the host, a packet is sent to all players and confirmation is sent back to player 1.
The issue with this is that players with high latency will not be able to hit entities, but it solves the previous issue of spells flying past entities and still effecting them.
So it's either improve combat for all users but have users be unimmersed by "ghost" hits, or have harder combat but hits actually collide on screen.
I was wondering if there is a work around for these issues or if I just have to take one as a trade off?