Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

UNET dedicated servers list.

Discussion in 'UNet' started by casborg, Mar 26, 2018.

  1. casborg

    casborg

    Joined:
    Sep 20, 2013
    Posts:
    8
    Hello everybody.
    Currently working on the dedicated server based multiplayer game.
    Now, I want to get the list of currently available servers. How can I achieve this? I have no clue about this.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You'd normally set up a master server which all dedicated servers register themselves with. When a dedicated server starts up, it tells the master server it is available on a specific IP/port, probably a user defined name for the server, and any other server settings that may be of interest to the player. You'd then have servers periodically ping the master to let it know the server is still there. Any servers that either deregister themselves or haven't phoned home in a while are removed from the list to keep it current.

    The client would contact the master server to get the current list of dedicated servers, display the list to the user, and the user would then choose a server to join it.

    There's probably other ways of doing it, but this is the most straight forward.
     
  3. casborg

    casborg

    Joined:
    Sep 20, 2013
    Posts:
    8
    Woaw, I didn't know about Master Server. Thank you!