Keep a room Open 1 minute after player quit [Photon]

Hi everybody ! first sorry about my bad english, i’m french :slight_smile:

I’m doing a 2d game like a little MMO, and i want to kniw if it’s possible to keep a room open just 1 minute after the last player quit

I have some monster on the map, and if nobody is in the map and a player come back, monster are going to respawn, so , the player can use this trick to farm monster and experience.

So if i can simulate a player and destroy him after 1mn( time to monster to respawn), he can’t use this trick to level up faster :slight_smile: !

so if someone have some idea i’ll really appreciate !

Have a good day !

Room-based networking is a little limited in that this type of functionality doesn’t exist out-of-the-box. You have two options:

  • ditch the traditional room-based networking mechanics and implement your own networking solution where you manage the “rooms” yourself, and can therefore keep them alive after players leave. If you are interested in this, check out the Photon SDK that allows you to create your own solution using photon

  • set up some sort of client application that connects along with the first player and then disconnects one minute after the last player leaves. A bit of a work-around but would be more simple than creating your own solution

Hopefully this helps, good luck!

thx for you’re replay i find the solution ^^

if someone is interrested :

RoomOptions options = new RoomOptions();
options.EmptyRoomTtl = 60000; /// time in millisecond to keep the room open after the last client quit
PhotonNetwork.JoinOrCreateRoom("RoomName", options, null);