Search Unity

Dedicated Server Kit: Online matchmaking for Mirror (and more!)

Discussion in 'Assets and Asset Store' started by gamevanilla, Jul 1, 2020.

Thread Status:
Not open for further replies.
  1. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Hello! I am glad to announce Dedicated Server Kit is now available on the Asset Store:



    Dedicated Server Kit is a complete library that allows you to host your Mirror-based multiplayer games on a dedicated server. It is the evolution of our own Master Server Kit, which has been providing this feature for UNET-based games for several years. It is a completely new asset, developed from scratch and priced at $59.99, that improves over the original kit in many ways.


    Why?

    There are lots of options for P2P networking out there but, many times, you just really need to host your game on a dedicated server. Consider the following scenarios:
    • Custom backend: You need to be in total control of your game backend. This could be for a variety of reasons: player authentication, player data storage or advanced matchmaking facilities, monetization schemes, increased ability for monitoring or maybe you just have the team and expertise needed and prefer to do everything in-house.
    • Server-side authoritative game logic: Your game needs to be secure against player hacks. In player-hosted games, one of the clients acts as the server. This means that a malicious client has the potential to alter the outcome of the game. Whether this is important or not will depend on the specifics of your game, but sometimes you really need to be safe against this type of cheats. Running the game logic on an independent, authoritative game server that you control is the best way to ensure that.
    Running your game on a dedicated server has therefore several advantages over player-hosted games:
    • More protection against malicious clients.
    • No artificial CCU limit.
    • No need for NAT punch-through or relay servers. Clients are never connected directly to each other but through a dedicated server instead.
    • You only pay for setting up and maintaining your servers (which can be your own machines or a third-party cloud provider like Digital Ocean).
    The main drawback is that, of course, you are in charge of everything. You need to pay for the hosting of your servers (unless you physically own them) and make sure they are always available to your players. As they say:

    "With great power comes great responsibility."

    Dedicated Server Kit has been specifically created to help you with this task. We want you to focus on making a great game instead!

    Features

    Dedicated Server Kit provides the following features:
    • Player registration and authentication.
    • Player data persistence in a MySQL database.
    • Game room-based matchmaking functionality. Independent Mirror-based game server instances are dynamically spawned and destroyed as needed as players join and leave games.
    • Networking library-agnostic REST API written with Go using battle-tested techniques and standards. While the kit supports Mirror-based game server instances by default, support for other networking libraries is technically possible.
    • Complete Go and C# source code.
    The first version will contain the essentials of what we hope will grow into an even more complete and full-featured kit based on your feedback.
     
    Last edited: Jul 20, 2020
  2. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    And we are live now! :)
     
    Hagen and digiross like this.
  3. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    It is still early days, so please feel free to contribute to this thread if you have any feedback on the initial release of the kit and/or any ideas on what would you like us to work on next.

    For technical support questions, please reach us via the contact form at our website. This thread is focused on pre-purchase questions and community feedback and suggestions.

    Thank you!
     
  4. Akravator

    Akravator

    Joined:
    Aug 8, 2017
    Posts:
    19
    Is it the same like the master server kit except it is for Mirror?
    Could you post a few UI if you dont mind. :D
     
  5. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    It is the same thing conceptually speaking, but with a completely different implementation. The main difference is that the "master" server is not a Unity binary anymore, but a Go one (which makes it lighter and more efficient), and the whole flow is based on a REST API (which means the kit has the potential to be used with different engines than Unity and different networking libraries than Mirror).

    I will add more details about the demo to the documentation as soon as possible, but please note the interesting things are happening in the code and not the UI itself (which is really just used for demonstration purposes).
     
  6. VasyaCullin

    VasyaCullin

    Joined:
    Feb 17, 2014
    Posts:
    8
    headless mode is supported?
     
  7. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Not only supported, but the recommended way to use Unity as a server generally speaking.
     
  8. givizator

    givizator

    Joined:
    Oct 23, 2018
    Posts:
    30
    Looking into your solution.
    The FAQ says that it has not been tested with WebGL, ca you give it a shot to see if it's working properly ?
    Also, why did you choose a REST API approach when most commercial solutions like GameSparks seems to favor WebSockets ?

    Cheers.
     
  9. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Testing WebGL is on my list. Regarding the choice of a REST API; it just did make sense considering the communication with the kit is occasional (authentication, retrieving the list of game servers, etc.). You do not really need WebSockets for that.
     
    givizator likes this.
  10. DevATsci

    DevATsci

    Joined:
    Jul 23, 2020
    Posts:
    48
    Hello GameVanilla

    With Unity announcing no more support for UNET in 2018 and a phase out, with little details of the new upcoming stack to replace it how does your assett handle futureproof-ness?
     
  11. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Dedicated Server Kit does not use UNET but Mirror, which is actively developed and maintained. It also has the potential to be used with other networking libraries if needed (as the core is implemented in Go).
     
    DevATsci likes this.
  12. Akravator

    Akravator

    Joined:
    Aug 8, 2017
    Posts:
    19
    Hi GameVanilla,
    Do you have a guest mode like in the Master server kit?
     
  13. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Is custom matchmaking logic supported? How easy it is to implement a custom matchmaking logic?
     
  14. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    No, not at the moment. I believe for the type of games that use a dedicated server backend, you usually want registered users.
     
  15. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    The complete source code is included in the kit, so you are free to extend it as needed. How easy that will be will depend on your knowledge of programming (and, specifically, the Go programming language); it is not something I can answer myself.
     
  16. Akravator

    Akravator

    Joined:
    Aug 8, 2017
    Posts:
    19
    Could you please implement the Guest function? I really like that in the masterServerkit.
    Because sometime, the player just want to test the game first without actually register for anything.
     
  17. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Noted! If there is enough interest, I will definitely consider adding it in a future update.
     
  18. swsh1995

    swsh1995

    Joined:
    Apr 3, 2019
    Posts:
    1
    I do setting demo. but I can't find "go build". and i need visual manual.
     
  19. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Not really sure what you mean, but if you need technical support please reach us via the contact form at our website. This thread is for announcements and pre-purchase questions only.
     
  20. Ahmet_Dem

    Ahmet_Dem

    Joined:
    Feb 21, 2020
    Posts:
    5
    Hi, so I want to buy this kit. However, I have a question, how do we deploy this kit on our dedicated server? Normally in Mirror I would make a server build and upload it to AWS. Is it the same procedure with this kit?
     
  21. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    There are three main components in the kit: the Go server, the MySQL database and your game's server binary. All of these would need to be properly set up in your AWS instance, so please note you will need to be familiar with the relevant details of how AWS works. We provide the complete backend code, but do not provide support for deployment matters (as these are provider-specific and outside our control).

    The entire setup procedure is explained in more detail in the official documentation, which is available here.
     
  22. soomon

    soomon

    Joined:
    Sep 24, 2020
    Posts:
    10
    Hello @gamevanilla . This project looks very interesting as I am researching on multiplayer soltutions and need a dedicated server. What I am surprised is that the project uses 2 different languages. Any special reason GO was used instead of C# all the way?
    The description sais "GO and C# Source Code is available". Which part of it is GO? Is only the rest part GO?
    Actually needing to learn a whole new language "just for the dedicated server" seems a bit counterintuitive to me.
     
  23. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    That is right: the REST-based dedicated server API is Go, while C# is used in the game binaries (server and client). I wanted to go with a lightweight, REST-based API this time and Go excels at those. I actually learned the language while developing the kit and kind of fell in love with it; it is just brilliant for anything related to server development, having a very rich library ecosystem, and you can easily pick it up in a few days. I could have certainly used C# there as well, though!
     
  24. BitPax

    BitPax

    Joined:
    Oct 4, 2019
    Posts:
    89
    Can you explain in greater detail how you are handling the authentication part and how secure it is?
     
  25. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Sure thing! So the entire API of the kit is REST-based and there are two routes, one for user registration and another for user authentication. When successfully logged in, the server sends a JSON Web Token in the response, which is used to authorize the user into other routes (e.g., matchmaking).

    On the database side, we only store the hashed passwords and use the Argon2 algorithm as the key derivation function (which is state of the art, security-wise).
     
    BitPax likes this.
  26. BitPax

    BitPax

    Joined:
    Oct 4, 2019
    Posts:
    89
    If this were PHP/Laravel I would buy it up!
     
    Last edited: Nov 13, 2020
  27. NomegaKazuto

    NomegaKazuto

    Joined:
    Mar 28, 2020
    Posts:
    1
    Hi, if i rent a dedicated server on ionis for example, did you help to install it ?
     
  28. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    No; deployment to a server is a responsibility of the user because it is something we do not have any control over.
     
  29. Moopra

    Moopra

    Joined:
    Jun 4, 2015
    Posts:
    30
    Hi gamevanilla.

    If my game have both mode . MMO open world and the Lobby matchmaking mode.
    Player can grind levels in MMO open world mode and find opponents to compete with in the lobby mode.

    The question is how much this asset support to do that or I have to implement my normal Mirror for the MMO part.
    In anycase I will buy it for the Lobby part.
     
  30. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    The matchmaking is currently game room-based, but we will add the option for persistent game rooms in the future just like we had in the original Master Server Kit. As more users integrate the kit in their games, we expect to add more refined matchmaking options in future updates in order to support more use cases.
     
    Moopra likes this.
  31. Eloujah

    Eloujah

    Joined:
    Apr 28, 2014
    Posts:
    24
    Hello,

    Your asset seems very interesting for one of my projects. We are planning to use AWS EC2 with a scalable system. Is your API capable of instantiating server instances? Can the master be alone in a server instance and all the game rooms in other instances?

    Thank you
     
  32. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Thank you! Not by default, as there is no service provider-specific (e.g., AWS-specific) implementation included.
     
  33. Eloujah

    Eloujah

    Joined:
    Apr 28, 2014
    Posts:
    24
    Ok, I understand. I saw there is in the API with an account management. We already have an API with the player's account. Is there an easy way to connect these 2 APIs, so that the player doesn't have to create multiple accounts?

    Thanks
     
  34. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    That is a bit hard to answer from my end; I believe it will mostly depend on your existing API.
     
  35. vqt123

    vqt123

    Joined:
    Apr 16, 2013
    Posts:
    23
    Hello. I followed the documentation but still not certain what's suppose to actually run? Is there a video tutorial anywhere?
     
  36. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    There is no video tutorial, as everything is command-line based. Please reach us via the support channel at our website if you need any help and we will be more than happy to assist.
     
  37. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    45
    Hello Gamevanilla, we are trying to put the configuration of the demo in a remote server made based on Linux, the server is correctly configured. And we have followed the steps described below, so you can tell me if we made a mistake about something:

    In the SERVER:
    1. We have prepared a new server in the cloud, with Debian 10.
    2. We have installed: MySQL, GO-Lang / Librery, Apache. and we have created a DB.
    3.On the server we have created the folder Run / Go, where I have uploaded dsk.zip (unzipped) as you put in the documentation.
    4. In the Go folder I have executed the Go Build command.

    In the Unity Project:
    1. We have installed the Mirror and Dedicated Server Kit files.
    2. In the GameServer scene I have left the default ports as they were, including the localhost.
    3. We have compiled the GameServer scene for Linux and uploaded the files to the server, in a folder created and called Builds.
    4. We have compiled the GameClient scene for windows and run it on the computer.

    We have done the registry steps but it doesn't work! It gives an error: Server is Down. In other words, it cannot connect.
    We have returned to the Unity edit, we have changed the IP address and we have put our server's. But it still doesn't work, it gives the same Server is Down error.

    Please clearly explain the steps to me because it took 2 days and I can't connect. It is impossible. Also, if you are very nice, you could make a video, or something clearer and more explicit.

    Thanks in advance.
     
  38. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Deployment to a server is your responsibility and we do not provide technical support for it. If you need assistance with issues related to the kit itself, please reach us via the contact form at our website and we will be happy to help. This thread is for announcements and pre-purchase questions only. Thank you!
     
  39. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    45
    Ok, thanks for answering we have solved the above. But now we have found another problem that if it seems to come from the plugin. Now it connects correctly when I log in, but when I want to create a room, I get this error:
    Client Recv: failed to connect to ip = 178.32.168.176 port = 9006 reason = System.Net.Sockets.SocketException (0x80004005): A connection cannot be established as the target computer expressly denied that connection.

    And of course, the configuration is according to that specified in the documentation. What could be the problem? Thanks.
     
  40. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    45
    Hi mate, I asked you for a solution for this plugin. You call it Dedicated Server, but the connection to the Dedicated Server doesn't work! I need a specific video or application, permissions, etc. This is not to just leave it like that and nothing else, you have to verify it in Dedicated Server first. Have you verified it? If so, please leave me all the details to make it work on Dedicated server. If you need, I give you access to my server so that you can leave me the configurations made, so I can know how to do them. The server is ready for this.
    Thanks
     
  41. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Not sure what you are referring to specifically with regards to video/application permissions, as there is no such thing in the kit. The error message you mention does not come from the kit, but from the underlying .NET sockets library used by Mirror and is pretty clear: "A connection cannot be established as the target computer expressly denied that connection." (e.g., see this forum thread answered by the developer behind Mirror). So that exact address/port is not remotely accessible, which again has nothing to do with the kit but with your remote server's configuration. The most common cause (but not necessarily the only one) is a firewall blocking that port, but it is impossible for me to tell as I have no control over your server.

    Of course, the kit has been tested and is known to work; you can easily confirm this by testing on your local machine. As I mentioned originally, and sorry to insist on this: Deployment to a server is your responsibility and we do not provide technical support for it. If you need assistance with issues related to the kit itself, please reach us via the contact form at our website and we will be happy to help. This thread is for announcements and pre-purchase questions only.

    Having said that, I am currently working on adding a step-by-step guide to the documentation explaining how to deploy the kit to a Digital Ocean droplet (similarly to what I did with Master Server Kit) to showcase the process on a specific provider to act as an official example.
     
  42. Acatist

    Acatist

    Joined:
    Jun 7, 2016
    Posts:
    45
    Ok... Thanks
     
  43. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    The Digital Ocean setup guide is now available here. It should hopefully be helpful as a general reference on how to deploy the kit to a remote server.
     
  44. Divyansh_K

    Divyansh_K

    Joined:
    Jul 25, 2017
    Posts:
    4
    Hello @gamevanilla, We are planning to buy this kit just for the purpose of using its room listing features. We just want the feature where a user creates a room, the room gets added to the list of available rooms and players can join the room by selecting from that list. Also, the room must be destroyed automatically when all players leave, so basically what exactly photon does already. We don't want to use or set up authentication, MySQL, and a go server. Can your kit work without these features?
     
  45. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    The kit assumes the authentication of players. You could remove this feature, but please note you would need to do that on your end.
     
  46. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    please do
     
  47. mahmoudsaberamin

    mahmoudsaberamin

    Joined:
    May 25, 2017
    Posts:
    12
    Hello, I am familiar with Master Server kit.
    Can I create a game server in Dedicated server kit with go runtime?
    and can you tell me roughly how big this runtime is in terms of MBs or the demo game server size?
    Thanks
     
  48. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    I prefer to stay away from specific numbers, because they will depend on the capabilities of your server. Having said that, a Go process will certainly be more lightweight than a Unity instance. This only affects the dedicated server itself, though; by default, every game server instance will be a Unity instance.
     
  49. DunanStar

    DunanStar

    Joined:
    Jun 23, 2016
    Posts:
    12
    I am not an advanced server developer.
    But you can use about Photon.
    I'm going to develop a 3D online chat app now.
    It's a system that shows the room list in the lobby and allows users to enter and talk to the room they like.
    Can I make these things easily with your asset?
    Do I need knowledge of Go language?
     
  50. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    The kit provides the functionality to create game rooms but no chat features. Generally speaking, anything that happens inside the rooms (usually a game, but in your case a chat) needs to be implemented by you; generally using Mirror. How easy that will be for you is something I cannot answer myself.

    The server is written entirely in Go, so if you want to understand it or modify it you will need to know the language. It is a very easy language to pick up, though!
     
Thread Status:
Not open for further replies.