Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Matchmaker: how to prevent new players from joining game in progress

Discussion in 'Multiplayer' started by Maraudor, Jan 30, 2016.

  1. Maraudor

    Maraudor

    Joined:
    Mar 9, 2013
    Posts:
    10
    Hi,

    I've been using the UNET matchmaking service, and have used networkmanager.matchMaker to create and join games successfully. However, I do have a question that I can't resolve by looking through the docs: As the match host (i.e. server), how do I stop the game from being advertised on MatchMaker, and prevent new players from joining my game, even if the number of connections is lower than the max connections?

    Basically our game has a max of 4 online players, but once all the existing players are ready (even if there are less than 4), we want to start the game, and from there onwards, stop advertising the game, and block any new players from entering.

    I guess this is a pretty basic question, but I have been looking over the networkManager.matchMaker docs and some forums but still haven't found the answer - maybe I'm just not looking at the correct place.

    Thanks in advance!
    regards,
    William
     
  2. Maraudor

    Maraudor

    Joined:
    Mar 9, 2013
    Posts:
    10
  3. Maraudor

    Maraudor

    Joined:
    Mar 9, 2013
    Posts:
    10
    Another thread here listing the same issue:

    http://forum.unity3d.com/threads/un...fy-attributes-of-match-after-creation.371823/

    This really is an issue since after the game has started and is under way, if we don't want drop-in, drop-out participation in our game, and the game is already in progress, other players will still see the match and try to join (and of course run into all kinds of issues when they do that).

    Any pointers/workaround/references to docs would be much appreciated.

    regards,
    William
     
  4. Makosai

    Makosai

    Joined:
    Mar 4, 2014
    Posts:
    46
    Have you tried the following?
    • StopMatchMaker - I don't know if this will break everything. But, it's worth a shot, right?
    • In your list of games, if the match returns a status saying the game is in progress then just don't add it on the screen.
    • If there's no easy way to do the previous method, you can set the match name to contain this information. Sort of like a header. Then read the header but strip it from the player's view. So the player never sees it.
     
  5. Gorgor

    Gorgor

    Joined:
    Apr 28, 2012
    Posts:
    51
    Anyone has solved this? StopMatchMaker do nothing, and changing name or any other attribute of the match does not work. They are still the same as they were at the time the match was created.
     
  6. Gorgor

    Gorgor

    Joined:
    Apr 28, 2012
    Posts:
    51
    Anyone?!
     
  7. OrewaVenando

    OrewaVenando

    Joined:
    Feb 24, 2016
    Posts:
    1
  8. Koval_Ivan

    Koval_Ivan

    Joined:
    May 20, 2016
    Posts:
    1
  9. JellyDoodle

    JellyDoodle

    Joined:
    May 20, 2015
    Posts:
    1
    But isn't that "insecure"? Someone can still connect to your match, if they force the connection, right?