Search code examples
networkinggame-enginematchmaking

How does Dota2 know to match Players with high priority after the first matching fails?


In Dota2, there is a rule that when the first match for ten players fails, then you are matched to the game with a higher priority. I am curious about how this can be done?


Solution

  • Essentially, each player has a priority (most likely just an integer value) and according to their priority, they get placed in games. I.e. players with higher priorities will be put in matches sooner than those with lower ones. If a player has been matched but the match fails, their priority is increased to ensure they are not waiting ages to be matched.

    Slightly off topic: In addition to this, you could make the player's priority the amount of time they have already waited. In this case, players who have waited ages will get put in matches before everyone else. Back on topic: Then you could add on a certain amount if a match fails.

    At least that's how I'd do it.