Room Creation.

Options
Hello there
I want to create a room which exits 24*7. That means whether or not any player is playing or not, but there should exist a room always so that if any player wants to play the game, he must go to that room only. That means there is only one room in the life of game. Is it possible to do so?

Comments

  • EmptyRoomTtl might match your request.
    https://doc-api.photonengine.com/en/pun/v2/class_photon_1_1_realtime_1_1_room_options.html#a01b2d365fd7a9fea82a9dc1e055801c9

    I think the catch either you might run out actor number very soon or run out all of the viewid for scene
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @GarvGoel_77,

    This is not possible using Photon and workaround or hacks to make it are not recommend it.
    Photon rooms are disposed of once empty (no more active actors) and EmptyRoomTTL expires.

    Why do you need a single room?
    Rooms should not have more than 16 players.

    If you're OK with this, you could make use of JoinOrCreateRoom (if rooms does not exist create it) for up to 16 players.

    Hi @ThomasKao_XRSpace,

    Thanks for your suggestion but EmptyRoomTTL is limited to 300000 milliseconds (5 minutes) on the public Photon Cloud.
  • GarvGoel_77
    Options
    Hi @JohnTube
    Actually I am creating a card game in which I want a dedicated player(masterClient) to do all the calculations. So I made two versions of game, one for players and one for masterclient and i hosted the masterclient game on the cloud. But the problem is after fews minutes(like 30-40 later), masterclient disconnects from server. What should i do?

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @GarvGoel_77,

    Hosting the master client game is not a good option with PUN.
    Maybe you can do this using Bolt (headless server).

    With PUN the best option is to host the actual server and use plugins.

    If you can't change this now, you need to handle master client switching somehow.