How to start synchro game?

Options
Jofator
edited May 2013 in Photon Server
What I mean is MMO game where 2 teams fight against each other in one room:
1. Wait until room is full (lets say 2 teams 10x10 players)
2. As soon As room is full begin game as "synchro start" - I mean wait few seconds and then start game for all players in the same time.

What is the best way to implement that using PUN?


>>> Tobias answer:

Hey,

You get callbacks when anyone joins, so you know when to check the player list.
One player or all can decide to start the game. PUN provides a sycned network time. It's not 100% accurate but we try our best. So you can send an RPC to start the game at a fixed point in the near future, like: PhotonNetwork.time + 3000 + 2x ping.

This should be fine.

If you're working on a 20 player game, you should definitely "stress" test the maximum amount of action your game can have in a room, to make sure all relevant platforms cope with the amount of updates you send.

Hope this helps,
Tobias