Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is MLAPI the best choice?

Discussion in 'Netcode for GameObjects' started by Arcalise, Sep 29, 2020.

  1. Arcalise

    Arcalise

    Joined:
    Sep 27, 2019
    Posts:
    20
    Hey guys! I'm quite new to unity networking. I just had a quick question if anyone has any knowledge to drop me i would greatly appreciate it!

    So i'm creating a multiplayer action type game. My preferred network solution for unity has long been photon. But ive decided to check in on other solutions(especially free ones) MLAPI seems to be a good choice. But i'm a little perplexed on its use.

    I'm wanting to create dedicated servers that players can connect to, search for matches and play games on. I dont want end users to interact with the servers directly(Like hosting them their selves). I want only for them to hit play and it does the rest. Is MLAPI capable of such a thing?

    I've been back and forth on it, but it seems like MLAPI was created with the thought that the players do the hosting. Maybe I'm wrong on that. But using a dedicated server that is inside unity for hosting seems like it would scale very poorly.
     
  2. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    146
    From the sound of it, what you need is Photon Bolt, it does exactly that, make matches, connect players together over relays. Give it a shot, the demo is free.
     
  3. Arcalise

    Arcalise

    Joined:
    Sep 27, 2019
    Posts:
    20
    Yes, Bolt was what i was initially looking at. But i'm very wary of their pricing model. Plus a lot of the CCU info they provide seems inaccurate. Such as the free plan of 20 ccu is enough for 8k mau. That makes absolutely no sense to me. It seems like, with 8k userbase(even if 80% is repeat users) you'd be hitting a 20 ccu limit daily.

    You see a game like FallGuys who probably never thought their game would become so big, And so they went with photon. Now they have 80k daily ccus and i dont even want to know what kinda bill their looking at for that. To me it seems worth it to invest the time and effort into a better solution upfront.

    I went ahead and took the DarkRift 2 route. Its free(albeit i'll have to host the server and that will cost something, Nowhere near the price of photon in the long run though.)
     
  4. Newbies-Unity

    Newbies-Unity

    Joined:
    Nov 19, 2015
    Posts:
    22
    Hi, With DarkRift 2 or MLAPI, if we have 1000CCU, How many vCPUs and Memory are enough? An example is the "Among Us" game. Thank
     
  5. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    146
    Actually I have launched successfull multiplayer titles, if a game sells a few hundred thousand copies, you have only a few thousands CCU on the weekend, people buy games more than play them at the same time. The money comming in from game sales, and perhaps DLCs is WAY MORE than whatever photon would cost you.

    Fall guys in your example sold their title to about 10 million people, with a launch price of 20 euro, of which after store cut they have 14 euro left they made about 140 million euro.

    The cut they have to pay to Photon is PEANUTS in compare of how much the game is making for them. Literally it is a joke you laugh about as a developer when you transfer the funds. You pay more in employee salaries and taxes, way more.


    Your choice to go for DarkRift 2 is An strange one to be honest with you, It comes out of the box with pretty much nothing more than a wrapper around UDP and TCP sockets, and honestly as a network game developer, you should not mix TCP and UDP traffic, because TCP will push UDP out of the pipe.

    You are setting yourself up here to make everything yourself, sounds to me like a big waste of time you could spend on making your game better.
     
    Last edited: Oct 1, 2020
    Mikael-H, tobiass and Munchy2007 like this.
  6. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    They did not. They thought it's a good idea to go with Unity's networking solution. At least read Unity's blog post properly.
    To be frank: While asking for help (finding a multiplayer solution) you blurt out a lot of misinformation and half-knowledge which probably blocks a lot of good input you could get otherwise.
     
    Last edited: Oct 1, 2020
    KyleOlsen and nxrighthere like this.
  7. Arcalise

    Arcalise

    Joined:
    Sep 27, 2019
    Posts:
    20
    Im not sure what youre getting your info. They havent actually said what their network solution was. However mediatonic had job requests out for photon developers. So its assumed they used photon as their native networking. I'd be super SUPER surprised to hear they used UNET.

    I get your points. But DarkRift2 is more then just a wrapper. Especially if your using the dedicated servers. It provides some mid-level abstraction with options to go low level.

    I do definitely get its not the easiest option though.
     
    Last edited: Oct 1, 2020
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,533
    Link? AFAIK Fall Guys did their own networking solution.
     
  9. Arcalise

    Arcalise

    Joined:
    Sep 27, 2019
    Posts:
    20
    AcidArrow likes this.
  10. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    611
    @tobiass is a developer at Photon. I believe he has first hand information
     
    SenseEater and tobiass like this.
  11. Arcalise

    Arcalise

    Joined:
    Sep 27, 2019
    Posts:
    20
    Ah yeah i see that now. still, its curious to see the job posting about photon. Now I'd be really interested to know what their network solution was ><
     
  12. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,057
    Yes. You assumed. Without any internal knowledge of either company in question.

    Even if Mediatonic used the solution you assumed they were using, you still have no idea if they are happy with it or not and what the fees are. You don't have the full picture.

    Make your game. Tell us about your experience.
     
    Last edited: Oct 2, 2020
    Munchy2007 and Vincenzo like this.
  13. AmbientGames

    AmbientGames

    Joined:
    Sep 20, 2020
    Posts:
    2
    I mean, just use Mirror. It's extremely plug and play while being advanced. And everything is free. The only problem is port forwarding (Because your router's firewall isn't disabled, other clients can't connect because the router is probably thinking it's a hacker or something like that.). For the testing phase, you can have it connected to your router. After that, a private server is necessary.
    I recommend going with vultr. They offer a pretty decent vps for $2.50 (Monthly I think. You never know with server hosters.). Another way you can use Mirror is with either Steam Transport or Epic transport (As in epic games). This allows players to connect to each other through the transports servers.
     
    imDanOush likes this.
  14. xXDarQXx

    xXDarQXx

    Joined:
    Jan 3, 2021
    Posts:
    5
    I'm sorry if I'm missing something but you all haven't talked about unity MLAPI at all. I'm also new to networking and to unity in general and I was wandering if I should start learning unity MLAPI or photon. can you guys please help me out?
     
    FlightOfOne and gwelkind like this.
  15. isawyou0

    isawyou0

    Joined:
    Oct 8, 2020
    Posts:
    30
  16. Xentios

    Xentios

    Joined:
    Jan 15, 2019
    Posts:
    17
    I also need a stable and CCU limitless option. I like my current networking sdk but it is not stable.


    I am making a free game so yeah paid services for 40 ccu is not an option for me.
     
  17. rangolee302

    rangolee302

    Joined:
    Feb 1, 2018
    Posts:
    22
    Glad to find a network game developer. Hope you can share more

    So what would you recommend a developing project to go for Photon and as the sales rockets it would be nothing compare? Or a different story for a new project. Photon honestly seems to be the best choice for indie developers as it takes care of matchmaking, relay service, and stuffs in which they can focus on gameplay. But how would you rate it?

    I heard LiteNetLib is using UDP and it seems to be a good custom transport parts. Do you know anything about it?
     
  18. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    146
    @xXDarQXx MLAPI is going through a large refactor and nobody knows how it will come out after that, Right now its mediocre at best. It's not very tried and tested library. Photon is.

    @Xentios Only the sun comes up for free.

    @rango302
    Basically in most cases, if you have a succesfull game with lots of CCU you are RICH, the photon fee is a joke you gladly pay, From being involed with various projects I can tell you the photon CCU fee is 3 times lower than if you would negotiate a 1% revshare deal.

    Also Photon is about to come out with a new product that replaced both their Bolt and PUN lineups : Fusion, it should release in the near future, I have experimented and its revolutionary.

    Litenetlib is ALRIGHT, As a UDP library It will work, but it's nothing special, It's power is that its completely written in C#, but it's abusing a lot of threads, uses global locks all over the code base which are slow in mono and generally is inefficient, In general the concept of having a Transport library is wrong and outdated.

    Only you as a network game programmer know what data is important, what should happen to it, what to do when something gets lost, etc, and WHEN something should happen, leaving a network transport to do its thing in its own time in a thread sending when it wants, receiving when it wants, deciding how to resend and ACK how it wants, it's just a big black box and screws up your network game. You have no full control on time, no control on execution orders. no control.

    I would strongly advice anyone that wants to make a proper game either do it right and use a raw UDP socket and write stuff on top, or use the tried and tested libraries that actually work. and sure that is not for free. but what is?
     
    Drannach and N8tSeegers like this.
  19. isawyou0

    isawyou0

    Joined:
    Oct 8, 2020
    Posts:
    30
    Mirror is the best for me, it's easy, and open src