Search Unity

Master Server Framework

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

  1. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Links:
    Asset Store: https://www.assetstore.unity3d.com/#!/content/71391
    Wiki: GitHub
    Issues, bugs, feature requests: GitHub
    Demo: WebGl (running on a 512 RAM, single core, 5$/month VPS).
    Video: working on it
    Discord: https://discord.gg/ZqGummZ
    Latest version: v2.0.3. Asset store version: v2.0.3

    To anyone wondering - I avoid reading unity forums and PM's, so if you want to contact me - do it through GitHub page. Thank you!:
    https://github.com/alvyxaz/barebones-masterserver


    Is This Asset For you?

    ------------------------------------------------------------------


    -----------------------------------------------------------------

    Description:
    Develop, run and debug your back-end server like a regular Unity game, within editor. No tedious multi-language setups, no third party services with monthly subscriptions, no cap on CCU or traffic, host on win and linux VPS, full source code - even if I die, you move forward. Based on socket connections (think Photon Server, just without caps and monthly payments). If you’re worried about unity’s process overhead, read here.

    Master Server Framework is designed to kickstart your back-end development, it contains boilerplate code for user authentication, dynamic / automatically synchronized player profiles, and scalable game servers (rooms) architecture.

    At the time of writing, included modules are:
    • Authentication module - manages user registration / logging in
    • Profiles module - build your player profiles without having to worry about database structures, persistence or synchronizing profiles between servers.
    • Game Servers module - allows to register game servers to master server, so that they can be found by players (lobby), or used to create matchmakers. Game servers can access player profiles and update them (give exp on kill, etc.)
    • Spawner Servers module - allows to spawn game servers on users request (user created game rooms). Spawned servers will have full authority - users don't need to act as hosts, which allows even Browser and mobile users to create game rooms - no need for relay servers or NAT punch-through.
    • Chat module - simple chat module with support for channels and private messaging
    Servers and modules communicate to each other through Barebones Networking API (UDP / RUDP / Websockets), which you can use to write any kind of server you want. (It's an abstraction layer on top of uNET Transport Layer and websocket-sharp, but you can easily write your own implementations if needed ) More info.
     
    Last edited: May 25, 2017
  2. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Looks good! Can't wait to see more!!
     
  3. Slick_Nick

    Slick_Nick

    Joined:
    Jan 4, 2014
    Posts:
    37
    Looks freakin awesome! :)
     
  4. ZhavShaw

    ZhavShaw

    Joined:
    Aug 12, 2013
    Posts:
    173
    I'm quite interested in this package!
     
  5. erich202

    erich202

    Joined:
    Sep 24, 2016
    Posts:
    38
    Looks really great. Curious why Barebones Networking API not UNet?
     
  6. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Networking API might not have been the best name for it, haha. It's actually a small layer of abstraction on top of low-level networking libraries. Underneath, it's using UNet low level api (transport layer) for UDP, and websocket-sharp for websockets. This abstraction allows you to have networking technology independent code. For example, if you've decided to use raw TCP connections, or switch from unet to, say, lidgren, you could do that without changing a line of your networking code.

    I could have used UNet directly, but that would make it impossible to switch technologies if the need arises. Imagine having to refactor every single line of code where you send, receive and handle a message - it would be a nightmare! Which is more, abstraction allows you to have a number of helpful methods that don't need to change when you switch libraries.

    Let me know if I didn't explain it well enough ; )

    EDIT: I've updated the description to inform that uNET is used underneath
     
  7. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    Hello!

    I'm currently looking for a solution to make multiscene unet hlapi (llapi later) dedicated authocrative server for simple mmorpg.
    Am I found one?

    Can masterserver be coded not to matchmake but to direct and REdirect clients to different gameservers depending on some ingame logic (going to another location or instancing a dungeon)?

    Do your asset messes with how actual gamesession should be made? For example do I have to use LLAPI and manually sync marshal data or HLAPI is good enough?

    What are possible caveats to use this framework for mmorpg server?
     
    Last edited: Sep 26, 2016
  8. erich202

    erich202

    Joined:
    Sep 24, 2016
    Posts:
    38
    Thanks so much alcyxaz! That clears things up and makes total sense. I've got a couple more stupid questions..
    1. I think I saw it or you say somewhere it doesn't handle the game networking. Obviously I can see in the screenshots, demo, and docs that it does have a game server. So what I'm wondering is what's involved in going the next step and adding item drops, spells, monsters? Can I just make it so the game server on linux is authoritative? Meaning, it just takes player input and sends back what they should do? (like uMMO?) or do I have to create events for everything and fire those?
    2. Like this, attach a script, and use a different class to GetAxis?
    3. Does it serialize it to/from client/server (eg. JSON)?
     
  9. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    To shamsfk:
    Yes, you can use the master server to direct to instances and etc. At it's core, Master Server is pretty much a simple socket server which sends and receives messages from clients and other servers, so there's pretty much no limit on what you can do with it.

    Now that I think about it, I think more people will want to use this framework to handle MMO instances and etc, so I'll be adding something like an MMO module to the framework, which would help developers with some of the common tasks. It would be awesome if you could give me a list of things you'd want to see in such a module :).

    Regarding game sessions - framework doesn't care much about how your game networking (game sessions) work, as long as it implements a simple interface. Regarding the uNET HLAPI, you're actually encouraged to use it (basic game server setup is already written using it).

    Regarding the ceveats of using this for an MMO - I don't see any related to the framework, because there are so many ways in which you can use it.

    If I were to make an MMO, I'd use the framework to handle authorization, player profiles, messaging, maybe use the Networking API to write a micro server to handle Auction Houses. I'd probably separate the game into regions (game servers) to handle the load, and use the master server to switch those users between game servers.
    _________________________________

    To EricMuyser:
    Glad to be of help!

    1. I think this point is easier to explain with an example (at some point I'll finish a video which will hopefully explain it better).
    Let's say you made a very simple game with uNET, without framework (unity's tutorial) : player can join the server, walk around and collect the coins. When a player joins, you have no way of knowing who that player is, so you'd have to implement some kind of authentication system, persistent profiles and etc. Master Server Framework aims to help you with that.

    With the framework, you use the same game server you made earlier, but now it can connect to the master server, register to the list of available game servers (lobby), identify connected players, change their profiles, allow them to chat or do whatever else you would need. The idea is - you make the game logic, and framework takes care of the rest. Main focus of the framework is not to make the game (gameplay), but to help you set up "infrastructure" easier.

    What this means is - you make your game any way you want, with whatever you want.

    Adding drops, spells and etc is gameplay related, so framework won't help you with that.

    2. Your second question also seems to be gameplay related, which framework doesn't handle. I think you shouldn't buy the framework yet, and focus making the basic game first. Actually, I have quite a lot of experience with MMO's, so feel free to send me a message, saying what you want to do (controls, player interactions), and I'll try to guide you to what you should be doing / focusing on, or what assets could be helpful to you. I don't want you buying this if you're not sure you can find it useful ;)

    3. You can use any kind of serialization you want, framework is not opinionated on the matter. To make the messages small and to make framework compatible with as many platforms as possible, messages are sent as raw bytes or strings. You can turn anything into bytes easily ^_^. In case of the json, you can send it as string and deserialize it on the other end.
     
  10. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    alvyxaz

    I'm gonna play a bit with it for starters and gradually formulate what will be needed.

    What is totally needed is the ability to load-balance by dividing game world into separate servers that player will seamlessly (or not) move through.
    • In my case I need to spawn multiple game servers each running his own Scene corresponded to single area in the world. Some on dedicated machines and some sharing one machine. I need to move player from one Scene (server) to another when he gets to area teleport point so seamlessness is not my case for now. I need these servers to run 24/7 and restart if crushed.
    • Second thing is to instantiate dungeons that feature is obvious to achieve with your product already)
    • Third is some kind of front end servers to load-balance further but thats out of priority.
    • Forth is not directly related to masterserver but, it maybe used? Database server is unavoidable and it would be nice to reuse as much as possible at first stages of development at least.
    I'm really looking forward to masterserver, if does its job reliably it will be a life saver product (at least until unet phase 3 comes))

    Sooner or later Server Library will come (it is a LLAPI out of unity! Yay!), can you estimate, how hard it would be to separate masterserver from unity? Your points of running unity are valid but still.. I will sleep better knowing that such core part of infrastructure is not coped with game engine)
     
    Last edited: Sep 26, 2016
  11. erich202

    erich202

    Joined:
    Sep 24, 2016
    Posts:
    38
    That makes a lot of sense alvyxaz, thank you. So your point is that I should already have my game mostly done and talking to a single server before I worry about picking up your asset to bring the rest into the fold (authentication, persistence, messaging). I guess one of the problems is other assets also include some of that, but they don't scale. I think what I'll do is continue, ignore the other asset features like messaging with the intention of possibly adding yours on top later. Thanks again for the help!
     
  12. erich202

    erich202

    Joined:
    Sep 24, 2016
    Posts:
    38
    Yah per shamsfk's comment above - what is ideal is a pool of game servers registered to the master server who can be assigned to a game when the player wants to create one. As far as I can see, that's totally possible with your asset but you haven't done much around streamlining it. eg.
    - Master server maintains a pool of game servers ready and waiting
    - Client asks master server to connect to a nearby game server. Master server asks game server if player is nearby. If yes, master server grabs a game server in the pool (or creates a new one) and tells it about the client, gets the auth key, sends to the client to connect to game server.

    I won't be building a seamless world like that, but still if that existed I could utilize it for my game - which goes like this:
    - Player connects to master server, master server sends player the details to connect to a game server used as the lobby (there may be multiple lobbies).
    - Player can create a game from within the lobby for other people to join (this is where the above and pooling would come in handy)
     
  13. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    to shamsfk

    Actually, a month ago, the whole master server was completely unity independent, written as a simple DLL (.NET 4.5). However, after writing documentation for it, I realized that it's way too tedious to set everything up, and customers might be appalled by it . I wanted to create an almost one-click solution, where you don't need to have multiple IDE's open, sharing DLL's, starting the servers and etc. I realized that master server is unlikely to be a bottle-neck (traffic and game servers are), so there's not much of a downside of moving everything to Unity (except for .NET 3.5, haha).

    I could include into the framework code that would allow you to write unity-independent socket servers, and, if you want, after some refactoring, I might be able to make the master server runnnable both, with Unity and without it

    Regarding the database, at this point, all of the framework interactions with database are abstracted (you call an interface implementation, like IAuthDatabase.GetAccount(..)). The implementation provided is with LiteDB (which is an embedded NoSQL db) because it doesn't require any setup. It's easy to write implementations for Mongo, MySQL or any database server you might want to use.

    By the way, it seems like the feature you're most interested in is load-balancing and spawning of game server instances. In the near future, I'm planning to release modules as separate assets for a cheaper price. If you're interested, I could make an asset specifically for load-balancing.

    to EricMuyser

    Yeah, one of the points of the framework was to make it as decoupled from your game as possible, so, at some point, if you decide to use something different, the core game remains the same. I encourage you to first make something like a basic one-scene prototype, and only then buy the framework to integrate the rest of the functionality. Integrating the framework should be easy :)

    I chose not to implement servers pool to save server resources, as keeping a number of servers running when there's no one playing might be wasteful. Though, if I understand this correctly, it wouldn't be too hard to implement something like that if need arises:

    At the provided demo, instead of the pool, a new instance of Unity is started, and player connects to it. As you can see, the process is very fast, and starting the headless Unity instance takes about a second. When the last player leaves, game server terminates itself (it doesn't have to, you can keep it running). If you don't terminate the server, you can write a simple matchmaker which, after hitting a "Play" button somewhere, would look for the best suited server (by location), and that would work pretty much like pooling you wanted :)
     
  14. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    alvyxaz

    Hi! Cool. That is awesome! I have several more questions)
    • Is source code fully available? (It is apparently)
      • Is it nice?))
    • Can you include (and maintain) standalone version? (I suppose most of devs would at some point prefer to decouple)
    • On the auth side what about encryption? AES, RSA?
    • Can you provide some example of user "jumping" from game server to game server at its will? Like button to jump to server A and it has a button to jump to server B) something of that kind.
    About extensions - these are always welcome!) If they are good ones)
     
    Last edited: Sep 27, 2016
  15. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    shamsfk

    Yeah, as you've figured it out, the source code is fully available. I'd say the source code is easy to understand and follow (my colleagues seem to agree with me :) ).

    Regarding the standalone version, I need to spend some more time on it to see if it's not too much of a hassle to maintain both versions, and if introducing a standalone version wouldn't make it more difficult for Unity users to use.

    Regarding the auth encryption, a few days ago I've implemented RSA encryption, but the changes are not yet in the asset store. It will be submitted with the v1.01 update (see description), which mainly focuses on improving authentication.

    About the example, yeah, I can get the example done within the next couple of days (I'm working on improving file hierarchy and module decoupling while there aren't too many purchases). I'll get back to you once it's done ;).
     
    Last edited: Oct 6, 2016
  16. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    On my way to atm... :)

    You can go with just an instruction doc on how to decouple it will suffice because need to decouple means that you made a game already and going production so a little effort is not too much of a burden (in terms of that you already gone through so much and most likely capable of doing it))

    Example would be very welcome.
     
  17. Slick_Nick

    Slick_Nick

    Joined:
    Jan 4, 2014
    Posts:
    37
    Hello!

    Is it possible to let player hosts game servers (localy in their house or from the cloud) with this frame, i guess it is from reading this but then i saw the "Spawner Servers module", but i assume this is optional to use :)
     
  18. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Yes, you can let players host game servers - they could then be registered to Master Server and their server would be visible within the lobby ;).

    However, I need to note that regular issues related to NAT will still remain (framework does not provide any means to do NAT Punch-through). What this means is that when a player who is under a router (doesn't have a unique IP) hosts a game, other players might not be able to access it. Unity encourages you to use their Relay services to solve this issue, but it costs money (framework was designed to avoid using unity services, their matchmaker and etc)

    This is one of the reasons why Spawner Server module was created - it removes the need of NAT punch-through, allows mobile / web players to create rooms without hosting them, and it solves an issue with players having too much authority (if they host a game server, they might write a hack, for example, to destroy player items, as all of the game logic is within their computers).

    Though, many room-based games don't worry about these things and allow players to host games. I guess it's mainly because there's no sensitive data, and they don't care much if some of the users can't host public games. And there are more ways to solve these issues :)
     
    Last edited: Sep 29, 2016
  19. Eruheran4

    Eruheran4

    Joined:
    Jan 6, 2013
    Posts:
    19
    How's the legacy if somebody from china would connect to my master server in europe?
    Is it already possible to connect people worldwide without any laggs? Tahnks. :)
     
  20. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    Hi!
    Legal matters are too wide of a topic, mainly it depends on a content you provide.
    And yes it is absolutely possible to connect people from anywhere to anywhere.
    But be aware of a latency. There nothing that any framework, protocol, isp or actual hardware can do with it. For example - transatlantic connection will have a ping of no less than 150ms thats pretty much a limitation of a speed of light + infrastructure overheads. How laggy or not is it for you depends solely on your game and it's dependency on latency.
    That said there is always a solution to have regional servers. Naming China - you pretty much Must have a regional server.
    Whats great about masterserver is that you can tailor it for your needs, like having a global worldwide master server that will route players to their appropriate regional game servers. (China still might need to be fully regional like even having their own regional master server)
     
    Last edited: Oct 1, 2016
  21. Eruheran4

    Eruheran4

    Joined:
    Jan 6, 2013
    Posts:
    19
    Oh yea, latency was the word i was looking for. :)
    But that means that i have to provide a server in that country, right? Best thanks.
     
  22. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Haha, thanks shamsfk for answering!

    Erupheran4

    Yes, you will need to provide a server for that country, and there's no way to avoid it :). Though, most of the time, you wouldn't need to worry about servers, as there are many providers you can use.

    For example, DigitalOcean has servers in Singapore and in India, and I'm certain you can find VPS provider that has servers in China.

    EDIT: Actually, you can have a Master Server somewhere in Europe, and host Game Servers somewhere closer to the region your players will play in (China, for example).

    Master Server is not latency-critical (higher latency should not be a big deal), but on your game servers, you'll need to reduce latency as much as possible, and having game servers closer to players is the only way to solve this :)
     
    Last edited: Oct 1, 2016
  23. lazalong

    lazalong

    Joined:
    Oct 13, 2009
    Posts:
    139
    Thanks alvyxaz.

    Since MuchDifferent stopped working on their uLink framework, I was in need of such a framework.
    For such an early version there are already quite a lot features.
    I can't wait finishing what I am doing to jump on your code!

    Congratulations!
     
  24. MaZy

    MaZy

    Joined:
    Jun 29, 2012
    Posts:
    105
    Oh Buddy. I was looking so long for this solution. I was researching myself but the time was holding me back. Also always my solution was not the best because I just used UNet.

    Very very important thing is for me just, auto start up a server on request (like the "Spawner Servers") and also an auto matchmaking and queue system and start server to let them play together (or against eachother).

    I would love it if this is implemented soon because I am looking for it since one, two years I guess.
     
  25. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    To MaZy

    Hey. I'm glad you're interested in the framework!

    This is not the first request for the queue system and the auto matchmaker, so I'll start working on it in the next couple of days.

    I think I can get it done in about 1-2 weeks (It will depend on how many improvement requests and bug reports I'll get).

    If you want, I can send you a message when it's done ;)
     
  26. moco2k

    moco2k

    Joined:
    Apr 29, 2015
    Posts:
    294
    This sounds promising indeed. I'm gonna try it and report some feedback later after I have taken the first steps.
     
  27. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Great to hear that! If you make a purchase, don't forget to send me a private message with invoice number to get the latest update (It takes unity 5-10 days to approve updates :/).
     
  28. moco2k

    moco2k

    Joined:
    Apr 29, 2015
    Posts:
    294
    Hey, here is some first feedback after trying around a little with the framework.
    I'd say that I have quite good knowledge of UNET but no experience on using master servers of any kind.

    My first impression is that the documentation needs to be improved. I find it a little hard to get into this.

    1. It seems your framework encourages to encapsulate both the actual game project and the master server within a single project, then build different scenes, either for the game or master server? I would like to see more precise information on how to structure the overall project and how to place the scripts on scenes to create a proper structure for game and the server.

    2. In the docs, there is a demo explained. However, this demo is quite specific as it is about multiple servers for different zones. While this seems to be quite useful for games like MMOGs with big worlds, I would like to see tutorials on more basic stuff which are useful for a broader range of games. For example, I suggest to add step-by-step tutorials on how to add chat and matchmaking to an existing game using your master server framework.
     
    Last edited: Oct 10, 2016
  29. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    To moco2k

    Hey,

    Thanks for your feedback! Your points regarding the documentation are valid.

    I was not intending to focus on it too much during the beta, but after reading your comment I've realized that it's way too difficult for someone to get into.

    I'll start working on a guide which will go through the points you mentioned, and will cover a more detailed description regarding how to use the asset and how everything actually works. I'll send you a message when it's done.

    Once again, thanks for a detailed feedback!

    EDIT: It will probably be ready by the end of Monday
    EDIT: Done ;)
     
    Last edited: Oct 12, 2016
    moco2k likes this.
  30. NessimOnair

    NessimOnair

    Joined:
    Jul 19, 2013
    Posts:
    22
    Hey :p

    Add VoIP systeme
    Currently no module exists .. its'd be cool to have an in-game VoIp module as all MMO: p
     
  31. NessimOnair

    NessimOnair

    Joined:
    Jul 19, 2013
    Posts:
    22
    Dev,


    I would like to know,
    If there is a way to implement server "Official" ie myself open official server 24h / 24 players can join without étindre the pc, as H1Z1 removed the ability for players to open a server Official host .. only as a lot of MMO games
     
  32. Grimjack2600

    Grimjack2600

    Joined:
    May 7, 2013
    Posts:
    13
    We're working on adding mumble support (voip and room enabled chat). When we've got it up and running, we'll contribute back to the asset.
     
  33. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    To NessimOnair

    Hey! I never thought about VoIP, but now that you've mentioned it, I think it would be a great addition. I have no experience with VoIP, so I can't promise anything - I'll have to look into it.

    Regarding "Official" servers - from what I understand, you want to open servers for other games (H1Z1 for example)?
    Neither this, nor any other asset will allow you to do that, because it's entirely up to game developers who made the game. This framework, all of the assets, and unity in general is designed for game developers who make their own games.

    If I misread it and you are actually working on your own game, then yes, you can use it to have servers that run 24h a day ;)

    To Grimjack2600

    Woah! Let me know how it goes ;). You seem like one of the most enthusiastic people I've met on the internet, haha
     
  34. Grimjack2600

    Grimjack2600

    Joined:
    May 7, 2013
    Posts:
    13
    lol, enthusiasm and development time are not always equivalent but thanks!

    I believe the kind of service NessimOnair is referring to is VPN-esk. Services like Tunngle and DYNVPN are good examples (with DYNVPN being the cleanest).

    These kind of pass-thru services are possible. we've been looking into integrating netvirt into the Unity networking stack as a means to enable virtual peer-to-peer like services. I cannot say how easily netvirt would be to integrate into the current product, but the concept is sound and not too far off, nor incompatible with the RakNet/UNet models (old unet/new unet).
     
  35. dnewto

    dnewto

    Joined:
    Aug 7, 2014
    Posts:
    3
    Hiya - was just working on something similar and found this, with an active thread and what looks like active development (which is pretty rare here - most assets i click on are from years ago, and the thread has long since died) so rather than re-invent the wheel i've purchased this and am happy to add the bits i need and pass those upstream.

    I'm working on mobile and casual type games, so my requirements/aims are slightly different - however i think this pack could work for everything, with some parts being modules you can enable/disable. I'd like it to be buildable outside of unity, but for now using just unity would be fine to get everything working. I'm going to be concentrating on effecient tcp socket communications, load balancing, security, logging & diagnostics, stress testing.

    I think the roadmap looks good, could you create a roadmap in order and a seperate wishlist (that may or may not get worked on) in the top post?

    If there's a few people willing to contribute - how about setting up a private github repo for the people that have bought it? We can create branches with our names and you can merge the modules/changes you like / believe should be in core - and other people that have bought the asset could pickup a branch with code if they have different requirements.

    Also I think managing seperate assets when you update the core could be a pain - maybe a basic and pro option would be better than us having to buy three of four small assets and you keep them up to date and in sync? just a thought :)

    Anyway - good luck, it's a great start and hopefully will become the defacto much needed standalone server asset
     
  36. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    To deeperthought

    Hey!

    Your post makes me really glad you bought it, haha.

    At current state, there's a lot of room for improvements regarding security, load balancing and stress testing. I have to admit that for the initial release my main focus was to just get my foot into the asset store, and work from there, "solidifying" it and focusing on improving / creating new modules.

    Private github repo is a great idea, and I'm not sure why I didn't think about it earlier!

    People are showing more interest in this than I expected, so I guess it's about time to "streamline" the development process by having a more "official" roadmap, wishlists, repo's and a timeline for releases. I'll set these things up within the next few days ;)

    Yes, you make a good point regarding separate assets. I'm actually starting to steer away from that, as I've realized the asset store is too "rigid" for this to be beneficial.

    I think this asset will shape into something great!

    EDIT: Private GitHub repo will be set up after the release of v1.02
     
    Last edited: Oct 19, 2016
  37. Noqomo

    Noqomo

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

    Before I purchase, I notice an update is due in a few days time - could you please let me know if the purchase includes the update if I buy before this date.

    Many Thanks.

    - Noqomo
     
  38. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey! I'm glad you're interested!

    Yes, you'll get the update when it's released. At the moment, I have no plans for paid upgrades, and all of the updates (at least for half a year, but most likely forever) will be available for free :).
     
    Noqomo likes this.
  39. Noqomo

    Noqomo

    Joined:
    Aug 24, 2013
    Posts:
    7
    Great thank you.

    One last question:

    I'm not keen on having server elements within the client build. I would like to have the server as a separate scene/project independent of the game client itself.

    My concern is that someone crafty could crack the client and run their own master server; which is why I would like the server separate.

    Could you please expand on whether this is possible with your asset out of the box, and if not if you believe your documentation is able to cover me doing this on my own.

    Thanks.

    - Noqomo
     
  40. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    This is a valid concern.

    Yes, you can have those as separate projects/builds, and it wouldn't require anything special.

    When a client connects to master server, it doesn't really care about its logic. Even when you run both in the same build, they communicate to each other through network, not through shared memory.

    The main problem would probably be sharing a class with operation codes (opCodes / message types and etc.), which is not too big of a deal (copying common classes and etc.). Actually, in development, you could work in one project to make things more convenient, and then split the code when you're ready for production.

    So yeah, this would work out of the box, and you wouldn't need to take any special steps.

    Do you plan to have game server logic separate from game client too? uNET was designed to contain code for both server and client in the same build, but again, I don't think this would be an issue (HLAPI network manager has a flag to disable CRC check, and LLAPI shouldn't care about this at all)
     
    Noqomo likes this.
  41. Noqomo

    Noqomo

    Joined:
    Aug 24, 2013
    Posts:
    7
    Thanks for the detailed reply.

    I've gone ahead and purchased your asset; will jump into it now.

    If you get the time would you mind please expanding on how I would do this:

    Perhaps if others are also after this feature it could be added to the Wiki.

    Would you mind also pointing me in the right direction to research how I would implement an external database?

    I would like other services to connect to the database.

    Many thanks.

    - Noqomo
     
    Last edited: Oct 23, 2016
  42. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Thanks for your purchase!

    In essence, separating client and server is really straightforward. If you had two Unity projects and imported the Framework to both of them, you'd end up with two projects which know nothing about each other. Imagine naming one of them ClientProject and another - ServerProject.

    Let's say you want a client to make a special request to master server, for example GetInventoryItems. In the ClientProject, you would then create a simple request with a specific operation code (for example, GetInventory = 5. If you're not sure what the operation code is, you'll find more info here).

    Then you'd switch to ServerProject, and write a handler which handles requests with operation code 5. That handler would only exist in the ServerProject. At it's core, server is nothing more than a bunch of request handlers. If a build contains no handlers - it contains no code to run the server, thus making sure no user is able to create their own server by hacking the client.

    Regarding "the split", here's an image showing how you could achieve it - it's only a matter of having server/client specific code in the right folder.



    Let me know if it clears things up a bit :). I think I remember someone else asking about developing server and client separately, so I'll add a more detailed guide to Wiki, but only after the v1.02 is released - this is top priority at the moment.
     
    Last edited: Oct 23, 2016
  43. Noqomo

    Noqomo

    Joined:
    Aug 24, 2013
    Posts:
    7
    Great thank you very much for an excellent rundown.

    I will start my development cycle in the way you have depicted in the attached screenshot.

    Many thanks and look forward to the database rundown.

    - Noqomo
     
  44. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Noqomo likes this.
  45. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hello, my dear customers! (probably the cheesiest thing I've ever said/written)

    The update for V1.02 was planned for today (October 25), but unfortunately I don't yet feel confident releasing it - developing the universal lobby turned out to be a bit more difficult than I expected.

    I'll try to finish the update until the weekend (most likely release it on Friday).

    I'm truly sorry about the delays.

    P.S. In case you're wondering - the update will be free :)

    EDIT: I'm late again, but I'm working intensively on releasing it as soon as possible
     
    Last edited: Oct 30, 2016
    Skribble likes this.
  46. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    281
    hi
    when i have 100 players on 1 one server and when i use master server the ccu is unlimited do i need unet 100 ccu??
    Or i can use the free version with 20players?
     
  47. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Hey!

    You don't need to use Unity Services, so there's no limit to CCU.

    uNET and Unity Services are two different things. When you use uNET, you don't need to use Unity Services (for relay and matchmaking). This framework does not use unity services, just uNET :)

    Though, you will still need to host your server somewhere, so a number of CCU you can support will depend on your game logic (how many packets per second you send) and your servers computing power (this is a lot cheaper then Unity Services)
     
    Last edited: Oct 26, 2016
    MrGky93 likes this.
  48. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    281
    so i can make a game with many players real time like mmo.
    question is can i host many host on only one server and the master server load all host?
     
  49. alvyxaz

    alvyxaz

    Joined:
    Mar 21, 2013
    Posts:
    103
    Yes, you can make an MMO with uNET, but the exact number of players you can handle will depend on your server and how optimized your MMO code is.

    The WebGL demo example is running on a single server (VPS), which runs on 1 CPU core and 512 RAM. It can host 10 game server, but for the demo purposes, they are very simple. If you were to make an MMO, it might not be able to handle such a number of servers, and a more powerful machine would be needed to host them.

    When I start the server in the demo, it automatically starts 2 game servers for two different "world zones". Something similar could be used for an MMO.

    So to answer your question - yes, you can host multiple "hosts/server instances" on a single server, and this is what's done in my WebGL demo.

    Let me know if you have some more questions ;)
     
    Last edited: Oct 26, 2016
    MrGky93 likes this.
  50. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    281
    cool will buying it next week :)
     
    Skribble and alvyxaz like this.