- Home /
Synchronize damage dealing and block in melee combat multiplayer game
Hello,
Are there any good patterns for client-server architecture that allow for easy synchronizing of melee attacks and blocks between clients?
I'm using Photon Bolt, but I need general guidance rather than particular implementation.
Answer by SalwaRaion · Jun 01, 2021 at 02:17 PM
Ok so answer to this is to use PhotonBolt Commands and simulate all the important game results on servers side. Or 'client side prediction with server authority' to say it universally :)
Answer by Ytsorf · May 13, 2021 at 03:36 PM
Hi there, I'm not sure how Photon Bolt works but in Mirror Multiplayer you need to use [SyncVar] to synchronize the Var's(int long etc) so the clients and server/host know the value, also you need a void ClientDoStuff and make the call inside of a void ToClientsDoStuff so everyone is on the same page, if you do a Method inside of a client and the method has no way out of that client, the host/server and other client can't know what its happening inside of the client Game, hope it help Good luck <3
Yeah, but should client that performs melee attack with sword wait until server sends response if it was successful or blocked by shield of other client?