Search Unity

I'm confused, is the new multiplayer API available for use?

Discussion in 'Multiplayer' started by legoblaster1234, Nov 5, 2018.

?

Is the new multiplayer solution usable yet?

Poll closed Nov 12, 2018.
  1. Yes, duh!

    42.9%
  2. No, stupid.

    57.1%
  1. legoblaster1234

    legoblaster1234

    Joined:
    Aug 7, 2017
    Posts:
    27
    Unity's website for the connected games talks as though this is usable right now, and these forums seem to be full of people who are using it but I still have very little idea what it is and how it will replace Unet and where I can even use it or if it's just an alpha testing thing. Can anyone help me out with knowing if I can make a multiplayer game right now or not?
     
    ZeFirestarter likes this.
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    There is a barebones implementation available for you to bash your head on. If you're planning to build a real game around it I'd wait until it gets more feature complete, unless you just need a basic transport and are particularly adventurous.
     
    hippocoder and legoblaster1234 like this.
  3. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    The current library that's available is just a udp transport without reliability, it's basically a thin wrapper around sockets. You could start with just a plain .NET socket and be at the same level of features almost.
     
    legoblaster1234 and Joe-Censored like this.
  4. Skjalg

    Skjalg

    Joined:
    May 25, 2009
    Posts:
    211
  5. legoblaster1234

    legoblaster1234

    Joined:
    Aug 7, 2017
    Posts:
    27
    Thank you for your responses, everyone. Why did they discontinue Unet if their new stuff isn't done yet? Should I just use Unet? Or should I just not make a multiplayer game until the new stuff is finished?
    Unity doesn't seem like they're being too clear about what's going on here.
     
    kfireven likes this.
  6. Skjalg

    Skjalg

    Joined:
    May 25, 2009
    Posts:
    211
    I agree with you.

    If you are uncomfortable using bleeding edge stuff, then don't use the new mutliplayer package just yet - just stick with UNET if that is easiest for you and you plan to launch in a year.

    If you plan to work on this project of yours for a very long time, I suggest checking out one of the many many other UDP packages out there for unity.
    Mirror is really easy to change to, as the API is based on UNET and has kept the original method names. The only thing it doesn't support out of the box (which unet does support) is the UDP Broadcast stuff.

    Here's some benchmarking tests and link to more packages
    https://forum.unity.com/threads/ben...dgren-miniudp-hazel-photon-and-others.512507/
     
    hippocoder likes this.
  7. LouishB

    LouishB

    Joined:
    Sep 25, 2012
    Posts:
    9
    Apologize for grinding the axe here, but I can see now why all the comments about Unity eating their own dogfood, because if they had to ship games on the platform they would see what a huge gap exists in networking today.

    Many relevant games will demand a real-time, affordable and authoritative networking component? FPS being a prime example.
    Indies simply don't have the resources to create and maintain low-level code libraries for say, multiplayer networking on mobile platforms (let alone windows, Linux, consoles etc.) Now we Indies wouldn’t even exist if it wasn’t for the likes of unity, and it is an incredible tool so I’m not complaining, but the fact still remains we have limited resources to focus on creating game play and fully leveraging tool-sets, not to mention everything else that goes with a successful game (too many things to list here.) The fact that unity is taking their “First Steps Forward” with connected games in 2018 is concerning.

    And a comment on the 3rd party networking libraries: they’re very good I’m sure (Photon, uLink, DarkRift, Forge) but I don’t see a sweet spot for real-time authoritative multiplayer client server (please correct me if i'm wrong) and even if there was using 3rd party for such a foundation / robust component is not optimal.

    p.s. water under the bridge, but I wish you had continued with your raknet implementation. Probably it didn't gain favor as a revenue source.
     
  8. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Photon Bolt was built specifically for this, was from the start. It does client-server auth games, has built in client side prediction systems, lag compensation, interpolation, delta compressed state transfer, etc.
     
    legoblaster1234 and LouishB like this.
  9. Abdul_M

    Abdul_M

    Joined:
    Feb 17, 2018
    Posts:
    11
    Hey guys, I'm getting this error when importing the package to unity.

    Assembly has reference to non-existent assembly 'Unity.Collections' (Assets/multiplayer-master/com.unity.transport/Tests/Editor/Unity.Networking.Transport.EditorTests.asmdef)

    can anyone help please?
     
  10. Bluegru

    Bluegru

    Joined:
    Nov 3, 2018
    Posts:
    2
    Quick question:
    Is the new multiplayer stuff now better suited to create a game with it or should I still stick with the old one/3rd party ones?
     
  11. bonickhausen

    bonickhausen

    Joined:
    Jan 20, 2014
    Posts:
    115
  12. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    For new titles, I would recommend checking out Forge, MLAPI (my own) and pretty much all of the products from ExitGames, generally they produce good stuff and usually has something for everyone, both price and feature wise.

    Also SmartFoxServer is something to look at for concideration, but for your average indie, I sadly have to say that it might be a bit much. SmartFox is very advanced and is quite incredible, but it's targeted at more advanced developers. Maybe others might disagree.

    But Mirror I don't really see a good fit for. It's feature lacking, slow, suffers a ton from being a UNET Fork and it has unpatched security flaws which has not been fixed.


    But I always love to hear arguments and I'm happy to be wrong.
     
  13. bonickhausen

    bonickhausen

    Joined:
    Jan 20, 2014
    Posts:
    115
    it works and it's free

    their support is sufficient

    thats literally all you need for 99% of indev games out there.
     
  14. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    You should always pick the best option. Just because something works doesnt mean its a good fit.

    A raw socket also works, and it’s free. That doesnt make it the best option.
     
  15. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    154
    Yeah, it is quite advanced because it offers a ton of features, but it's very easy to get started with, I'd say.
    Their tutorials are super-basic and they guide you from building a simple chat to a real time game via numerous examples. The advanced stuff is there when you need it, otherwise it doesn't get in the way. Which is why I was pleasantly surprised with it.

    my 2c
     
    TwoTen likes this.
  16. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    154
    That's interesting. I am planning to test Mirror later this year and I was hoping it had better performance than UNet.
    I have a game project coming up that requires Unity on the server side but I've heard multiple complaints about the lack of performance of this solution, e.g. when running one Unity instance (on server side) per active game/room.

    Doesn't Mirror offer any performance improvement over vanilla UNet?
    Thanks
     
  17. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    I'm going to be completely honest and say that I don't know what the performance of Mirror is like compared to UNET. I just know what it's like in relation to my own library which is very similar to UNET.

    Mirror creates tons of garbage, copies messages multiple times for no reason, uses LINQ etc. It has gotten better, but it's still really bad in my opinion.


    If you are looking for performance, you should check my library out. It shares a ton of architecture with UNET but since it's totally independent, we are not locked down by the limitations of UNET. I mean seriously, one of the most basic features that tons of people use are SyncVars. In Mirror and UNET, you can only make them sync to everyone, or no one. There is no in between. Things like health, ammo you dont want everyone to know.

    Anyone who tells me that is sane design for a game networking library I will call insane.


    If you want something similar to UNET but with more features and better performance, I would suggest looking at my lib and seeing if it fits your needs. You can see some feature comparisons here

    Oh and also, I did some security auditing of Mirror and found some security flaws and reported them. I reported them over 1 month ago and they have still not been fixed. I would think that's top priority.


    My conclusion is: Mirror is not an evolving networking library, it's a patched UNET. It's still UNET.
     
    Last edited: May 15, 2019
    MrsPiggy and hippocoder like this.
  18. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    281
    Hi TwoTen. Thank you for the appreciation for our SmartFoxServer. Would you mind please elaborate on why you think it is targeted to advanced developers only? That's not our opinion, but of course we are open to suggestions to improve. Thanks.
     
  19. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    281
    Thank you MrsPiggy for pointing that out.
     
  20. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Photon Bolt is a fantastic option for those without a lot of experience crafted by @fholm
     
    TwoTen likes this.
  21. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    154
    Thanks, I think I'll take some time to run some tests and see how it goes. I'll check your project too. Is it available online somewhere?

    Gotcha, though I guess that's why folks are interested in it, as UNet is what everybody knows.
     
  22. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    https://mlapi.network/ 100% free and open source. Licenced under the MIT licence.
    I agree, most things from exit games seems to get overlooked too much imho.
    I'm going to be honest and say that I might have been a bit quick to reply. I want to make it clear that I am not saying anything negative of SmartFox. I have great respect for it. What I am trying to say is that comparing the library to more engine focused ones such as my own MLAPI or UNET, it is slightly more complicated for someone with limited networking skills. But if you have the basics, I can't see it being in your way. I also need to be clear in saying that my experience with SmartFox is very limited
     
    MrsPiggy, g_a_p and hippocoder like this.
  23. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    "activley" should be "actively" on the MLAPI page but that's an easy fix for an otherwise amazing open source library :)
     
  24. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Haha thanks!