Online Fighting Game Architecture


I am creating a simple stickman fighting game for practice

Now, I am not sure about the smartest way to set this up
If I try to make the server be incharge if everything, It may cause movement delay and by that will make it impossible to do combos

If I give the client to be incharge of the movemant, then that my cause Inaccurate sync, which isnt that big deal, but then - where do I check fir hit direction?
Server or client? And if client, which one? Attacker or defender? Since I want the player to be able to block

I know its probebly can be a “perfect solution” but what do you think will be best for this type of game?
Maybe you have better idea I havnt thoght of…

Thanks for taking the time to help!

You have to actually make the game and test it on two computers on the same local network side by side. That’s really the only way you will figure out how to work it. Trial and error.

I am in that stage of a 2 player game at the moment. It is a long stage…

If this game is a 2-player only game, I don’t think you must have an authoritative server; there is nothing wrong with making client and server identical peers and using RPCs exclusively (with RPCMode.Others to send to the other player.) Doing it like that is going to be your fastest option. And it is surprisingly fast, like a tenth of a second. And then you can do client-side prediction, and make it seem even faster than it really is.

If I were you I would make blocking local, and make combos attacks possible based on the last echoed position of the remote player. That is, if you see them in position for a Raging Demon or whatever, you start doing it, but if they were blocking, they will cancel your attack in (2/Network.sendRate) seconds and you’ll see the first two frames but that’s it.