Best way to implement network auto combat game

Options
Hi all,

I am working on a multiplayer game (using PUN) with the following game loop:
- Start in each preparation phase, each player gets to upgrade his characters and makes some decision.
- After that, the battle starts as auto combat based on players' decisions.

Questions:
1) I am using the master client to take charge of the auto combat. Only sync transform, health, and stats data...etc. to the clients. I am also using RPC calls for events like play attack animation. Is this the right way to implement this kind of games?

2) If I am doing right in (1), the lag problem is making clients seeing delay output even the result works fine.
For instance, a character attacks really fast and already killed the target (looks fine on master since it controls all the logic). But the client sides has delay to receive attack RPC while the health already synced with master. Hence, client sides see target die while the attack animation doesn't even start or not done yet. The game still works but visually looks weird. How do I fix this?

3) I want to implement a skill system which each skill is a prefab and character (has photonview) has skill slots I can drop skill into in editor. Then, in runtime, character will instantiate his skills as object and attach to himself. In this way, should I make every skill prefab with photonview and use PhotonNetwork.Instantiate? Or using RPC to tell each player to do this? Or adding skill as component to character without instantiate them?

Sorry for my poor English and weird questions. I love PUN <3 Thank you!!

Comments