Search Unity

Feedback MiniServerList - simple project to keep an online list of your currently hosted games

Discussion in 'Multiplayer' started by cpasjuste, Jul 9, 2020.

  1. cpasjuste

    cpasjuste

    Joined:
    Apr 2, 2012
    Posts:
    154
    Hi,

    I wanted a simple, easy to use (and free) way to keep a list of running (hosted) games for my soon to be re-released "MiniStrike" game. Think to Mirror "list-server", but with self-hosting (and open source).

    The project seems to be working fine, so i guess it's ready for a public announcement.

    As i'd like to keep information on this in a single place, i invite you to read more about it here: https://github.com/Cpasjuste/MiniServerList/blob/master/README.md

    Basically, here's how it works:
    • Attach the "MiniClient.cs" script to a GameObject

    • Register/update your game to your hosted "MiniServerList" with "MiniClient.Register"
      Code (CSharp):
      1. if (MiniClient.Register(miniserver.ip, miniserver.port, miniHostData))
      2. {
      3.    Debug.Log("MiniClient: registration success");
      4. }
    • Unregister your game from your hosted "MiniServerList" with "MiniClient.UnRegister"
      Code (CSharp):
      1. if (MiniClient.UnRegister(miniserver.ip, miniserver.port, miniHostData))
      2. {
      3.    Debug.Log("MiniClient: un-registration success");
      4. }
    • Get a list of running games from your hosted "MiniServerList" with "MiniClient.GetServerList"
      Code (CSharp):
      1. List<MiniHostData> serverList = MiniClient.GetServerList(miniserver.ip, miniserver.port);
      2. Debug.Log("MiniClient: servers found: " + serverList.Count);
    • See MiniClient.cs for a working example, and/or run the "TestScene" from unity editor (be sure to enable the "Testing" option from "Client" GameObject).
    Feel free to give any feedback here, but also contribute to the project on github.

    Thanks for your time,
    Cpasjuste.
     
    Last edited: Jul 10, 2020
unityunity