Consultation on game architecture using photon realtime

Job ID: 31918322

Budget: $30 – $250 USD

<Overall>
We are looking for someone who can help us design the system architecture of a multiplayer unity game using photon engine for match making.

<About the game>
The game is a multiplayer action game where users need to redeem their point balance on our web service in order to play in a room. So each time a user tries to create or join a game room, the user's account balance is validated by our web service through an API. If the user is eligible to create or join a room, then they are added to the room.
Then when the game is finished, the results are sent to our web service to display the results on our web UI.

<Issues we are facing>
Currently, we got the game to work but we cannot figure out how to handle the following situations.
1. How can we validate the user's eligibility on our web service before the user joins or creates a room and allow or reject the user from joining or creating a room on photon?
2. How to keep the room data, such as players and room state in sync with our web service.
3. When a player loses in the middle of an ongoing game and leaves the room, how should those outcomes be synced to our web service?
4. When all player leaves the room, how can our web service receive the outcome of that room? Is there any way for our web service to receive the state of each player at the point where they left the room?
5. How should our web service receive the room's final outcome?

<What is expected as deliverables>
We expect the following documents as deliverables after thorough discussion on what we want to achieve.
- An architecture diagram expressing what kind of data is sent to/from which components.
- Process diagram expressing when and how each data is sent to/from which components.

Any questions are welcome.