I want to implement room system like it is in among us.
- Player should be able to create room.
- Players should be able to see public rooms.
- Players can join in public rooms.
- Host (player who created room) can click start button and game will start.
Here is my thoughts
- When player clicks create room I should call RequestMultiplayerServer api to allocate server and store returned result (ip, port) into external storage. I also need to store game state (waiting) in external storage as well.
- I need to get all public rooms from external storage because there is no way to do it only playfab services yes? so I need to implement it on my own.
- When we are in room and whenever player clicks start button I just need to update game state from waiting to playing in external storage to hide this room from public ones.
Is this the correct approach? or I am doing it wrong and there is a better way to implement room system like this?