Can I create multiple rooms from one instance of my app?

Options
Hello, everyone. Is it possible to create multiple rooms from one instance of an application? And of course, these rooms would be available for everyone to join.

If it is possible with Photon, I would be thankful if you can give me some hints.

Answers

  • DbVIndie
    Options
    Yes, it is possible and very simple, it depends on the style of game let's suppose it is an FPS:

    To Create Room:

    https://prnt.sc/klu1ex
  • @DbVIndie , thank you for responding. However, I don't think you understood me right. I am trying to create multiple rooms from one client.

    The problem is that after I create a room, I suppose I am already in it, because I get a "not the master server" error on the second room creation.
  • Hi @RadostinStoychev,

    The problem is that after I create a room, I suppose I am already in it, because I get a "not the master server" error on the second room creation.


    This is by design, since a client can only be active on the MasterServer or on a GameServer at the same time. Being on the GameServer there is a further limitation, that the client can only be inside one room at the same time by default.

    So before creating a new room, the client would have to leave his current room, which will remove this room by default if it is empty afterwards. There is a way to avoid this and have a certain room kept alive empty, which might be fine for a few minutes in order to allow reconnect. However it is not recommended to keep rooms alive for a longer period of time.

    Is there any reason why you want to multiple empty rooms?
  • @Christian_Simon , thank you for responding. Well, I dont want clients to open the rooms. That is because in my app only "lecturers" can open rooms, but still, I would like the room to open like 15-30 min before the "lecturer" goes in. In that time, other users might join the room.

    So I am looking for a way to create a system that opens rooms depending on their defined starting date and hour. This has to be automatic, without a specific client been forced to do that.

    Is this even possible? To create a system running all the time, checking time conditions, and opening empty rooms when the time comes, and then of course after "the lecture" is complete, it closes the room.
  • DbVIndie
    Options
    Now I understand, yes as our dear friend quoted is possible but not advisable
  • Hey @DbVIndie , can you give me some hints on what methods should I look for in the documentation? Thank you!