Search Unity

[Released] Master Server Kit: create your own UNET-based dedicated server

Discussion in 'Assets and Asset Store' started by gamevanilla, Oct 14, 2016.

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

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    why two different way to do the same thing ?
     
  2. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    They are actually used in different contexts, but both clients derive from the same base class, which has a username property for convenience.
     
  3. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    Hello,
    This is a message for the kit's users:
    Did someone succed to test the users dataBase using PhpMyAdmin ?

    I am running Uwamp 3.1.0 to test the dataBase.
    When i try to register, i got nothing, no callBack no errors, nothing.
    Before switching to MySQL Workbench and MySQL Notifier as suggested by David.
    I would like to know if it is even possible to use PhpMyAdmin for dataBase management ?
    I would like to use it instead of workbench as i know it better.

    Any idea what could go wrong ?

    thx
     
  4. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    Ha ha....
    Nodody, ok. Does anybody used it in production yet ?
    Anyway, I am in a hurry, so installed workbench.

    and i must say : It works out of the box!

    Wanted to ask:

    1 - why you make two more tables : "int_property" and " string_property" ?
    2 - Is there a way to retrieve the masterserverkit.user.id ? so i manipulate with the id number instead of name.
     
  5. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Happy to hear that!

    Players can have associated data, which are basically integer and string key/value pairs. These tables store that data.

    Not provided by default, but you could easily extend the code to do that if you really need to.
     
  6. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    Could you explain a little bit more the use of "int_property" and " string_property" please?
    Give an example when it is actually used or could be used ?
     
  7. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Sure thing! For example, consider the following scenarios:
    • A F2P game needs to store the number of virtual coins the player has, which are used to purchase in-game goods. You could use an integer property named "coins".
    • A SimCity-like game needs to store the name of the virtual city managed by the player. You could use a string property named "city_name".
    Does this help?
     
  8. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    1- take the F2P game, what are "coins" a new columns in 'user' table ?
    2- can you give a code example ?
     
  9. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    No, integer/string properties are separate tables. A player can have 0 or more properties. You can look at the specifics of how the data is created in the appropriate database provider code.

    Code (csharp):
    1. DatabaseService.SetStringProperty(playerName, "city_name", "my_city", success => { Debug.Log("Success!"); }, error => { Debug.Log("Error!"); });
     
  10. denisebr

    denisebr

    Joined:
    Jun 19, 2014
    Posts:
    6
    version GLIBCXX_3.4.15 not found
    in Centos 6.0

    how did I solve this?
    I'm looking for on the google but cannot solve this.
    Please help.
     
  11. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    The error means you need to install a more recent version of GLIBC on your system in order to be able to run a Unity binary. You can find more information about it here.

    I suggest using a more up-to-date OS like Ubuntu, which will work fine with no additional installation steps.
     
  12. denisebr

    denisebr

    Joined:
    Jun 19, 2014
    Posts:
    6
    I install ubuntu.
    Run the server.
    ./master_server.x86_64 & ./zone_server.x86_64 &
    But I can't connect.
    I build
    Master server
    Zone server
    GameServer
    separately.

    And them I build the rest, and try to connect in my computer.
    I disable ubuntu firewall.
    But it's not working :/



    Edit: I click create game, and message keeps forever CREATING GAME :/
    We can chat but can't create games
     
    Last edited: Jul 25, 2017
  13. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Is the name of the game server binary specified in your zone server component the same name as your Linux game server binary (game_server.x86_64)?
     
  14. denisebr

    denisebr

    Joined:
    Jun 19, 2014
    Posts:
    6
    yes.
    zone_server.x86_64
    master_server.x86_64
    game_server.x86_64
     
  15. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Could you please send more detailed information about your exact setup to the support email?
     
  16. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    From now on, I would really appreciate it if we kept this forum thread for announcements and pre-purchase questions only. If you have a technical support request or want to report a bug, please do so by reaching me at the official support email address (with your invoice number) or alternatively via the official private repository.

    Thank you!
     
  17. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Running this means we are running a Unity instance on the master server, correct?

    If so, then this asset has additional overhead running the Unity engine compared to running a master server that does not require the Unity engine. Please correct me if wrong.
     
  18. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Correct. It is highly recommended to run the servers in headless mode in order to help reduce the overhead. There is an official UNET server library in the works that could potentially help too by making it possible to migrate the servers from Unity instances to console applications in the future (I say "potentially" because the details are not yet known).
     
  19. abgamers

    abgamers

    Joined:
    Dec 22, 2009
    Posts:
    97
    Hi not sure why but my "GameClient_Game" scene is not opening at all.

    it was working in the out of the box solution but when i added everything on my cloud server, the respective "GameClient_Game" scene is not loading. but the chat is working fine.

    Its shows message "creating game"

    is the zone server unable to populate the game scene on the server, what would be the reason for this?


    Thanks in advance
     
  20. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    The usual culprit is not changing the Path to binary field in your Zone Server component so that it contains the exact name of your game server binary. This field points to GameServer.exe by default, but if you are building for Linux so that you can upload the binaries to the cloud you will need to change this to GameServer.x86_64, game_server.x86_64 or, more generally speaking, the exact name of your game server binary for Linux.

    If this does not help, please reach me at the official support email address with your invoice number and I will be happy to further investigate your issue. I am trying to keep this forum thread for announcements and pre-purchase questions only.
     
  21. abgamers

    abgamers

    Joined:
    Dec 22, 2009
    Posts:
    97
    Thanks for replying, we have made sure to add the exact file name which is GameServer.x86_64 in the ZoneServer scene. but still its not able to connect. while debugging i found that it goes in a ping loop trying to get the proper response from the respective server. after X time it though error msg.
    will be send the mail soon with the purchase invoice number.


    To test MasterServer working, I'm using the Demo scene provided with the plugin.
    Just made the added my linux server IP's, Port's & GameServer.x86_64 instead of GameServer.exe in ZoneServer scene.
     
    Last edited: Aug 4, 2017
  22. sarah22

    sarah22

    Joined:
    Aug 6, 2017
    Posts:
    15
    Hello,

    I'm interested in buying your kit but before that I have few questions.

    1. Does the matchmaking feature queue up the user just like in PUN? So it's like first come first serve
    2. Does it support PostgreSQL?
    3. Does it support multiple nodes like having multiple servers and the kit will just handle it automatically?

    Thank,
    Sarah
     
  23. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Definitely do not hesitate to reach me with more detailed information about your setup and I will be happy to investigate further.
     
  24. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Thank you for your interest, Sarah!

    There is currently no queuing happening; the matchmaking is mostly equivalent to the one provided by Unity Services (with some additions), where the player is sent to the game scene immediately after creating a new game or joining an existing one.

    Being able to have players wait in a queue until a minimum number of players is reached (and/or they all set themselves as "ready") is something that I plan to do in a future update.

    PostgreSQL support is not provided by default, but it should be pretty doable to add taking as a reference the existing implementations (SQLite, MySQL, LiteDB and MongoDB).

    Yes, it does. The way the kit is structured provides you with a flexible mechanism to handle multiple servers. You can have a look at the official documentation to see how everything works together.
     
  25. tech247

    tech247

    Joined:
    Jul 2, 2013
    Posts:
    60
    Hello,
    Can anyone help us with regards to Setting up Zone server on Ubuntu server to run Master server kit perfectly.

    Please provide links for more info. Thanks
     
  26. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    There is a step-by-step guide in the official documentation showing the process for a Digital Ocean Linux VPS. The details will of course vary depending on your scenario, but it can be helpful as a starting point.
     
  27. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Hello! Version 1.14 of the kit is now available on the Asset Store. These are the release notes:
    • Implemented custom logger component as a better alternative to Debug.Log for debugging.
    • Added the ability to specify the name, number of players and properties of games created via the "play now" functionality.
    • Added the ability to specify default values when retrieving player properties from the client side.
     
  28. Stefan90

    Stefan90

    Joined:
    Feb 2, 2014
    Posts:
    4
    Hi Spelltwine-Games,

    Firstly, thanks for very good Unity adon. I have one question that is very important for me: how can server (for example on "Command" function in some my script) communicate with database. My idea is to protect some data from client and that communication would be only between server and database.

    Thanks in advance
     
  29. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Thank you for your kind words!

    The kit provides a player properties system with storage into a database (with default implementations for SQLite, MySQL, LiteDB and MongoDB). Only the server can actually modify the data in the database; clients are only allowed to read from it.
     
  30. Stefan90

    Stefan90

    Joined:
    Feb 2, 2014
    Posts:
    4
    Yes, but how can I from (for example "Command" function) on some my script call some function in DatabaseService that writes(or read, does not matter) in database?
     
  31. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    There are methods in the DatabaseService class that allow you to read and write the properties. If you need any further help, please reach me at the support email address with your invoice number and I will be happy to assist. I am keeping this forum thread for announcements and pre-purchase questions only.
     
  32. dreb4o

    dreb4o

    Joined:
    Mar 29, 2015
    Posts:
    51
    can this package be combined with TPC(Opsive)
     
  33. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    I am not familiar with TPC myself but, from what I gave gathered from its official documentation, it is compatible with UNET. As Master Server Kit is intended to work with UNET-based games, it should be technically doable to combine both. I cannot say how easy it will be or if there are any gotchas, so feedback from other users who have experience with this is definitely welcome!
     
  34. dreb4o

    dreb4o

    Joined:
    Mar 29, 2015
    Posts:
    51
    I will post a topic in the Opsive forum
    there may be someone who has tried
    this package works with the standard unity(FREE) package?
     
  35. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Please do not hesitate to let me know if you find out anything and I will be happy to extend the official documentation as appropriate.

    There are no differences in engine features between the free and the paid versions of Unity anymore; the kit will work fine with any of them.
     
  36. dreb4o

    dreb4o

    Joined:
    Mar 29, 2015
    Posts:
    51
    Last edited: Sep 12, 2017
  37. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    It is probably worth it to reach that forum user and ask him about his experience combining both assets.

    He brings up a common issue when migrating games from Unity Services to Master Server Kit: the original multiplayer code may not be written in a server-authoritative way and therefore may need fixing in order to properly work with the kit. This happens because Unity Services has no dedicated server (the host player acts like the server and a client at the same time instead) so, depending on how the multiplayer code is written, some assumptions may not hold true in a dedicated server scenario (i.e., when you completely separate the server from the clients). A good way to know if your UNET code works in a server-authoritative context is to test it via StartServer instead of going though the default matchmaking and player-hosted games. If it does, the transition to the kit will be seamless.
     
  38. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Hello!

    As you may have noticed, I have changed my publisher name from Spelltwine Games to gamevanilla. Do not worry; I am still the same person I was before and nothing is going to change in that regard. The only reason to do this is because this is a name I truly identify with and feel it better reflects my current work. You will find the updated information on my publisher page. Please note that the old website and support email will still work for quite some time in order to ease the transition.

    I would also like to take this opportunity to thank you for your continued support and feedback. It sincerely means a lot to me and I am looking forward to an exciting time ahead. :)
     
  39. dreb4o

    dreb4o

    Joined:
    Mar 29, 2015
    Posts:
    51
    there are many packages that are free
    or are at a symbolic price
    I bought the package and I do not know what rating to give
    1.there are no examples
    2.the documentation is too general(it's made for people who know the package)
    3.no video tutorial
    probably I'm too stupid to figure out how it works
    probably not for me
     
  40. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    I am sorry you feel that way, dreb4o. The kit comes with a complete demo and the documentation contains step-by-step guides on how to set it up and perform some common tasks with it. Please note that the kit is focused on the server backend functionality (player authentication, player data storage into a database and matchmaking) and you are responsible for writing the multiplayer logic of your game. In that regard and, as stated in the F.A.Q., familiarity with C# and UNET programming is highly recommended. Having said that, I would be happy to improve/extend the documentation as appropriate based on your feedback. In what specific areas would you like to have additional examples or documentation?

    I have sent you a demo project that contains the first steps of the official Unity multiplayer tutorials to showcase how the kit works in conjunction with a game that uses the Network Manager component and that may be useful as a starting point in case you are not familiar with UNET.

    If you have any specific questions or issues setting everything up, please do not hesitate to reach me via the support contact form and I will be happy to help.
     
  41. Revivers

    Revivers

    Joined:
    Sep 22, 2017
    Posts:
    1
    Can you send me the same demo that contains the first steps of the official Unity multiplayer tutorials?
    I have had similar problems, I understand all more or less but when trying to implement the tutorial of unity with the master server kit I had some doubts.
    But for the rest, I am quite happy with everything.

    I can pm you my invoice number if you need it.
     
  42. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Absolutely! Please reach me with your invoice number privately and I will send it to you.
     
  43. Zaladur

    Zaladur

    Joined:
    Oct 20, 2012
    Posts:
    392
    <redacted>

    Went through the proper channels for support. Thanks.
     
    Last edited: Oct 15, 2017
  44. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Thank you for your purchase! As this forum thread is exclusively for announcements and pre-purchase questions, please reach me here and I will be happy to assist further.
     
  45. ANIMAPRO

    ANIMAPRO

    Joined:
    Nov 11, 2017
    Posts:
    5
    Hi
    I bought the tutorial:
    I follow the steps from the documentation:
    * Run In Background
    * NET 2.0 Subset to .NET 2.0
    * binary path I left GameServer.exe and tried pasting all path to file in Windows 10.
    * I left the IP becouse I want to try your demo on localhost.
    * Build All

    and
    when I opened GameClient.exe there is error "Could not connect to master server"

    Do I have to do anything else to make the demo run on localhost?

    I found answer: Before I launch master server and zone server and escape and then I play client and it not works. Now I launch master and zone and I left it enabled ofcourse!
     
    Last edited: Nov 12, 2017
  46. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Thank you for your purchase and happy you found the problem! That is right; both the master server and zone server need to be always running in order for everything to work correctly.
     
  47. Luiz_Thiago

    Luiz_Thiago

    Joined:
    Feb 27, 2013
    Posts:
    32
    I bought your Asset, and I'm sure it will solve my problems... But I do not have much experience in UNET (I just used Photon for my projects), and I have a question: How should I communicate between Client and Game-Server? Sorry if this doubt is basic...
     
  48. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Thank you for your purchase, Luiz! There are several ways to communicate between the server and the clients: from network messages to high-level constructs. I highly recommend studying the official UNET tutorials and manual; in that regard, the kit is focused on the authentication, player data storage and matchmaking functionality and does not impose any restrictions on the game side (i.e., any of the aforementioned methods will work exactly the same as when using Unity Services).
     
  49. Luiz_Thiago

    Luiz_Thiago

    Joined:
    Feb 27, 2013
    Posts:
    32
    thanks for the answer! but what is confusing me is that Unet uses the same scene and even the same scripts for the client and the server, but in your demo, you use a separate scene as a server, and that's what I did not understand...
     
  50. inspection_artc

    inspection_artc

    Joined:
    Jun 27, 2017
    Posts:
    2
    Hi there, May I know whether this kit supports HoloLens? Many thanks!

    Need to build a server on a windows PC, with HoloLens as a client.
     
Thread Status:
Not open for further replies.