Authoritative Server and AnimationEvent(s)

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:

  1. Client1 inits the game and acts as the Server
  2. Client2 connections → Server
  3. Client2 casts “AoE” skill which lasts X Ticks - Triggered by the AnimationEvent(which according to prediction will hit and apply for Client1)
  4. 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

One solution that comes to my mind is using the Animations (as well as particles and other visual objects that are associated with said skill and should carry a data effect on applied characters) as a visual tool only, and have the actual data effect returned by the server in the appropriate tick.

Or another solution that the client will predict the effect and the data it causes but it won’t kill characters unless the server confirms so, and thus I won’t hurt UX when casting a skill

Bump