Search Unity

Resolved Matchmaking with friends

Discussion in 'Matchmaker' started by ngokakr, Dec 8, 2022.

  1. ngokakr

    ngokakr

    Joined:
    Dec 9, 2014
    Posts:
    1
    In team games like League of Legends, you can start matchmaking with your friends in a party.
    If you are in a party of two and matchmaking, you will be matched with three allies and five enemies.

    The documentation seems to be designed to be played alone.
    Is this possible? Or will it be supported in the future?

    My game is made with Mirror.
     
  2. FlorianAtUnity

    FlorianAtUnity

    Unity Technologies

    Joined:
    Jun 16, 2021
    Posts:
    15
    When Creating a ticket, you send a list of players, when playing with friends the group leader create a ticket with the list of all the players in the group.

    i.e. in this example: https://docs.unity.com/matchmaker/use-the-matchmaker.html#Creating

    it would be:

    Code (CSharp):
    1. var players = new List<Player>
    2.         {
    3.             new Player("player-id-group-leader", new Dictionary<string, object>{ { "preferredMap", "dune" } })
    4.             new Player("player-id-friends1", new Dictionary<string, object>{ { "preferredMap", "dune" } })
    5.             new Player("player-id-friends2", new Dictionary<string, object>{ { "preferredMap", "dune" } })
    6.         };
     
  3. Emsey

    Emsey

    Joined:
    Mar 7, 2021
    Posts:
    2
    How can i handle situation when values innside Players.CustomData are different?
    for example:

    Code (CSharp):
    1. var players = new List<Player>
    2.         {
    3.             new Player("player-id-group-leader", new Dictionary<string, object>{ { "preferredMap", "venus" } })
    4.             new Player("player-id-friends1", new Dictionary<string, object>{ { "preferredMap", "mars" } })
    5.             new Player("player-id-friends2", new Dictionary<string, object>{ { "preferredMap", "mercury" } })
    6.         };
    I got en error: The ticket is not compatible with the match definition.
     
  4. lucy-unity

    lucy-unity

    Unity Technologies

    Joined:
    Apr 7, 2021
    Posts:
    18
    This error usually means it's impossible to create a match with these players that follows the rules defined for the targeted pool.

    For example, if your team has a max of 2 players and you're sending a ticket with 3 players, or if you have an equality rule that says everyone on one team must be in the same preferredMap but the players on your ticket all want different maps. Note that all players on one ticket will be placed on the same team.

    We'd like to improve this error message as it's not very descriptive.