Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

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

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

  1. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Hello! I am glad to announce the release of Master Server Kit:



    Asset Store link

    Official documentation

    Master Server Kit is a complete library that allows you to host your UNET-based multiplayer game on a dedicated server.

    While developing CCG Kit, I found there were no readily available solutions for managing a dedicated server setup with UNET-based games, so I started work on developing my own. Master Server Kit was born out of the realization that such a library could be useful for a wide variety of games.

    Why?

    If you are using UNET as the networking library for your game, Unity Multiplayer Services are an excellent way to get player-hosted games up and running without worrying about the details of setting up your own server infrastructure. But, sometimes, you just 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, 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."

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

    Features

    Master Server Kit provides the following features:
    • Player registration and authentication (which can be bypassed if desired).
    • Guest mode.
    • Support for both world-based and room-based games.
    • Matchmaking supporting public and private games. Independent game server instances are dynamically spawned and destroyed as needed.
    • Zone servers that allow you to distribute the game server load across different machines (useful for load balancing or region-based matchmaking).
    • Player properties system that can be used for implementing currencies and achievements with persistent storage in a database. Default implementations are provided for SQLite, MongoDB and LiteDB.
    • Chat with support for public and private messages and an unlimited number of channels.
    • Complete and extensively documented C# source code. Customers have access to the private repository of the project.
    • Compatible with games using UNET, including games that use the Network Manager component.
    • Includes demo that showcases the functionality of the kit.
    How does it work?
    1. Players log into the master server, which handles authentication in a secure way (this step can be bypassed if desired).
    2. Once successfully logged into the master server, players can create new matches or join existing ones.
    3. The zone servers register themselves into the master server and provide a flexible way of distributing the server load across different machines. This can be used to implement load balancing and region-based matchmaking mechanisms.
    4. The player's data is persisted into a SQLite/MongoDB/LiteDB database. This can be used to implement currencies and achievements.
    The master server, the zone servers and the dynamic game server instances are all separate Unity instances, which you can freely setup on your server or even distribute across different server machines as needed.

    As I have been doing with CCG Kit, I plan to release new updates often adding new functionality to the kit. If you have any suggestions, please do not hesitate to let me know! I want the kit to be as generally useful as possible and in that regard consider the community's feedback to be a driving force in its development.
     
    Last edited: Mar 14, 2017
    tequyla likes this.
  2. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    293
    Look cool. Do you have any sample of game logics that are controlled by Master Server?
    And, what if I used other suthoritative service like BrainClound to log users in? Can it go with your kit?
     
  3. gamevanilla

    gamevanilla

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

    Master Server Kit is mostly focused on the backend side of things (i.e., "everything that is not the game itself"). Meaning authentication, player profiles, matchmaking, etc. In that regard, the user is responsible for writing the game logic. The included demo is a complete example showing how all the features work in practice.

    Having said that, there are some features (like the chat, which I am currently working on for the next update, or the ability to access the players' storage to save game-specific data) that are also useful for the game itself and I am always going to implement them in the demo so that users have a useful reference on how they can use them in their own games.

    I am not familiar with brainCloud, but after looking at their website it seems to me like it should be doable to adapt the kit to use their authentication system. As the kit comes with the complete source code included, you can always make use of just a subset of the features provided and avoid/adapt the rest as appropriate for your use case.

    I hope this answers your questions! :)
     
  4. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    293
    Do you have any document or sample how to sync variables, mecanim .. and so on.
    I couldn't find any of them on API page! And you should probably integrate with BrainCloud.
     
  5. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    The goal of Master Server Kit is to help you deploy your UNET-based multiplayer game on a dedicated server, effectively bypassing the need for the relay servers/matchmaking/player-hosted games provided by Unity Services. It really has nothing to do with syncing variables or Mecanim animations; you would do that with UNET in your game code.

    Say you have a multiplayer, room-based board game. If you use UNET and Unity Services, games are hosted by one of the players acting as the server and players are connected directly to each other in a peer-to-peer fashion by making use of Unity Services' relay servers and matchmaking. Which may be great already, depending on your requirements! But if you want your games to be hosted on a dedicated server instead (e.g., you need your game logic to be completely authoritative or need to be in total control of your backend; I explain this in more detail in the official documentation), then you have to implement your own matchmaking facilities. This is where Master Server Kit can help you: by providing a centralized matchmaking system so that you do not have to worry about this and can focus on your game instead. Additionally, it provides useful features such as authentication and player data storage.

    I am focused on extending the core features provided by the kit (rather than third-party integrations) at the moment, but thank you for your suggestion and noted! :)
     
    Last edited: Oct 15, 2016
  6. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Hello! I have just submitted the first update to Master Server Kit (version 1.01), which implements public and private chats with an unlimited number of channels. I have also added new in-lobby and in-game chats to the included demo as an example on how to use this new feature, as you can see in the following screenshots:





    The update should be available on the Asset Store in a few days, but if you would like to have it earlier just contact me privately with your invoice number and I will send it to you. :)
     
  7. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    And version 1.01 is now available on the Asset Store! I am currently working on 1.02, which will provide an easy way to use a different database for storage (as several users expressed interest in having other options than MongoDB). The kit will provide default implementations for SQLite and MongoDB.
     
  8. Funny-Face

    Funny-Face

    Joined:
    Nov 6, 2013
    Posts:
    17
    Hi. Looking cool.
    I have a question: If I want only matchmaking without authentication or database - can I do this with your package?

    Thanks in advance.
     
  9. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Thank you! That is an interesting use case and something that can be definitely done. With a very minor modification to the existing code you could bypass the authentication step today (I would be happy to guide you), but I will also implement an explicit mechanism to do it in the next update.
     
    moco2k likes this.
  10. moco2k

    moco2k

    Joined:
    Apr 29, 2015
    Posts:
    289
    Sounds promising. :)

    I would also be interested in having one central server to control matchmaking to avoid unity matchmaking without the need for authentication. Then, the matchmaking could be used to find both player hosted matches and maybe some "official" dedicated game servers.
     
  11. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Thank you! I just finished the work on supporting different databases for storage and will implement an explicit way to disable authentication next. Both features will be included in the next update.
     
  12. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Hello! I have just submitted a new update to Master Server Kit (version 1.02). These are the release notes:
    • Generalized database support for player data storage and added three default implementations: SQLite, MongoDB and LiteDB.
    • Added configuration flag to enable/disable authentication.
    • Players cannot be logged in the master server more than once at the same time with the same credentials now.
    • Improved the behavior of UI dialogs in the accompanying demo.
    The update should be available on the Asset Store in a few days, but if you would like to have it earlier just contact me privately with your invoice number and I will send it to you.
     
    LostPanda likes this.
  13. NebuTube

    NebuTube

    Joined:
    Oct 26, 2016
    Posts:
    7
    Ok nice 30 dollars -_-. Nobody used this and you give it so high price! Of course 30 dollars isn't many, if it's works, but how we can know works this or no?
     
    Last edited: Oct 31, 2016
  14. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    7,333
  15. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
  16. CurtisMcGill

    CurtisMcGill

    Joined:
    Aug 7, 2012
    Posts:
    36
    I picked up the package and followed the docs.

    - I was able to get your demo working.
    - I Changed path in configuration.cs
    - I have Unity 5.4.2f2 personal
    - I am using Windows x86/64


    I am unable to compile the packages from the Window-> build all.

    This is the error I get on all on all 4 items.
    ArgumentException: The Assembly System.Configuration is referenced by System.Data ('Assets/MasterServerKit/Core/Plugins/System.Data.dll'). But the dll is not allowed to be included or could not be found.
    UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:146)
    UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:184)
    UnityEditor.BuildPipeline:BuildPlayer(String[], String, BuildTarget, BuildOptions)
    Builder:BuildGameClient() (at Assets/MasterServerKit/Demo/Scripts/Editor/Builder.cs:47)
    Builder:BuildAll() (at Assets/MasterServerKit/Demo/Scripts/Editor/Builder.cs:56)
     
    Last edited: Nov 9, 2016
  17. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    First of all, thank you for your purchase! :)

    The latest version of the kit, 1.02, needs the Api Compatibility Level option in Build Settings/Player Settings to be changed from .NET 2.0 Subset to .NET 2.0 (this is required by the default SQLite database implementation). You can find more information here. Please let me know if this helps.
     
  18. CurtisMcGill

    CurtisMcGill

    Joined:
    Aug 7, 2012
    Posts:
    36
    That fixed the problems, thanks for your help. I am will finish going through the documentation and if I have questions, will post them.
     
  19. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    That is great to hear, Curtis! Definitely do not hesitate to let me know if you have any questions or run into any issues and I will be happy to help you. In these early stages, feedback is very valuable to me as it helps drive the development of new features and improvements.
     
  20. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Hello! I have just submitted a new update to the Asset Store (version 1.03). These are the release notes:
    • Implemented player properties API.
    • Updated demo's UI.
    • Fixed bug that caused spawned game server instances to not be properly destroyed sometimes.
    The player properties API is useful to store game-specific data on a per-player basis (e.g., number of coins, gems, etc.). It works transparently with all the included database implementations.

    The update should be available on the Asset Store in a few days, but if you would like to have it earlier just contact me privately with your invoice number and I will send it to you.
     
    LostPanda likes this.
  21. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    102
    @Spelltwine-Games this great assets! I have a question: Can you provide an example of a voip?
     
  22. gamevanilla

    gamevanilla

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

    I am not experienced with VoIP, but from what I have gathered it is an area where it is probably best to leverage a specialized solution.
     
  23. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    102
    Thank you for your reply! But can you make a voice chat case, if possible? Because this is more difficult for most people.
     
  24. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    I will add it to my list of things to research in the future but, as I said, it is not an area I am personally experienced with so I am not in a position to make any promises in this regard. I still think VoIP is a complex enough feature that it probably warrants integrating a specialized, proven solution rather than building your own from scratch.
     
  25. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    102
    thank you for your suggestion!
    :)
     
    gamevanilla likes this.
  26. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Hello! Version 1.03 of Master Server Kit is now available on the Asset Store. These are the release notes:
    • Implemented a player properties API.
    • Updated the demo's UI.
    • Fixed bug that caused spawned game server instances to not be properly destroyed sometimes.
    I am currently working on version 1.04 and extending the official documentation. Thank you for your excellent feedback, it really helps to continue improving the kit with every new update! :)
     
    LostPanda and swissjosh like this.
  27. swissjosh

    swissjosh

    Joined:
    May 31, 2014
    Posts:
    54
    Very nice, this would be perfect for my upcoming game, can't purchase it right now tho. :rolleyes:
     
    gamevanilla likes this.
  28. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    102
    run server.js error(mongod is running...):

    cmd show:

    D:\Node\nodejs_mongodb_server>node server.js
    events.js:85
    throw er; // Unhandled 'error' event
    ^
    Error: listen EADDRINUSE
    at exports._errnoException (util.js:746:11)
    at Server._listen2 (net.js:1146:14)
    at listen (net.js:1172:10)
    at Server.listen (net.js:1257:5)
    at EventEmitter.listen (D:\Node\nodejs_mongodb_server\node_modules\express\lib\application.js:617:24)
    at Object.<anonymous> (D:\Node\nodejs_mongodb_server\server.js:27:5)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

    @Spelltwine-Games

    ok ,modify config.js --config.dbURI = 'mongodb://localhost:27017';

    run server.js no error and show:

    D:\Node\nodejs_mongodb_server>node server.js
    Mongoose connected to mongodb://localhost:27017

    build masterserver,gameserver,authserver and run, client run and register but cant join server.

    @Spelltwine-Games can you add step by step tutorial? thanks very much!
     
    Last edited: Nov 23, 2016
  29. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Thank you for your feedback, LostPanda! Please note the Node.js server is only needed if you want to use MongoDB as the database for storing the players' data (SQLite and LiteDB implementations are also provided, with SQLite being the one used by default). I am currently extending the official documentation with more detailed information on how to get started and a step-by-step tutorial and will let you know once it is online. Admittedly, it can be a bit difficult at first to understand how all the pieces are working together.
     
    Last edited: Nov 23, 2016
    LostPanda likes this.
  30. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    102
    thanks! wait for documentation ;)
     
  31. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    102
    @Spelltwine-Games thanks doc ! follow your doc running is ok but i found bug:

    when player create lobby and other player join lobby then exit lobby. An error occurred when logging in again.
    MessageWindow show “This user is already logged in”!

    In addition,can you tell me db path(use your default setting)?Because I can not see the database table. thanks very much!

    add: sorry, i found my db in "
    Code (CSharp):
    1.  
    2. var documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
    3. var dbPath = "URI=file:" + documentsPath + "/" + databaseName + ".s3db";
    "
     
    Last edited: Nov 24, 2016
  32. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    I am happy to hear the new documentation is helpful! :)

    The only way the "This user is already logged in" scenario happens as far as I can tell is if you close the master server without closing all the open game clients first. Which should only happen when testing things locally on your development machine, where several windows are open at the same time and you may close them in the wrong order or too fast, and never in a production environment. Having said that, in the next version I plan to reset the "logged in" state for all the users automatically when launching the master server as a precaution.

    I will also make the database path more easily configurable.

    Thank you for your feedback!
     
    LostPanda likes this.
  33. Moonstorm

    Moonstorm

    Joined:
    Jul 26, 2012
    Posts:
    19
    This is awesome dude. Great work. Can't wait to give this a spin!

    Quick question: Which server does chat operate on? I'm assuming the master server. Also is the matchmaking custom or can we leverage UNET's matchmaker?
     
  34. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    102
    thanks!:)
     
  35. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Thank you!

    The chat is an independent server component, so it can be plugged into both the master server and the game server. The accompanying demo exemplifies this by using a general chat in the lobby screen (master server) where all the connected players can communicate and a game-specific one in the game screen (game server) that is limited to the players connected to that specific game/match/room.

    The matchmaking is completely custom. It is not possible to leverage the one provided by Unity Services because it is built around their relay servers and player-hosted games, while the one in Master Server Kit is specifically built for dedicated server scenarios. Having said that, it provides very similar functionality.
     
  36. FuTou

    FuTou

    Joined:
    May 2, 2015
    Posts:
    49
    Hey, sorry if I'm not a professional, but we are using .net framework in this kit, so how exactly were we able to host it on linux?
     
  37. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    You can build a Unity project for Linux. I do this with the accompanying demo (in headless mode, meaning no graphics which is particularly convenient for a server), which I host on a Digital Ocean VPS running Ubuntu 16.04.
     
  38. FuTou

    FuTou

    Joined:
    May 2, 2015
    Posts:
    49
    This is just what I want for months! Great job! I've bought it without hesistation.
    And: Could you give a step-by-step tutorial about how to turn an existing game into Master Server status? I think this is a common question. Thank you.
     
  39. FuTou

    FuTou

    Joined:
    May 2, 2015
    Posts:
    49
    I want to ask for a guide because sometimes I don't even see the Master Server Kit option in the "Window" menu... And I've been troubled.
     
  40. FuTou

    FuTou

    Joined:
    May 2, 2015
    Posts:
    49
    I love your asset so much, that I'm trying to figure it out even it's my first day to look at it.
    Aside from the [Master Server Kit option missing] issue above, I encountered another one like in the picture, do you have any idea?
    微信截图_20161125195934.png 微信截图_20161125200009.png
    Actually in the screenshots you can see there are already right folders aside them.
     
  41. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Thank you for your purchase and your kind words, FuTou! :)

    I am currently working on the integration of Master Server Kit in CCG Kit (which uses UNET and Unity Services) and I definitely plan to add more information to the official documentation about how it can be done. I hope it will be useful for all the users that are currently leveraging UNET's high-level API together with the matchmaking facilities provided by Unity Services in their games and are interested in migrating to Master Server Kit (it is easy to do and implies no changes in the game logic, but mostly in the matchmaking calls). Please note that help with programming the multiplayer logic of the game itself is outside the scope of Master Server Kit though, as the kit is focused on game-independent functionality such as authentication, matchmaking and player data storage. In that regard, the game itself is responsibility of the user.

    The accompanying demo comes with complete source code included and acts as an official reference on how the functionality of the kit can be used.

    There is a detailed step-by-step guide on how to build the demo in the official documentation.

    You should definitely see the Master Server Kit option in the Window menu after importing the package into your project. Are there any errors on the console? Regarding the "Data folder not found" error, I believe you should try deleting those folders and rebuilding everything (making sure there are no errors in the process).
     
    Last edited: Nov 25, 2016
  42. JessieK

    JessieK

    Joined:
    Feb 4, 2014
    Posts:
    145
    Hey you did it! This is awesome! I was so excited when you started talking about this a while back super glad to see it's set up right, will certainly be checking this out and recommending it to people for other projects, it looks perfect.
     
    gamevanilla likes this.
  43. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Thank you for your kind words, Jessie! :)
     
  44. FuTou

    FuTou

    Joined:
    May 2, 2015
    Posts:
    49
    Hey man, thank you for the reply!

    1. For the [Master Server Kit option missing] issue, there was some fatal errors shown in red, but after some jibber jabber operations, it went away. But I bet the issue isn't a special one, and I'll let you know if I see it again.

    2. For the [integration tutorial], for me the most important part is about building game server. When using UNET, basically I've written the "server" logic in the game. But is there any additional stuff that I should do to build a game server? Should I include the game client scenes when building game server?

    3. The error "there should be 'MasterServer_Data' folder next to the executable" happens when I build with "window=>Master Game Kit=>Build All". Please note I'm using 5.4.3, and if I build the scenes separately, the build won't have such an issue.
     
  45. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Happy to hear that! Definitely let me know the details if this is something that you can reproduce consistently.

    It really depends on how the game is written but, generally speaking, the game server will be a scene with no graphics at all with the sole responsibility of managing the logic of a game/match/room, so no client-related scenes should be needed at all (you can see this is what I am doing in the game server of the accompanying demo). The kit provides you with two base classes, GameClient and GameServer, that you can subclass to implement any additional functionality specific to your game. Please feel free to contact me privately with more information about your game so I can point you to more specific parts of the kit and the demo.

    The menu option generates 64-bit Windows binaries by default. Maybe that is the cause of your issues? You can change the platform in Demo/Scripts/Editor/Builder.cs.
     
  46. FuTou

    FuTou

    Joined:
    May 2, 2015
    Posts:
    49
    The original game was a typical UNET game. Each player can gain resource, and can use the resource to spawn soldiers. So the case was that one player is both a client and a server(which manages player resource amount, and soldier HP's), and other player are clients.
    The ideal result I get with Master Server Kit will be:
    1. I get a game server build from the project (I kinda know the process, but want to know if the game senes should be included when building this. Or if I use the "Build All", is there special configuration I should do?)
    2. The game server runs on an AWS machine, and is managed by the Master Server(this part you've explained in the docs)
    3. The game server handles resource amount, and soldier HP's. (the HOW part I want to know about)
    4. From there on , no players device should manage the important stuff like HP any more, they don't act as "server" no more.(the HOW part I want to know about)


    I'm also using a Win64 machine, so that should not be the cause? Tomorrow I'll restart and see whether that helps.

    Also, since the docs are not fully implemented, I may want to read your fabulous code, which would be an excellent learning source to me! Which class should I start from? Could you briefly talk about the classes?
    Thanks again!
     
  47. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    You are asking about game-specific logic (resources, HP, etc.). It is really up to you how you decide to implement it; as I said before Master Server Kit will not help you with that. It is focused on game-independent functionality like authentication, matchmaking and player data storage.

    Let me know how it goes!

    I am currently working on adding more information to the official documentation discussing the code architecture and the main classes in more detail. The source code is documented and the best starting point is probably the MasterServer class, as it is the one in charge of the matchmaking logic and spawning/destroying game server instances as appropriate.
     
  48. FuTou

    FuTou

    Joined:
    May 2, 2015
    Posts:
    49
    I guess why I asked this was : is this "game server" in the Kit only handling data transferring? Like the MM server used by UNET? (by default) Or was it designed to act as a "headless" authoritative client (like the client creating the game) and can handle the logic with no graphics?

    This is definitely great news! Guess these days will be crazy and busy, but I think this is really something, and it could help a lot of people like myself!
     
  49. FuTou

    FuTou

    Joined:
    May 2, 2015
    Posts:
    49
    To explain my question further, let's look at this button in UNET below. Let's imagine: if the MSK(master server kit) can make a game server that is basically running as this "Server Only"(which will automatically handle all the important information for the typical UNET games) . Then integrating would be simpler and faster than ever, wouldn't it?
    微信截图_20161126002811.png
     
  50. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    691
    Oh, I see what you mean. The idea with a dedicated server setup is generally for the game server to be authoritative and drive the logic of your game, but I guess you could technically do something similar to player-hosted games and use the game server only as the medium through which players communicate between themselves? After all, you are in complete control of what goes in your game's game server.

    The early days after a new release are always a bit crazy indeed, but so far the feedback has been really awesome and I sincerely appreciate it! It only helps to make the kit better. :)