Best way to join a room in another region?

Options

Hi, I'm making a small low-bandwidth game and I'd like players to join a room by entering just the room name/code (eg. "1234" or "myroom") regardless of which region it's in. Latency is not that important for this game, but I want people to be able to connect to their friends wherever they are.

I can see how to make this work just by storing a simple list of key/value pairs (ie. "roomName" : "region") of the open rooms and connecting to the region matching the room code.

But do I have to do this on a different server? Or does Photon have a simple storage mechanism I can use for this purpose? It would only need to store the rooms that are open right now so probably no more than 100 values at most.

It seems like it's probably a pretty common situation so I'm hoping there is an easy solution.

Thanks!

Answers

  • Kaiserludi
    Options

    Hi @hengineer.

    If latency is not that important, then the simplest option would be to just let all clients connect to the same predefined region.


    If latency is important enough that you want them connect to the nearest region whenever they want to play against random opponents and not their friends, then the above is of course not an option.


    However whenever you want people to be able to join the room that their friend is in, you need to somehow communicate to them in which room he is in. As Photon does not offer communication with any client who is not inthe same room, you need to use some other communication channel to communicate the room name. This can either be some 3rd party solution or Photon Chat. On that other line of communication that allows you to send the room name it should really be trivial to comunicate the region as well.

  • The players could communicate the region, but I don't want to make them do extra work if it's unnecessary and this is something the game can do automatically. It's my job to hide that extraneous stuff from the player :)

    So... I'm assuming that Photon doesn't have any custom data storage that I can use for this purpose? Some App-specific custom properties? Or something on the NameServer maybe?