- Home /
Correct way to design turn based multiplayer using Photon Unity Networking.
Hello, I'm making a multiplayer card game using PUN.
Consider this scenario.
I have 4 players, one of them is master, and they are ready to play.
Player1 (master)
Player2
Player3
Player4
Here's the steps that I have created for one cycle of the game. Everything below is done only by PhotonNetwork.RaiseEvent(...)
calls
Master Informs each player that it's Player1's turn.
All players receive the event and only Player1 activates it's input, others just highlight the Player1.
Player1 plays some card and sends back to Master.
Master receives Player1's turn and sends it to each player.
Each player pings back to master, that they have successfully received Player1's turn.
After Master receives all events, repeat these steps for the next player.
This loop does the main game logic. However it is complicated and is VERY inefficient. It takes really long , until 1 iteration is completed. Also I will have scalability issues because of very intensive server calls. I have a feeling, that I did it fundamentally wrong. My aim is to somehow simplify it. I hope someone experienced will find a little time to put me into right direction.
What is the correct way to design turn based multiplayer using Photon Unity Networking?
Thank you.
Your answer
Follow this Question
Related Questions
Photon: I call PhotonNetwork.LeaveRoom() but my character doesn't leave 1 Answer
PUN 2 - Attempting to rejoin room and getting "User does not exist in this game". 1 Answer
How do I instantiate and set the parent of a Gameobject using Photon? 0 Answers
Photon Unity Networking - Player Camera Instantiate 0 Answers