Two players in same country can't join same room

Options
I'm getting a bug report and have myself experienced once (but cannot consistently repro) being unable to join the same room as a second player in the same country. I'm curious if there's some step I'm missing with my matchmaking that could account for the problem. My game is very simple and the only restriction is that a room have fewer than 8 players. I join a room like so:

PhotonNetwork.JoinRandomRoom();

In OnPhotonRandomJoinFailed I call:

RoomOptions options = new RoomOptions(); options.MaxPlayers = Constants.MaxNumberOfPlayers; PhotonNetwork.CreateRoom(null, options, null);

And that's it! Any help would be greatly appreciated.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2017
    Options
    Hi @aschearer,

    Thank you for choosing Photon!

    If you are using "Best Region" as "Hosting" option in "PhotonServerSettings", sometimes even if clients are connected from the same geographical place, they can connect to different Photon regions. This can be explained by a difference in ping calculation(s) to the different regions' servers at the time of the connection of each client. This could be a result of a different network (different network type or ISP, etc.) or different routing at the time of ping per client.

    What you can do:

    - explain this to your players.
    - explicitly show current region to the player and let players force region switching.
  • aschearer
    Options
    Thanks for the follow up JohnTube, is best region recalculated each time on start up?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    No, I think it's done once and cached in PlayerPrefs.
    I need to double check to see if we managed to add "Best Region" update but I don't think so.

    You can still override or force the best region using
    PhotonNetwork.OverrideBestCloudServer(CloudRegionCode region) .