Implementing Photon Networking into games with a dedicated server

edited January 11 in Photon Server
Hey guys. Im fairly new to Unity (~3 weeks of research and messing around with Unity) and i have recently started to look into implementing Photon networking into my game. I've been watching this tutorial

to get started on some basics of Photon Networking, but from what I understand is that the state/data of the game is stored on the master client (player who created the room?).

I'd like to know how i can have a dedicated server, where the state of the game is stored instead of it being on the master client. Im not too familiar with the terms so I might have the wrong idea. Is there any tutorial/guide which can help me achieve what I need?


  • Hi @Calvin,

    Thank you for choosing Photon!

    For authoritative server logic you will need to choose one of the 3 custom server-side code options:

    1. Photon Realtime (Game Server) Plugins (recommended, easy and can be adapted to PUN's specific events)
    2. Extend Photon LoadBalancing Server Application (and extend PUN accordingly if necessary)
    3. Write a Photon Server Application from scratch (and write the compatible client)
  • Hello @JohnTube

    Thanks for the response. As of now i'm going for option 1 for the development of the game, which is shown in the video link i posted. It is using authoritative server logic as well but I have a problem of storing the player data (health, items owned, etc.) in a dedicated server instead of it being on the master client.

    I was thinking of having my game client connect to my own Java Server, which handles matchmaking and such, which then instantiates a Unity client (the headless server) that will be the "master client". Is it a good idea to do this or is there a better architecture for this? It'd be great if I could have a link/guide to an example of how I can achieve this.
Sign In or Register to comment.