Matchmaking core loop

Options
Hello,

I have been designing the matchmaking system for our new game and I have a couple of design-related questions.
Since we want to add support for friends, we assume that the game will always be connected to the servers. So ConnectWithSettings happens at game launch, and it re-tries automatically if connection is dropped/cannot connect. So far so good I think.

For the matchmaking, the process is the following:
1) Player clicks on "matchmake"
2) Popup shows up, trying to JoinRandomRoom, with specific CustomProperties (defining the game mode, num players, etc)
3) If that fails, we create a room with those custom properties.
4) Waits until all players have joined, and then calls LoadLevel on all clients to start the game.

This works fine, however I'd like to be able to "cancel" the matchmaking process if needed. For that, a expose a little button to the player. The problem is that I cannot find for the life of me how to cancel the async requests that photon is issuing. I can do a "disconnect", that closes all the active connections correctly, however I need to re-connect after that. I'd rather try and stay connected at all times.
Please notice that I have no problem leaving a room once the player has joined, however the problem exists while photon is joining/creating a room; this is the process that I need to halt.

Many thanks in advance

Comments

  • vadim
    Options
    Hi,

    What prevents you from connecting with ConnectWithSettings again in OnDisconnectedFromPhoton hanlder for instance?
  • frostbyte
    Options
    I could, and that is what I am doing at the moment actually. I am just wondering if this is the intended way to do it this.

    Merry xmas :-)
  • vadim
    Options
    Yes, it's fine to do so.

    Happy new year :)