I am talking about a sword fighting game where timing and parrying play a big role.
Let’s assume that two clients are fighting and both have 100 ms latency. I’ll call the attacker A and the defender B.
If I play the animation on the client, when A hits, B will see the animation playing 0.2 seconds after A actually clicked. So assuming that B needs a reaction time of 0.3 seconds and the animation lasts 0.5 seconds, B will see that he parried when the animation was at 0.3 seconds, but from A’s perspective, the animation was already over 0.2 seconds ago when B parried (because the parry itself takes 0.2 seconds to get to A’s client). So depending on which client detects the attack and the parry, it will be fair for one and very unfair for the other.
However, if the animation doesn’t play on A’s client when he presses the button, but instead tells the server to play the animation for him, then A and B will see the animation at the same time. This would make the battle itself more fair but then A would have a worse gaming experience since his attack was only actually played 0.2 seconds after he clicked.
So, finally, my question is, should the animation play from the client which attacked (making it fair for one and unfair for the other), or should the client tell the server to play the animation (creating a bigger input lag for the given client)?
Thanks for any replies.