What exactly is a master client and how it should be used?
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
What exactly is a master client and how it should be used?
1_Mad_Developer
2016-06-09 17:11:14
Hello guys!
Can you please clearly explain to me what exactly is a master client and when I should use it? Aren't all clients supposed to be equal? Why would I want to give more privileges to 1 specific client? Photon documentaion doesn't give the definition, but I keep finding mentions like "this only works on master client". Could you please give me some typical usage scenarios?
Thank you very much!
Comments
1_Mad_Developer
2016-06-09 17:36:10
OK Photon does give the definition here
Master Client is a "special" client per room. In absence of a server, it can be made responsible for handling logic that should only be executed by one client in a room (e.g. starting a match when everyone is ready). A new Master Client is automatically assigned when the former leaves. Unless explicitly set, the Master Client is the actor (player) with the least actor number among the active actors.
Didn't know that it's possible to run a multiplayer game without a sever in Photon. Why would I do that?
Hi @1_Mad_Developer,
I'm glad you've found the MasterClient glossary entry. We will try to link to that definition from all references.
By "absence of a server" we mean the absence of server side authoritative custom logic, your own server code. Sorry if it is confusing, we will try a better wording for this.
1_Mad_Developer
2016-06-14 03:40:09
Thank you for your answer, but I still have the same questions.
Why would I want to give more privileges to 1 specific client? Could you please give me some typical usage scenarios?Back to top