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?
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: Master Server sample project - Unity Engine - Unity Discussions
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 (Platform roadmaps | Unity) 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!)
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.
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.
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.
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.
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?