Search Unity

Unity Multiplayer UNet Deprecation Thread

Discussion in 'Connected Games' started by BHouse, Aug 2, 2018.

  1. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    7,253
    Unity's "support" for Unet is really no different today than it has been since 2016. No feature improvements, no one assigned to even working on the HLAPI, don't expect any bug fixes. Nothing has changed other than being upfront about the situation.
     
    Monteworks likes this.
  2. Genay78

    Genay78

    Joined:
    Jul 5, 2019
    Posts:
    25
    I confirm Mirror is really great. It's even better than UNet, strong community, strong support. Nothing to worry about, the rightful successor is here.
     
    Joe-Censored and vis2k like this.
  3. greenbraygames

    greenbraygames

    Joined:
    Apr 24, 2019
    Posts:
    8
    Where is the documentation for the new tech stack? I'm having trouble finding it. Same for server authoritative code. I was hoping for some help in figuring out what to use instead of UNET like what my options are. I dont have release planned for another year it was less time but still over 6 months.
    I'm completely unsure what to do due to the lack of real visible options at the Moment. Some of the pages I've read about it all either refer to UNET or it has no real replacement for the time being.
     
  4. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    255
    Been a while since I bothered to naysay Mirror...

    It'll take you longer than you think, so you have time. Use UNET or Mirror, they're both terrible. Don't believe the hype about Mirror. Fixes some bugs that you may or may not run into, but does so while rewriting the code very poorly. Use either one. It's prototype code that you'll have to rewrite for production, but will save you a ton of up-front development frustration. Both libraries will do server authoritative. It's a matter of configuration.

    If/when the new stack becomes viable, you can switch out the networking for your working game pretty easily if you take any care at all to keep it abstracted.
     
    Last edited: Sep 18, 2019
    TwoTen likes this.
  5. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,348
    Agreed, always better to try for yourself first :)
     
    Joe-Censored likes this.
  6. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,150
    If you need the architecture and features powered by the new tech stack or you wish to roll your own solution out. I totally agree. They are the best options for the "high tier" networking.

    If you wish an alternative to UNET, you should check out my MLAPI project. It shares the same architecture with UNET. Which means it has many of the same principles of UNET but also allows you to build all in house. It doesnt force ANYTHING on you, everything is optional and can be used together with every other feature. Say you want your own spawn system, you can easily replace MLAPIs system and write your own while still getting the features of the MLAPI such as serialization, encryption and much more. It's a more layered approach that works if you want something super high level such as UNET and also if you want to roll your own solution out all together but just have some barebones stuff to help you.
     
    Last edited: Sep 19, 2019
    Joe-Censored likes this.
  7. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,150
    Fair, my apologies. Comment was edited.

    What angus wrote down below is about what I tried to convey. The comment was not pure humorus, it had a underlying point / implication. But my wording might have been unfair.
     
    Last edited: Sep 19, 2019
    Joe-Censored likes this.
  8. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    255
    Software is not something you "try", unless trying means actually testing its suitability for your use cases. Testing, let alone integrating, a networking library is not something to be done on a whim. Please don't imply that just because something doesn't fail an immediate smoke test one should make the leap to using it.
     
    Joe-Censored and TwoTen like this.
  9. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    911
    Why not keep UNET and improve it, and keep it free?
     
  10. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    7,253
    It is a little late for that question, but here's their answer from a little over a year ago.

    https://support.unity3d.com/hc/en-us/articles/360001252086-UNet-Deprecation-FAQ
     
  11. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    552
    Ironically, the current implementation provides nothing of this while it's in development for more than a year. It's almost the same traditional networking abstractions that were available for decades, just done from a bit different angle, suboptimal in several aspects, lack of many essential features at each layer, and evolve very slowly.

    The ambitions of people behind management and marketing at Unity surprising me every time. So many promises and loud statements while there's so little actual progress.

    You have invested in Multiplay with infrastructure, why you don't invest in the engine's network subsystems respectively? I only see some internal reshuffling since Alexey Abramychev left the company in April, but those people who are working on the new stack now are really can handle it? Because for now, it doesn't seem so.
     
    Last edited: Sep 28, 2019
    Gekigengar, Kylotan, goldbug and 5 others like this.
  12. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    911
    Why not mark something as deprecated only when you have another production ready alternative available?
     
  13. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    255
    Are you complaining or asking a question? It's already been answered, just like your last question.
     
  14. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    911
    Where has it been answered ?
    Does it matter if it is a question or complaint, e.g. is this only for your own info / knowledge?
     
  15. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    255
    Hello again new friend.

    Sure, let's pretend you do need this spelled out in detail? Complaining would hopefully just be ignored. An actual question someone might be inclined to answer (by needlessly quoting this very thread for you again.) Either way, it's been covered extensively quite some time ago, which should also not need to be explained.

    I don't actually care if you're complaining or not, you busted me. Just wanted to point out that you are not adding anything useful here. I'll simply un-sub from the thread, problem solved from my end. Please see https://github.com/angusmf/HLAPI-ex for an example of how you can at host your own forked version of the HLAPI package and fix things like the deprecation warnings if you like.

    Goodbye sweet deprecation thread! I'll miss those exciting early days, the snarking, sniping, the woe! Vis and 210, hugs'n'kisses...see you on the next one!
     
    Last edited: Sep 30, 2019
  16. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    911
    Sorry if I am late to the party... thanks for the information.
    Did not intend to rain on your parade, but your tone to me sounded a bit abrupt initially, let's move on and be civil to each other :)
     
  17. sky-coding

    sky-coding

    Joined:
    Oct 26, 2018
    Posts:
    2
    It's frustrating that all of the LLAPI classes are marked as Obsolete and have had their documentation stripped out, without a native alternative in place. Despite this I went to use the LLAPI today for a quick UDP+WebSockets prototype (which LLAPI is perfect for) using Unity 2019.2, but NetworkWriter and some other important low level stuff has been entirely removed. I'm having to roll back to 2018.4 LTS so I can just get some simple networking done. How did Unity's multiplayer support end up in shambles like this? Is nobody making multiplayer games using Unity these days?
     
    khos likes this.
  18. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    552
    People are making but using 3rd-party software, many alternatives to LLAPI are available on GitHub.

    Lack of proper leadership and investments, lack of competence in the field, the keyword here is lack.
     
  19. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,150
    NetworkWriter and such is distributed as a package for the newer versions of Unity. You can still grab it.
     
    Joe-Censored likes this.
  20. Eben_

    Eben_

    Joined:
    Jan 3, 2017
    Posts:
    1
    Hey folks, I'm trying to understand something. I'm new to networking and know very little about it works. If I run an old version of Unity that still has UNET, will it still be okay to create a simple multiplayer game that doesn't use a dedicated server? (and players can just host and connect to each other directly) I understand UNET has been deprecated but the code will still work right?
     
  21. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    911
    To be honest I am not sure what is going on, other than UNET seems to be made deprecated while there is no suitable replacement. Others , please correct me if I am wrong.
     
    Joe-Censored likes this.
  22. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    264
    If you want to make multiplayer games and still (basically) use UNET, I recommend Mirror. It's basically UNET with fixes. It will be easy to get into due to the similarities with UNET and all the UNET tutorials that are already out there.
    Personally, I don't have any experience with MLAPI but it seems promising. Maybe you could give that a try too.
     
  23. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,150
    MLAPI is also very close to UNET but has many more features, and is a much more modern and feature rich alternative.
     
    Joe-Censored and RealMTG like this.
  24. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    694
    That is right. You may want to go back and read the first 2 or 3 pages of this thread. Your's and many other questions have been asked and answered.
     
  25. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    911
    Ok, thanks for the info :)
     
  26. polysoft3D

    polysoft3D

    Joined:
    Aug 3, 2015
    Posts:
    19
    I try implement new Multiplay from github

    I have this error
    Assets\sampleproject\Samples\Ping-Multiplay\Client\MultiplayPingClientUIBehaviour.cs(4,19): error CS0234: The type or namespace name 'Ucg' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    Assets\sampleproject\Samples\Ping-Multiplay\Server\MultiplayPingServer.cs(8,13): error CS0234: The type or namespace name 'Ucg' does not exist in the namespace 'Unity' (are you missing an assembly reference?)

    and other 11 errors like that

    Ucg what is that ?
     
  27. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    101
    With Google Play Games Multiplayer and Turn Based retiring on March 31st 2020, what are alternatives for an Indie Turn Based game w/o in-apps or ads, so no constant cash flow, in turn can‘t afford high server costs? The UNET cost calculator came up with a totally affordable number, and with the Connected Games announcement I thought this would be a good replacement for GPGS with probably a similar cost structure. However none of that materialized, with turn based being not addressed at all for now. What are you other TBG devs doing? Is everyone now coming up with his own server infrastructure to handle it?
     
  28. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,348
    You don't need Unity's services to host your game. Just host it on a server somewhere on the internet.
    We host one of our Mirror demos on a f1-micro server on google cloud, which is completely free.
    If you need a relay then that's a different story of course.
     
  29. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    101
    Maybe the hardware portion is rather easy, but what about the software orchestrating everything? What about the whole push notification infrastructure cross platform (Android, iOS, Windows, macOS, ...). I don't feel like I'd be able to come up with a competitive server-side orchestration of a TBG with all the bells and whistles to be considered.
     
  30. janne404

    janne404

    Joined:
    Jul 26, 2009
    Posts:
    15
    Is there easy way to hide/disable all the UNet hlapi deprecation warnings in 2018.4? I know it is necessary to display deprecation warnings to get the message across, but when you acknowledge the situation and have decided not to upgrade it would be nice to be able to just disable them.
     
  31. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,348
    Try Mirror :)
     
  32. mhernandez88

    mhernandez88

    Joined:
    Jul 20, 2016
    Posts:
    25
    I know your post was a few months ago however I had to address it. I know you from the Forge community and I know you have a fair bit of expertise, however I think you may have missed the point of the new networking tech. No one has promised some new magical solution, in fact they have promised the opposite. Unity has taken the responsible approach of saying hey we cant code everything so we are going to provide you the building blocks and code a few architectures on top of it called "Game Archetypes". So instead of providing "One networking solution to rule them all" they will provide, FPSNetcode, MMONetcode etcetera.

    The other thing to note is that the transitions largest change is that it is part of the DOTS ecosystem and as such supports performance by default. What does this mean? The base architecture is considered an optimal starting place for developing performant code. All ECS objects and by definition all the Networking objects are laid out in memory linearly as to take advantage of cpu caches. This also allows for efficient calculation of deltas and a bunch of other fast optimizations.

    UNet and every other monobehaviour based library are good for what they are, but what they are is now apparent, they are fragmented wastelands of poorly optimized memory that provide a high amount of functionality and usability, but are not performance by default.
     
  33. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    195
    This plan was revealed in September 2018. So far, we have precisely one archetype, the FPS Sample, which isn't in a great shape. I guess there's also the Asteroids sample in the multiplayer repository, which is 95% DOTS boilerplate. So don't hold your breath waiting for the others.

    Almost none of the networking functionality will benefit from this because the network is already hundreds of times slower than memory. You are almost never limited by memory throughput or CPU usage when working with network code. The reliance on DOTS here is more of a political move than a practical one.
     
  34. Bardian25

    Bardian25

    Joined:
    Mar 5, 2018
    Posts:
    3
    Sorry if anything like this has already been covered somewhere, or if this is the wrong place to ask, I tried to look on a few forums related to this. Been trying to learn to make a game with a private server (to where players could run their own for free) in unity for years now and can't seem to find good information on networking. Even before the old system was depreciated I couldn't find tutorials anywhere for the LLAPI that resulted in working code. The HLAPI could be an ok jumping off point but I couldn't find anything about how to even customize the terrible login menu. They released the FPS demo and I downloaded that at one point, but it's just diving in the deep end without knowing how to dog paddle. How does anyone actually get their first foothold on multiplayer?
    Is there any simple, actionable information out there for getting started on learning low level networking in Unity without having to wade through a literal complete AAA game worth of scripts?
    edit: just want to be clear when I say "simple" I mean relatively, I do understand networking is not actually very simple at all, have learned the basic concepts theoretically, just no working product yet.
     
    Last edited: Jan 16, 2020
  35. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    7,253
    Currently there is no ready to go fully supported networking with good documentation or tutorials from Unity themselves. Take a look at available 3rd party networking solutions to see if one of them fits with what you are wanting.

    Or if you mean as low level as you can go, look for information on using the standard C# Socket class - the information doesn't even need to be written for Unity specifically
     
    Bardian25 likes this.
  36. Bardian25

    Bardian25

    Joined:
    Mar 5, 2018
    Posts:
    3
    Well that explains the difficulty. Thank you so much for pointing me in the right direction.
     
  37. pantang

    pantang

    Joined:
    Sep 1, 2016
    Posts:
    37
    Will this work with our own servers or are we tied into renting your servers from now on if we want to use this part of the api? I could really use an answer as it could change the direction and engine of my project. Please don't make me install the epic launcher....
     
unityunity