Dead Instances

Hello! I'm using PUN.
In my game players can freely switch rooms (room = location). But very often the case that the room can be closed and no one can go there.
There is a new room with the same name as the first.
The logic is this: each player is trying to join the room. if the room does not exist, the player creates it.

The problem is that the room may be dead, but the players are still in it and interact normally. BUT new players can not come to them in a dead room. And create a new room with the same name.

How can I fix it?

Comments

  • A dead room will be cleaned up after a while and when this happened, the room name is available again. Until then, the room might not be available, yes.
    Each room has a certain capacity only. Even if you set no limit, you can't add hundreds of users to a room, cause it will break in one way or another.

    You need to get away from "one room per location" and instead use room properties as indicator of the location. A filter for random matchmaking can find you a room for a location (if some exists), no matter how it's named. The room name in this scenario is not important. Instead, a property (e.g.) "l" (for "location") is used.
Sign In or Register to comment.