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.

Question What to do after server is hosted?

Discussion in 'Game Server Hosting' started by unity_B72AE6CDBFDB13F435DB, Feb 2, 2023.

  1. unity_B72AE6CDBFDB13F435DB

    unity_B72AE6CDBFDB13F435DB

    Joined:
    Nov 22, 2022
    Posts:
    3
    So I uploaded a build and created fleet. After that it gives me list of available servers. Test allocation also also works fine.
    upload_2023-2-2_12-12-23.png
    Now the question is, how to utilize this information in game? how can I get the list of available servers in the game so that players can connect to them as a client only?
     
  2. jackw_unity

    jackw_unity

    Unity Technologies

    Joined:
    Oct 12, 2022
    Posts:
    11
    Thanks for your question here!

    I think you will find these concepts from our integration requirements concepts page particularly interesting with regard to handling allocations on the gameserver side.
    Additionally we have the MatchPlay example which shows how we have used Multiplay and Unity Matchmaker in a Unity project to match players onto their requested game types.

    In your specific use case where you intend to reveal a server list for your players to pick and choose a server to join you may want to consider a custom Matchmaker that can cache information about your fleet and its allocations by leveraging the Multiplay API. You can implement our APIs how you'd like but I'd recommend a Matchmaker flow like this:

    1. Request an allocation
    2. List allocations on a fleet basis
    3. Store allocations in your matchmaker
    4. Periodically call the allocations API for each individual allocation and cache in your matchmaker
      it will return server info such as IP and Port
    5. Using info stored in your matchmaker reveal your server list to the player (perhaps send it to the client as a JSON blob)
    Worth mentioning regarding the session length, currently an Allocation will timeout after 1 hour and the linked server become reallocatable. If the server is still running and is allocated it will be restarted to pickup the new allocation - this mechanism is to keep cost low and player density high by ensures that your server does not run away with the allocation if it has an issue - We are currently working to allow users to set their own Allocation timeout.

    Please let us know if I can elaborate on any points or provide any additional documentation to help with this.
     
  3. unity_B72AE6CDBFDB13F435DB

    unity_B72AE6CDBFDB13F435DB

    Joined:
    Nov 22, 2022
    Posts:
    3
    Thanks for your reply. Will try to understand guided modules and let you know if further assistance needed. Though, knowing that server timeout is only 1 hour make me sad!
     
  4. jackw_unity

    jackw_unity

    Unity Technologies

    Joined:
    Oct 12, 2022
    Posts:
    11
    If you have a specific need we can adjust the allocation timeout in our backend whilst we wait for the frontend feature to allow this, please send us a ticket for that so we can track the request it will go a long way to expediting the feature too.

    You can file a ticket from the Help & Support page on Unity Dashboard and then scroll to File a Ticket at the bottom.
    Choose Multiplayer -> Multiplay

    Thanks :)

    upload_2023-2-3_9-19-39.png
     
  5. unity_B72AE6CDBFDB13F435DB

    unity_B72AE6CDBFDB13F435DB

    Joined:
    Nov 22, 2022
    Posts:
    3