location based matching

Hi all,

I am just experimenting with photon at the moment and I am wondering if it is possible to match to players depending on there geolocation data?

For example if the games are 2 player, in the lobby there are 2 people from paris, 1 form London and 1 New York it would match the 2 people from Paris together and the 2 from London and New York.

I had a quick google and didn't come up with much but this is a fairly crucial element to my game.

Thanks in advance.

Mark

Comments

  • The next PUN version has a new connect option "Best Region". This will ping the servers and select the one with best connection for a client.
    This is not really based on location but it plays a role when you ping.

    Until you have a lot of players, you probably don't want to separate your users too much. Else the user from Paris and the one from New York both look for someone but can't find each other.
  • When do you think the next version will be released?

    And by "Best Region" how narrow does that filter down to? County, Country or continent?

    The idea that I have is not to separate the players at all but to just link the player to the nearest player to them. If there are 2 people playing then they always need to find each other but if there are more people they try and find the nearest player to them.
  • It only works per region:
    http://doc.exitgames.com/en/pun/current ... ce/regions

    If you want to structure your matchmaking even more, you will have to look into device-APIs to get the location and then you need some service or algorithm that turns this into a "place" which is suitable for your game and current load.
    If you have longitude and latitude, you could possibly make use of the SQL Lobby, which gives you sql-like matching capability.
    See: http://doc.exitgames.com/en/realtime/cu ... -and-lobby