Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Are we required to use MatchMaking?

Discussion in 'Multiplayer' started by ultraviol3nt, Sep 10, 2015.

  1. ultraviol3nt

    ultraviol3nt

    Joined:
    Jan 17, 2010
    Posts:
    155
    Does the new networking system require us to use Unity's MatchMaking service? Is the MasterServer class still available/have a successor? How does the new system work for things like MMOs?
     
  2. ObliviousHarmony

    ObliviousHarmony

    Joined:
    Jul 3, 2014
    Posts:
    79
    Hello,

    UNet's HLAPI is not directly tied to the MatchMaker, and there are "levels" to the HLAPI, which allow you access to varied implementation requirements. For instance, in the case of developing an MMO, you can abuse the fact that there can be multiple NetworkClients to connect the user to multiple servers (though I would advise against this in any case, as it's better to use a relay into your game's internal network, rather than exposing all of your servers to DDoS attacks) This does however mean ignoring Unity's built-in "Network Manager" component, and writing your own. Discussions of architecture aside, Seanr posted a sample that may give you an idea about creating a master server: http://forum.unity3d.com/threads/master-server-sample-project.331979/

    As for using UNet for an MMO, I believe that this is the end-game goal for UNet's third phase, so much of what you can use in the HLAPI is seemingly built with that in mind. For instance, it is possible for you to receive entities from two different servers at once. The only potentially major deterrent to using it is that you cannot create a dedicated standalone server without it being a Unity app, but personally I think a headless app would run fine, if you did it right. If this is an issue however, Unity's roadmap (https://unity3d.com/unity/roadmap) says they should have support for this next year.

    Personally, I've evaluated UNet for use in an MMO, and I'd say you could do it reasonably well with the HLAPI, but there is always the LLAPI if you want to write it all yourself. (If you're using the LLAPI for an MMO, it might be wise to use a publicly available networking library, as then you can create your non-unity app servers. Of course, if you're targeting more than just a computer, Unity's LLAPI works on all of their platforms!)
     
  3. ultraviol3nt

    ultraviol3nt

    Joined:
    Jan 17, 2010
    Posts:
    155
    Multiple servers, eh? I was making a private MMO, but that's a huge advantage for the bigger devs.

    I'm enjoying it so far, and it works really well with minimal coding. Networking used to be a thing that took at least half an hour of code to even begin testing, this gets you up immediately. I love it so far.
     
  4. TehGM

    TehGM

    Joined:
    Nov 15, 2013
    Posts:
    89
    Multiple servers can be used for non-game stuff, too. You can have separate server for global chat (look - guild chat in MMOs like EVE Online, Guild Wars 2 or World of Warcraft).

    Yes, it is way easier to set up than other networking systems. However I hate the limit of one player object per player. Spawning with client authority partially solves this, but I'd like to have player objects with server authority.
    UNet does have issues, but as for now I'm being understanding about it, as it's a new thing.
     
    Last edited: Sep 11, 2015
  5. ultraviol3nt

    ultraviol3nt

    Joined:
    Jan 17, 2010
    Posts:
    155
    But it is a trade-off. Sure, the one object thing may be annoying, but what you're getting is the ability to, much more easily, build a fully authoritative server, something that, in the past, was worthy of words that would get me banned on here.
     
  6. TehGM

    TehGM

    Joined:
    Nov 15, 2013
    Posts:
    89
    Honestly, it's a matter of game design. My design is to have main player object, that has child objects tied to it as separate modules. And the object could then be destroyed piece by piece. And at once, I want each to be tied to player so they can control it, and at once server-authorative.
     
  7. ultraviol3nt

    ultraviol3nt

    Joined:
    Jan 17, 2010
    Posts:
    155

    So essentially if the player were to, say, switch weapons, that weapon prefab can only be created or destroyed by the server, since the player is already spawned by the client, correct?