Creating Room before Game starts.

Hello everybody,

I’m quite sure that the answer to my question is already somewhere on these forums, but I was unable to find it so I have to ask you.
I am using Playfab for User-Managment etc. and want now to use Photon to connect / load to a lobby scene showing all available games and a chat. I guess that is something that I will be able to find.
What I can not find is, how to make a room where 10 players join (you see their characters, room leader sets settings like map etc.), make all players load that scene and then wait for all players to be connected to start game logic (counter for race begin).

I am using the latest NGUI, playfab API and Photon Networking release.
I hope someone can help me. :slight_smile:

Greetz,
ITGeist.

@Neoshiftr : Are you still stuck?

To make everyone load the same scene in a room, you can use PUN’s scene synchronization. You have to turn it on (set PhotonNetwork.automaticallySyncScene = true, e.g. when you connect) and then use PhotonNetwork.LoadLevel(). This is limited to the Master Client (check PhotonNetwork.isMasterClient) but all others will automatically sync.

To start the game for all clients at the same time, you should set a start time as Room Custom Property. I recently wrote a small example script for that in Answers. You should be able to adapt that as needed. Currently it sets the timer when the first player enters the room but you can set it by a button click or whatever.

Hope that helps still.