The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

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).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Is PUN based on Peer to Peer?

Arcanium
2019-05-20 13:56:25

I know that the server handles matchmaking and RPC, but is the gameplay itself P2P or is it handled by a server?

Comments

JohnTube
2019-05-21 10:18:44

Hi @Arcanium,

Thank you for choosing Photon!

PUN is not peer-to-peer.
PUN client connects to dedicated servers.
The servers work as a relay and keep a room state as long as a room is alive.

Arcanium
2019-05-22 13:43:29

Hi @JohnTube,
Thank you so much for your response! I Almost lost hope that anyone would help me out haha.

If you don't mind I want to extend the question: You that the servers keep a room state alive, but Is the matchmaking process and sending data between users in the same room P2P or is it also handled through the dedicated servers? Also, is the "Master" player the one handling all the processes or is he irrelevant?

Context: We're working on a real-time racing game with powerups that match 5 players together in the same room based on the race mode they chose.

I Really hope to hear from you again!

JohnTube
2019-05-22 15:40:24

Hi @Arcanium,

Is the matchmaking process and sending data between users in the same room P2P or is it also handled through the dedicated servers?
Everything is handled through the dedicated servers. Matchmaking is done on the Master Server. Rooms are on the Game Server. Client switches servers as needed.
is the "Master" player the one handling all the processes or is he irrelevant?
Master server is a normal client. It can be used for "lightweight pseudo authoritative logic" as the server always guarantees a unique master client per room whenever the room is not empty. Read more about "Master Client and Host Migration". Back to top