Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Users creating matches, others joining?

Discussion in 'Matchmaker' started by gogogotchi, Jun 15, 2023.

  1. gogogotchi

    gogogotchi

    Joined:
    Mar 21, 2023
    Posts:
    10
    Hi all!

    We're starting out with some basics in terms of our matchmaking and are curious if the unity Matchmaker is a fit. Initially, we'll want users to be able to simply create matches (rooms/sessions?) of their own, and have other players join their matches. Pretty standard stuff.. a user can create a game for others (including him/herself) to join, or a user can just join a game.

    My issue was, I couldn't find how to map this concept to the matchmaker APIs. Do they support this, or is it something we'll have to build ourselves?
     
  2. guillaumedUnity

    guillaumedUnity

    Unity Technologies

    Joined:
    Apr 1, 2021
    Posts:
    36
    Hi ! I highly suggest you look at Lobby for the room support.
    The flow I would suggest for you in that use case is:
    - A user creates a Lobby
    - A user in that room (the host of the Lobby probably) sends a request to Matchmaker for a Game server hosting allocation
    - Once allocation is done, the host add the information of the server in the lobby
    - All other users uses the information on the lobby to join the server without matchmaking
     
    gogogotchi likes this.
  3. gogogotchi

    gogogotchi

    Joined:
    Mar 21, 2023
    Posts:
    10
    Thanks! I presume though that the user that created the lobby wouldn't have to actively send the request himself to matchmaker.. correct? If all of the steps above are manual, and the host is actually pasting connection info into a lobby chat, it seems rather clunky. what about this for example ('behind the scenes' code in parens)

    - A user creates a Lobby - sets max players, and map
    - ( request is made to matchmaker for a game server hosting allocation )
    - all the while, players may be joining the lobby
    - ( when allocation is complete, store the server info into a lobby property or external db)
    - when all players click ready, start the game
    - (connecting them to the server using the info stored above)