Hello guys,
I am working on a Co-op RPG game, I have a question regarding Authoritative Server and AnimationEvents.
Note: I use an architecture where one of the clients also functions as the server and hosts the game.
How would you sync Skills and abilities between the Server and Client so that your GameState is synchronized between your players.
To demonstrate a possible flow between players:
Flow:
- Client1 inits the game and acts as the Server
- Client2 connections → Server
- Client2 casts “AoE” skill which lasts X Ticks - Triggered by the AnimationEvent(which according to prediction will hit and apply for Client1)
- Client3 connects and wants to also play the effect and have Client1 properly updated with the effect and its consequences
So far I’ve come up with the Server authorizing the CastRequest and acknowledging it with the ServerTick it had occurred on the server.
The clients receive the above CastOperation from the server and add to their state that client-X cast a skill.
And they call the effect which can be very dynamic and triggered by Events and not necessarily by time/tick
Thanks for any answers given