Spectator mode for turn-based game

no1no
no1no
I'm developing a PvP turn-based game using Photon and beside the two people battling each other I want to add spectators that can go in and out the match anytime they want. I'm not sure what is the best way to do this. Should I use buffered RPC so every time a spectator enter the match they received all the moves that happen until the time they join? Or should I store the moves information in the room property, how big is the data size of a room property? I intend to serialize the data to json and save it into the property.

Comments

  • You can use Custom Properties and Buffered Events (Instantiate is one, RPCs can be buffered) to keep a history of the state.
    I would not use json. We serialize common datatypes binary for you, so why should you do it again?

    PUN has no idea of spectators, so it will treat those users like anyone else. It's up to you to handle this correctly.
  • Thank you for your answer. I'm still not sure what's the best solution here but it seems there isn't any limit with custom property so I will try to use it since it looks like a simpler solution to me. And you're right about data type serialization. Thanks again.