Player Turn Management Using Master CLient

Options
Hi! I'm working on a game where each player is given 90 seconds to present something through their video. After that timer expires, I have to randomly assign turn to a random player and tell all players about that. Currently I'm doing this through master client that only master client can randomly get a player from the PhotonNetwork.Playerslist and tell all others that it is this player's turn. I have a guess that it might not work if master client disconnects exactly at the time of randomly getting a player so what would happen then? Any possible solution you guys have in mind? Is there another way of handling turns? Really need help regrading this issue.

Comments

  • olipool
    Options
    I am very new to Photon but can't every player whose turn it is handle that? So if it is player2's turn and the 90 seconds are up you can call something like:
    playerNumber=Random(...)
    player.GetPhotonView.RPC("HandturnToPlayer",All, playerNumber)

    And in that function:
    if (playerNumber==myNumber) canPlay=true
    ...
  • salmanjaved
    Options
    I'm doing it through raised events. It's a simple 2D game so no use of photonview is required I guess. Also we need sort of authority since we do have to manage that which player has had its turn and which players have yet to take turn and we need to have this info shared with all players in case master client leaves.