Count of rooms is zero after room creation

Options

The join room function was actually fine a month ago, but when I am reviewing it today, I am having trouble to join a created room from other clients, citing that game does not exist. So I did some back tracking and found out that when the room is being created in the first place, it is not being recognized by PhotonNetwork.CountOfRooms.

And what is even wierder, after I createRoom, I did the following print statement:

And the result is:

How could this be possible? On the one hand, PhotonNetwork does not recognize this room as one of the rooms available, but on the other hand, the PhotonNetwork.CurrentRoom clearly shows that this room not only exists, but is also open and visible to other players.

Btw, I've also checked that the room is not in offline mode.

Does anyone know what is going on here? And how can I actually make this room available for other players to join?

Answers

  • Tobias
    Options

    I think I replied to this somewhere today. Don't recall where, though.

    Did you get an answer? If so, please copy paste here. Thanks.

  • Yes I got the answerhere: When creating a room or joining one, the client leaves the Master Server to connect to the assigned Game Server. Functionality provided by the Master Server is no longer available, which means CountOfRooms is unknown while in a room.

    There is a workaround for this by connecting another client to the Master Server but as this drives traffic and costs for a minor gain, it's not very popular.


    Aside from leaving one server for another, creating and joining rooms will take a moment! The count does not go up until someone is actually using the room on the Game Server.


    Anyone connected to the Master Server should sooner or later get an update for CountOfRooms. This is not immediate, as a popular game will make the room counts fluctuate a lot, so it's only updated every few seconds.


    Other clients can only see rooms which are using the same Region and Game Version string. See the link for some more details (which I think don't apply here).

  • Btw I solved the problem by syncing the two games with up to date files over plastic SCM.

  • Tobias
    Options

    Glad you found a solution.

    Now I don't know what the problem was really. What happened?

  • WeebOrWeed
    Options

    I suppose it was due to the different version numbers of the two copies.

  • Tobias
    Options

    That's possible, yes.