A few question before getting started.

I would like to ask you a few question before getting started, concerning Photon Server.

I plan to make a multiplayer Turn Based game with a persistent single room (at first) that would handle maximum 100 player over the course of 2 weeks. A player can disconnect/reconnect anytime during those 2 weeks, the server can be empty and keep the data, and with only a few user interaction (like buy an item, move to this square etc..) but nothing that intensive.

I am using Photon Server Self Hosted cause I want most of the logic to be checked and validated by the server, and no client.

My question are :

- To implement server logic, I need to create a plugin and add listen to webhook, correct ? I should not
need to modify anything other than my plugin and leave untouched the other folder in `Src-server` (Hive/NameServer/LoadBalancing etc).

- To Persist and reset the game data, I need a webserver separated from the game server to handle and save the game.

- What would be the approach to make a single room always open and available, and prevent the server/user from creating additional rooms. At first, since there would not be many players, I want a single room to handle everything, and remain active and unique wether player are connected or not.

Thank you !


  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Crocsx,

    Thank you for choosing Photon!

    You are asking good questions.
    The answer is not easy in the sense that they are not yes/no questions.
    It depends on details of what you want to do, when do you need it and how big is the project and team involved.

    But here is my recommendations:

    - yes start with a plugin only and you can 'extend' webhooks in the sense that you take it as an example/reference/starting point when you want to initiate HTTP requests from the plugin to other servers.
    - yes for persistence we recommend using a separate persistence server(s) and communicate with the plugin (and client) via HTTP.
    - keeping a SINGLE room for TOO LONG is NOT RECOMMENDED. But it's ok to do this "ASYNC": if the room is created, destroyed when empty then 'resurrected' with its state loaded.

    A single room however is not something healthy to do with Photon Server rooms. It's against the basic foundations of Photon's LoadBalancing application where one or more GameServers host multiple rooms.

    Also 100 players per room may be too many? Of course this depends on how often you exchange data in the room between players and if you broadcast, multicast or unicast. If it's turn based it may be OK.
  • Thank you for your reply.

    The thing is, the game would be not turn based, but not dynamic in term of server requirement like said above. A user would not do many broadcasted operation in the room, only a few (like moving units) the rest would be just some simple request not room dependend (unlocking item/purchasing unit). It require many player to be enjoyed, and we are still considering the good amount, but it would be over 50 for sure.

    As we won't probably have many player at start, we are planning to lock to a single room (that would unload/reload when player connect/disconnect) and a second server would handle async persistent tasks.

    If we end up having many players, we would unlock the single room requirement and allow multiple server to run with the same logic, and assign players to their room for the 2 week duration. so that is why we considered Photon, as the plateform would allow us to scale if the game works.