Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Master Server Framework

Discussion in 'Assets and Asset Store' started by alvyxaz, Sep 11, 2016.

  1. Ziron999

    Ziron999

    Joined:
    Jan 22, 2014
    Posts:
    262
    alvyxaz likes this.
  2. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Haha! I still need to make the framework easier to use and less confusing to become one ;)
     
  3. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    469
    Hello, I am very interested in the framework :D

    But since I am not really a well versed programmer,
    I learn way faster from examples and demos.

    What kind of demos do we get?

    Registering?
    Log in/out?
    Adding/Subtracting Profile values? (Such as currency, energy, level, exp, etc)
    Shops? (Subtract currency, add item)
    Inventory? (Saving/Loading Inventory Items)
    Consuming consumable items?
    Lobby?
    Matchmaking?

    I think this alone will decide how valuable this tool will be for low experienced programmers like me to jump right into your framework and play around with it.

    Additionally,
    I am not familiar with NoSQL, how easy it is to monitor/edit the currently existing database?
     
  4. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    To Gekigengar

    Hey!

    Lobby and matchmaking will be included in the release I'm aiming to release shortly.

    Consumable items and inventory - these things are too "game specific", but I might include them later (no guarantees yet).

    I'm planning to add basic shop functionality at some point, but at the moment it still has no "exact spot" on the roadmap - I need to gather more requests from customers.

    For other features, yes, there's an example :)

    The framework is only a framework to help you with master server development. It's expected that customers are able to extend the functionality on their own, to make it fit their game.

    Regarding the NoSQL, current db solution I've included to the framework has no means to monitor the database, as it's meant only as a placeholder for rapid development. If you want, you can write your own implementations with MySQL and etc. I initially thought that people might share their implementations for interactions with other databases, but it might be a bit too early for that.

    So to conclude, at it's current state, the framework might be a bit "tough to figure out" for someone who doesn't have much experience with networking, but it's my goal to make it as simple and easy to use as I can :)
     
    Last edited: Oct 28, 2016
    Gekigengar likes this.
  5. alteregogi

    alteregogi

    Joined:
    Apr 13, 2015
    Posts:
    8
    helo , look interesting.
    i've a question about lobby ( actually i'm new on networking stuff ), i've a project that need to run on Local Multiplayer, matchmaking and other standard local lobby like COD, so there's no dedicated online server like VPS, because it's only local multiplayer game that connect all client in the same network, is it possible with your plugin ? currently we are using UNET for our networking.

    thank you!
     
  6. Noqomo

    Noqomo

    Joined:
    Aug 24, 2013
    Posts:
    7
    Hi,

    In the 'Room Demo', how do I prevent the spawner server from launching another game client?

    When you create a room from a client instance, it launches a second client window which you can move your character around in with the previous client window then acting as the spawner server.

    Many thanks.

    - Noqomo
     
  7. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey!

    The main purpose of master server is for it to be accessed from everywhere. For this reason, it will still need to be hosted on a VPS, and there's no way to avoid it. If you want something completely server-less, then you might have to look for another solution.

    Currently, there are no means to lookup games on the same network (LAN), so the framework will probably not fit your needs :)

    I'll send you a PM shortly
     
    alteregogi and Noqomo like this.
  8. Noqomo

    Noqomo

    Joined:
    Aug 24, 2013
    Posts:
    7
    Thank you - I just realised that this forum is probably not the most suitable place to post technical questions.

    I have joined the GitHub group and will post any further questions in there!

    - Noqomo
     
  9. pauarb

    pauarb

    Joined:
    Oct 22, 2013
    Posts:
    13
    Just found the asset today and it looks like a dream come true. This kind of framework is EXACTLY what I was looking for to attempt and prototype my game further (multiplayer game that needs to be able to have many rooms holding up to 20 people). Will want to buy it, but i'm abit afraid. There were so many networking solutions I bought and the teams just disappeared after a month or two. It feels like networking is cursed. I hope you will stay and continue working on this asset, atleast until it's out of the initial development stage :)

    Best of luck and I can't wait to see all the new things and to eventually buy it.
     
  10. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey! I'm glad you're interested, and I understand your fears regarding future of development/support.

    I think the main problem why networking is cursed is a larger amount of support needed. For example, if I made a few 3D models or some shaders, I release it to the store and that's pretty much it. Networking solutions are usually bought by people who don't have much experience with it, and in general, they have many concepts that are difficult for intermediate programmers to grasp, so they are more likely to contact you and ask for help.

    It wouldn't be that bad (it's fun helping people out), but combining multiple months of development, and the fact that 40 USD asset after unity's cut and taxes makes you less than 18 USD per purchase, throws you in a situation where you make 2 USD per hour or less. And the number of people who buy networking assets is rather small.

    I feel very passionate about this project as it's what I wanted to make for a looong time, but I already feel slightly drained after the first month of the release - most of this is due to giving too many promises for new features, which leaves me with no time to work on my own games.

    I have yet to find a way how to balance this, but I think I'll manage. After delivering the main things that I've promised, I'll focus on improving the ease of use, stability, and documentation, so that less time needs to be spent for support - things should get better after that ;)
     
  11. pauarb

    pauarb

    Joined:
    Oct 22, 2013
    Posts:
    13
    I really hope you wont completely burn out! Been going through the wiki and the implementation seems really interesting for the framework. Worst case it looks like it wouldn't be hard to expand and customize it. That's just an impression fro looking at the explanations and snippets and will need to buy it eventually to actually look at the code. If anything it looks like it has just enough of the barebone implementations that would be enough for my prototype.

    The game lobbies and queues will most likely force me to finally buy the pack ad start experimenting, haha.

    Didziausios sekmes darbuojantis :)
     
  12. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    O, ačiū! :cool:

    In the worst case scenario, I'm not going to abandon the project - it's way too valuable for me and for the games I'm working on. Instead, I'd rather release the source code for free, allowing the framework to grow further :).

    Though, this is not happening any time soon, as there's still a lot more that I want to do with it
     
    Last edited: Oct 31, 2016
    pauarb likes this.
  13. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    282
    hi
    its also possible to make a website that control the master server?
    For seeing how many online where they come?
    Better is a unity3d scene for any mobile phone to control the master server^^
     
  14. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey!

    Yes, it's possible, but you would need to do it yourself - currently, the framework has no "control panel", so if needed, developer would need to make one himself. There are plans to implement it in the future, but I can't make any promises of when it will be delivered and what features it will contain.

    There are multiple ways to control the master server through a website. You could have your web server (if it's in C#) connect to Master Server, and control it like that, or you could start an HTTP server within Unity (not sure if there are libraries for this, haha)

    For something as simple as displaying online players count, you could have your master server send an HTTP request to the web every few seconds, and update the number of online players like that :)

    It's also possible to make a unity 3D scene which would control the master server. Depending on what exactly you would need, I don't think it would be too difficult. In essence, your client could send special messages/requests to master server to, for example, ban a user, terminate the server and etc.

    Again, since these features are not yet in the framework, it would depend on your programming skills what you can make with it :)
     
    deeperthought and MrGky93 like this.
  15. deeperthought

    deeperthought

    Joined:
    Aug 7, 2014
    Posts:
    3
    I'm just starting to work on something like a control panel (in between other jobs) with a visual display of servers and maybe some options - it'll be very basic at first. I'm hoping that it can run in the editor and then maybe we can export it to webgl so you can run it on a website externally (but that's not a priority for me right now).

    I'm thinking there might be a need for another module for logging, just another exec that accepts log data from the servers (current health, server info, memload, cpuload, startedtime, connections etc) and dumps to a file - would be helpful for debugging and that could be offloaded to another server (or just on the same server as a seperate task). Would require a connection from all the other server modules though, so a bit of overhead, but probably better than logging on each module and polling from the control panel maybe? Will have a better dig through the source.

    Waiting to leave my review after the new version is uploaded - I understand about delays, better it's right than on time ;)

    Btw I'm new to unity but not c# and your code is very clean and well laid out...good stuff!
     
  16. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Thanks a lot for the compliment! I still feel like the code could be slightly improved, but I'll get there ;).

    This update is taking wayy longer than I thought, but I'm very close now. After working on the lobby for a while, I've realized that games are usually way too different to make use of a generic lobby solution. You either have to make it very simple, and not usable in more complex games, or very complicated, thus more error-prone and difficult to use.

    But since I already promised the lobby, there's no backing down, haha.

    Regarding the logging - It's actually my top priority to improve it. Unity's default logging is unbearable for a project like this. I had plans to improve it earlier, but I lost my way a bit with the lobby update. After the V1.02, I'll be mainly focusing on making the framework more "solid", which includes the proper logging.
     
    Last edited: Nov 3, 2016
    Skribble and deeperthought like this.
  17. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Alrighty, so I'm thinking about approaches to logging.

    My original plan was to make something similar to log4net / NLog, except very minimal. You'd basically call a LogManager.GetLogger(string loggerName/class name/ namespace and etc.), and call logger.Log / logger.Debug / logger.Info and etc.

    These logs would then be passed to log appenders, for example
    • Unity's console
    • UI within game
    • TCP connection (plain steam, with nothing but text)
    • File system
    When logging in file system, logs would be written to a specific folder, and each day, a new log file would be created (2016.11.03.log).

    The whole logging solution would be a separate DLL (to allow double clicking a line in unity's console to see where exactly the message is logged).

    To everyone who bought the asset - I'd love to hear your input on this. Let me know if you have any suggestions or requests ;)
     
    Skribble likes this.
  18. Sorn

    Sorn

    Joined:
    Jul 17, 2013
    Posts:
    14
    Wonderful Asset Alvyxaz!
    I was apprehensive before I bought, but after using it I'm more than pleased. Cheers.
     
  19. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Thanks! It really means a lot to me. Before the release, I feared it was going to turn into a nightmare, as this is the first piece of software I've ever released to public. I'm very very glad people like it :)
     
  20. obaideen

    obaideen

    Joined:
    Oct 11, 2016
    Posts:
    2
    Hi alvyxaz, i purchased your server , i new with networking and multiplayers, i can not run your demos out side editor mode
    the game server wich on port 7777 is not starting
    is that demos missing something???
    may you give me some instruction to how make the demos work out side editor????
    do you have another demos ????
    Regards
     
    Last edited: Nov 5, 2016
  21. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey!

    The demo is not missing anything

    I'll send you a PM shortly ;)
     
  22. MakeGames2

    MakeGames2

    Joined:
    May 23, 2016
    Posts:
    82
    This looks to be a very nice system and exactly what I was looking for. Thank you very much!

    I'm digging into the docs and setting up the demo and checking it out and look forward to seeing how things go.

    So far though it seemed like a lot of the parameters were set to some sort of hash instead of the intended value. For example the IP addresses in the objects in the Hierarchy in the scene were a random hash string instead of an IP. I'm guessing this is because I have my project settings to force text mode for asset serialization so that I can export my stuff to git as this is how I thought it was supposed to be but maybe that's conflicting when importing into Unity 5.4.

    At any rate, I think I got it setup. Woohoo! Great docs! Can't wait to see what's next!
     
  23. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey! Thanks for your purchase, and I'm really glad you like it ;)

    Yeah, your guess about the hashed parameters is spot-on. There was a case about this in the github:
    https://github.com/alvyxaz/barebones-masterserver/issues/4

    I wonder if there's anything I could do to avoid this in the future.

    I'm also planning to enable "Force Text" in the near future, because I'll be creating a private Github repository so that more developers can work on improving the framework. I wonder if this is going to cause issues for other customers who have set/ not set the "Force Text" to true, and how this whole thing is going to affect asset submission to the store :/
     
  24. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    426
    Hi Alvyxaz,

    I am interested in your product, but want to ask you a few things before i buy.
    but first of, let me explain you what i do: I am making a moba, hosted on a linux headless that allready works fine.
    for now my problem is: i could not find a easy way of having the master server (running on linux) handle multiple instance of game server, where the players play.
    now i got only the game server instance that host the game, so i never have more than 10 players at once.
    I would need a master server that you connect your client on, that would manage the connections of the clients to game servers, then after the game ends that take back the clients on it, lets say: for chat.

    now the questons:

    - Will i have to modify my working project to work with your framwork ? if so how much ?

    - Will i need to have multiple projects of the same game, one for client, one for server, and so on ?

    - I find your illustrations a bit confusing especialy this one:


    How many export will i have to build to make my game run ? Client - Master server - Game server etc...
    Client to dedicated game servers directly without passing through master server ?

    -will i be able to test the framework without hosting it anywhere ? like on my windows computer ?

    - will you manage a secured connection to a data base ?

    - Your demo is not working btw.

    sorry for all the questions,

    thanks
     
  25. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey!

    Actually, your use case is a big part of my vision for the framework. I'm designing it mainly as a central point, which could be used for clients to connect to, and be assigned to different game servers for gameplay.

    Is your game using uNET or something else?

    The amount of modifications you'll need to make to your game should be minimal, because framework doesn't interfere with the gameplay. In essence, when player connects to the master server, and requests for permission to enter game server, it will receive an IP address and the name of the scene. Your client will then probably go to that scene and connect to your game server. At that point, it's just like your player connected to your server as it does in your current implementation.

    Regarding the amount of exports (builds), it will depend on how you set it up. It's possible to do everything (client, game server and master server) in a single build, but it might be a good option to have the game server as a separate build to make it smaller (lower RAM usage).

    You could connect to dedicated server without going through Master Server, but it will defeat the purpose of having the Master Server? Normally, your client would make 2 connections - one with the master server, and one with a specific game server (only when playing)

    Yes, you'll be able to test it on your windows computer

    Regarding the database - nothing else, but master server, accesses the database. The current database solution used is an embedded NoSQL database (LiteDB), and it's actually a simple "file storage". All of the interactions with database are through interfaces, so you can write your own implementations of interfaces for other databases, and manage the connections to them however you want.

    Regarding the demo - that's strange, demo seems to be working fine for me. It probably has to do with Unity's WebGL and browser support.

    It's better to ask questions now, than be sorry about not asking later ;)
     
  26. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    426
    Thanks for the fast reply,
    First of, i am using uNet.
    So if i understand you well, i can make only three builds, one for the master server, one for the game server and one for the client, but will i have to run/launch the game servers myself ?
    Lets say i run 10 game servers, will i have to link the game servers to the master server myself ? Or is the master server running on the fly the game server instance and closing them on the fly ? On linux ?
    How do you handle sending multiple ip adress of game server hosted on the same linux server ?
     
  27. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Yes, you can run everything with three builds :).

    Regarding how you start game servers - there are many ways to do that. The one I'm using in the demo is something like this: I start the Master Server. When user makes a request to create a new game room, Master Server starts a new Unity process (game server build, on a VPS), and gives it a port number and ip through command line arguments. When the gmae server process starts, it checks if there are command line arguments for port and ip, and if it finds them, it starts something like StartServer(ip, port), and then notifies Master Server that it's started. You might find a better explanation of this here:
    https://github.com/alvyxaz/barebones-masterserver/wiki/Spawner-Server
    This feature is pretty much called a "Spawner Server". It allows you to start game servers on different machines, and you don't have to do it manually. And yes, this works on Linux.

    Multiple game servers can be hosted on the same machine by opening different Ports :)
     
  28. MakeGames2

    MakeGames2

    Joined:
    May 23, 2016
    Posts:
    82
    I think it probably would work. I created a new project in unity with only your asset and the Asset Serialization setting was set to Mixed. I looked and it seems to have imported everything perfectly fine with none of the fields being wonky. I then switched the setting to Forced Text and everything remained fine. I then exported the package from this new project and reimported it into my existing project where I want to use it and it seems to have imported perfectly fine there. I then created another new project and made sure the setting was set to Mixed and imported the new package there and it appears to have imported fine.
     
  29. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Thanks a lot for investigating this! I'll get the private github repo ready soon ;)

    Another thing:



    So the V1.02 is finally ready.

    This update contains the initial version of Lobbies Module. Instead of queues, I've decided to add an example of an "automated lobby", which acts a lot like a queue - waits for enough players to join, before starting a game.

    I'm taking a few days off, but I'll still provide support for the asset as usual. Currently, documentation for lobbies is a bit short, but I'll finish it after the break ;)
     
    k1 and Noqomo like this.
  30. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    282
    hi whats the best way to save my database want to make a like mmo/survival game do now whats the best for saving database?
     
  31. k1

    k1

    Joined:
    Feb 20, 2013
    Posts:
    1
    hi
    can i use your master server framework for multiple platforms at same time?
    (players in pc and android play together)
     
  32. Noqomo

    Noqomo

    Joined:
    Aug 24, 2013
    Posts:
    7
    Hi k1,

    I'm not the author but I have purchased the asset.

    The asset uses Unity's native UNET networking which is cross platform.

    Each client, whether it is PC/Android/iOS/WebPlayer/etc simply calls on a remote server that you set up and control.

    No third party services required other than a web server which you can host locally if you like during development.
     
  33. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Sorry guys for late reply! I have no idea how I've missed these posts

    What exactly do you mean by saving database? Storing data?

    Yup, Noqomo is right, you can do that. The limitations that apply uNET, apply to this framework too. For example, desktop clients can't join a game server which is running on websockets (WebGL), but other than that, I think everyone should be able to play together (I'm sure android and desktop players can play together)

    Thanks for stepping in! It's not actually a web server, but a general server which allows starting c#/.NET/mono executables ;)
     
  34. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    EDIT: I've removed the post to not confuse anyone :)
     
    Last edited: Nov 14, 2016
    Skribble and sabri2c like this.
  35. sabri2c

    sabri2c

    Joined:
    Nov 25, 2014
    Posts:
    5
    standalone master server application sounds like poem to me :)
    cant wait to see that.

    just a question game server will be unity or maybe more simple i mean we dont need to see anything about game on game server.

    sorry if i askin something stupid im still noob:)
     
  36. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey!

    Awesome!

    It's a good question! For game servers, you could use anything you like. For unity games, it's good to use unity as a server for all collisions, physics, pathfindings and etc..

    If the game is a bit more simple, and doesn't need these, you could have game server completely separate (like card games or simple multiplayer tower defense games). But there's nothing stopping you from developing a more complicated game server, though you'd have to create your own solutions (or integrate 3rd party) for physics and etc.
     
  37. lazalong

    lazalong

    Joined:
    Oct 13, 2009
    Posts:
    139
    Hi alvzaxy

    One usage for this standalone server I could imagine is geo-localisation of master servers with synchronisation of players and chat. Depending where a player logs in he could be moved to a server nearer to him, with less ping or simply less full (load balancing).

    For example, chat channels could be synchronised across the world servers. If the servers are running in good data centres having fast connections between each other, response time may be faster than players trying to connect from far away. For example, a message on the Help channel on the European server would be send by the master server to other master servers across the world. Of course the downside is that we are using bandwidth.

    Coupled with no-sql nodes pooling this could enable distributed game worlds (see http://developer.muchdifferent.com/unitypark/uGameDB/ConnectionPoolConfig)


    And if you fall out of ideas - I doubt that -, you could also look at a http://developer.muchdifferent.com/unitypark/UnityEmulation/uServer
     
    Last edited: Nov 12, 2016
  38. Sorn

    Sorn

    Joined:
    Jul 17, 2013
    Posts:
    14
    Completely in favor of separating Master Server and Spawner Server from Unity.

    Would your networking API remain similar or be made anew?
    Could you keep the unsupported legacy Unity Servers code available on GitHub?
     
  39. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Great questions!

    Networking API will remain pretty much the same. The only difference on the separated servers will be the main communication library - I'll switch websocket-sharp to a more stable, high performance websockets implementation that StackOverflow uses on their servers (couldn't do that on Unity). (Websockets will be the main communication protocol, because it's overhead over TCP is minimal, and there's no use case for unreliable packets (UDP) in master server).

    Regarding the unity servers, you mean a private GitHub repo ar a public one? If a private one - then yes, if you're talking about releasing it to public, then I'd be in a situation where I'd have to compete with my own product, haha.

    If we switch, source code of unity servers would always be included in the asset as .zip file. Depending on the interest, I might provide some support and updates for it, as I think it's still a great tool, especially for prototyping :)
     
  40. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    469
    I support the standalone if it means better performance, but does that mean I will have to work outside Unity workflow?
    If so, you are complicating things even more for your potential customers.

    Not sure by how much, and not sure if its a good trade off.

    Communicating between the standalone and Unity will need additional setups and such yes?
     
  41. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    EDIT: I've removed the post to not confuse anyone further :)
     
    Last edited: Nov 14, 2016
  42. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    After some careful considerations, I've decided not to move Master and Spawner servers out of the Unity. (read further, there's a "however")

    After talking to a number of developers who own this product, I've realized that a lot of them might find the framework even more difficult to understand / use / extend. Many of the developers have never worked on a different environment, and Unity is all they know. And it wouldn't be fair to them, because what they bought - is a master server built within Unity.

    I did some planning for the standalone master server, and I remembered main reasons why I decided to base the servers on unity:
    • The time you save working on a setup like that out-weights most of the benefits of switching to standalone, and unity's performance overhead is not a big issue - master server will probably never be very CPU intensive (it's not a game server), and if it is, it's solveable
    • Unity is not a lost cause, .NET 4.5 / C#6 is comming

    The "however" part:
    To those of you who wanted me to move the server code out of unity, since I already have most of the functionality done from a few months back, I can share it with you. I'll probably strip most of the modules to make it as simple as possible (maybe, except auth module), and it will contain Master server, Spawner server, and ability to see the list of those servers.

    It will be a finished, production ready product, which is relatively easy to use and extend (a lot like web frameworks). Other features - you'd have to do yourself. This should be perfect to those, who are not going to use master server modules that are already in this framework ;)

    The conclusion:
    My full focus remains on this framework, and I won't move server code outside of the unity
    . I'll focus on making this framework as simple to use as possible, within Unity. I'm planning to write step by step tutorials, which will cover the main aspects of extending it. Right now, many of you don't understand how everything works. I'll make sure you do, and when you understand it - you'll find this tool irreplaceable.

    By the way, I'm working on V1.03 which will focus on:
    • Ease of use
    • Proper database integration
    • Bug fixes
    • Removing the "Beta" status. (I've been running the server on my VPS for a month, and I think it's production ready)
    If you have any concerns or questions regarding the direction this is taking - feel free to contact me.
     
    Last edited: Nov 14, 2016
    LostPanda and Gekigengar like this.
  43. deeperthought

    deeperthought

    Joined:
    Aug 7, 2014
    Posts:
    3
    I think your 100% right about keeping the master and spawner servers in unity for now. I highly doubt anyone would hit any performance problems with those two modules, and even then you could move them to bigger servers. Also would it not be possible to leverage an umanaged native plugin in c++ for sockets when/if performance becomes an issue? Much better to get things working well :)

    I don't know about anyone else, i'd much prefer a seperate project/module for this, i have bad memories of problems with logging, i/o delays, errors, buffer issues, hard drive crashes, file write locks, garbage collection stalls, logs not flushing on system/os crashes. It'd be nice if you could put your logging module on the same server while testing, but move it to another server (low powered) when released or scaling.

    I'd expect to be able to set a runtime logging value (see log4j - OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE) for each running server module (master, spawner, game, etc) with a starting default, then be able to change it without restarting the module (this is where a control panel would come in handy to send a command message via a control socket). Then all log appenders you have could be configurable in the logger module (maybe even by module/log type).

    Obviously the client would have to be different, FATAL, ERROR would be messageboxes (for the player to see) and others would be console. These could be piped to the logging module via master server or some kind of load balancer module in the future.

    The main issues with this are, making sure the logging connection is active, and what to do when it isn't. Aslong as you create the error fully locally (timestamp, modulename, ipaddress, type, message etc) and add it to a buffer, you'll be able to send the errors when you can reconnect. Probably needs some kind of email option when theres a problem with logging that lasts more than x number of minutes (just on the server modules).

    I think you can avoid a lot of the common problems with logging in a live environment, but it undoubtly comes with added complexity.

    I can help with some bits, but don't want to tread on things that are in flux with the code at the moment!

    Just my .2pence ;)

    Off to check out the update and review...
     
  44. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Thanks a lot for your input! This is great!

    Yeah, if performance becomes a problem, we can switch to using an unmanaged solution. However, as you've mentioned, I doubt it will ever be the case.

    When designing the logging solution, I'll have in mind the points you've mentioned. I'll probably contact you after I decide how it should work to see if we agree on it. ;)
     
    JosephHK and LostPanda like this.
  45. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    154
    @alvyxaz this great framework but more butter. Like your said “step by step tutorials,easy of use” and so on. Your said"Many of the developers have never worked on a different environment, and Unity is all they know.",this right!
    I think we want need is an easy-to-use framework!Cant wait for v1.0.3!!:):):):p
     
  46. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    282
    he is unet good ?? Have it a good ping ? and syn?no delay?
    i dont using unet so i cant now it ^^
     
  47. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    294
    added to wish list. I will join soon! Look great. Please, Keep going well!
     
  48. JosephHK

    JosephHK

    Joined:
    Jan 28, 2015
    Posts:
    38
    It is a great framework.
    But I really wonder whether the master server as a unity game instance can run for a long time without crash if the traffic is keeping heavy.
     
  49. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey! It's a bit hard to answer this. uNET is divided into LLAPI and HLAPI. HLAPI is not yet perfect, but very much usable, and LLAPI is... stable, which is all you need for low level communications. With these two, you can do almost anything, but it will depend a lot on your skills.

    Ping is not related to uNET. Ping will depend on physical distance between your server and clients. For example, if your server is in US and your players in Europe - you'll get a ~120-200 ping, and if your players are also in US, it will be 0-50 (+ server fps)

    Overall, this framework might be a bit too difficult for you. I would recommend you to read this tutorial and see if you like the uNET: https://docs.unity3d.com/Manual/UNetSetup.html. You could also make your game first, and buy the framework later :)

    Awesome! Looking forward to have you in "our ranks"!

    Thanks! This means a lot to me

    Servers for WebGL demo I have setup are running for 10 days without being manually restarted (I do that for updates and etc), and it has never crashed during the whole month and a half. RAM consumption is also stable. Of course, the demo doesn't get too much traffic, but I have no reason to believe that it would cause much difference, as the work that master server does is very small - no physics, no rendering, no other CPU intensive stuff (like area of interest management on MMO's).

    Servers ability to handle a heavy traffic should not be affected much by the Unity itself. When you think about it, Master Server doesn't use unity's rendering, physics, or other usual causes of crashes. All the computing that Master Server does, would be the same computing it would do if it's taken out of Unity, and the main reason why it might crash will probably be a fault in the master servers code. :)

    We should also remember that even the biggest games with most high-end servers and huge development teams often get to the point where they cannot handle the load. I think this should be understood as a natural process, which shows that a game has grown enough to require a custom solution, which is the next step in games evolution. I'll conclude this with the usual cliche - having a problem of too many players is a good problem to have ;)
     
    LostPanda, MrGky93 and JosephHK like this.
  50. maglat

    maglat

    Joined:
    Jul 9, 2010
    Posts:
    111
    I'm very interested in your product and consider to make the purchase as soon the beta status is gone ;-) Also looking forward for a proper documentary with a small step by step tut and some example scenes, too :D Right now my MP project I experimented with, based on this UNET tutorial. https://unity3d.com/learn/tutorials/topics/multiplayer-networking
    Maybe you could integrate a small guide how to merge your product into this UNET tutorial ;-)

    Kind regards!
     
unityunity