Worldwide/Global Matchmaking Questions

Options
Since Latency is not really an issue in our game, we are thinking about matchmaking players worldwide with each other.

To do so, we thought about doing matchmaking on one region (maybe EU). Then the two players connect, share details about their pings to all photon servers and then choose the one with the best ping. Then the two players connect to the best region for their game and play a game there.

Now for the questions:

1) Is there a better way to do matchmaking globally than connecting all players to one region? Doing this will spike our CCU on this one region and additionally generate higher peak CCU on other regions (the regions in which the players will play their games), leading to us having to pay more than we actually use. Can global matchmaking be done without connecting to a region / only with the master server? Is there another solution to this issue?

2) What's the best way to measure the ping to the various Photon region servers? I've seen that there is getRegionWithBestPing in the Client.h/cpp now, but it only determines the best server. I've examined all the code around it and I couldn't really figure out how I could get the results.
I could probably modify onPingResponse in Client.cpp to save all gathered pings and then retrieve them, but it's not really ideal to modify Classes that change with every update.
Is there a good solution for this?

Comments

  • Kaiserludi
    Options
    Hi @framusrock.

    1.
    The alternatives are to either just let everyone play on the gameservers in the same region that you also use for matchmaking, using the same region for every player world wide or to do regional matchmaking with only the players inside the nearest region. Normally either ping is unimportant enough for your game that it doesn't matter which region to connect to or it is critical enough that playing against a player in a different region of the world doesn't make sense. Therefor we don't really cover you described scenario.
    If you really want to follow this road, then please drop us an email (https://www.photonengine.com/en/Contact) so we can discuss with you how we could approach this pricing-wise.

    2.
    The LoadBalancing API only offers the option to connect to the region with the best ping, but not to just ping all regions without actually connecting to one. However to achieve this LoadBalancing uses the more low level Photon Client Core API. You can just also use this API directly yourself:
    Create a PhotonPeer instance and implement the PhotonListener interface, then call PhotonPeer::pingServer() for each region that you want to know the ping of and receive the responses in your onPingResponse() implementation.