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

Discussion What are the pros and cons of available network solutions/assets

Discussion in 'Multiplayer' started by Serinx, Jan 7, 2019.

  1. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    146
    Hey @Iron-Warrior I absolutely agree, game design matters here, Your test showing 96 ms delay shows that. :)
    About the delay, last point from me is that 96 is an ideal case, but if you have cross play with players from different parts of the country, this delay might shoot up to 160 ms or 200, and become impactful.

    If you have a click game where the character walks towards that direction, delay is less problematic, and other such tricks can be used.

    Another limitation of the streaming technique is that you need to share the same screen/camera with the other players if you want to run many camera setup in your game on unity, that doesn't perform very well, and the streaming service has to compress multiple video streams, not sure how that scales.


    Your point about the lack luster networking libraries out there I absolutely agree with.
    Maybe your type of game though might work well with Photon Bolt, it does have most good networking features build in.
    Whilst not having to redo your game for Quantum.

    Quantum obviously is the best choice here today, I know of some mid size Indy studio's that are converting their existing game project to Quantum, it is doable, but does take a few months.
     
  2. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    140
    It's 2021 and the new Unity multiplayer solution should be released according to their roadmap, but I seem still not seeing anything come out yet. Correct me if I'm wrong.
     
  3. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    533
    I didn't bother to look it up, but I heard some people talk about using the "new" multiplayer preview. Maybe there is a preview package in the newest Unity 2020 (beta) version or something on their Github. But I think that the new multiplayer stuff will be DOTS related? I don't know the current state of DOTS, I think it's also in preview? I wouldn't bother with any of this stuff until the 2020 LTS version is released and I am not sure if that one will already include these things or if they will still be in preview by then.
     
    Last edited: Jan 7, 2021
    SweatyChair and LukeDawn like this.
  4. Yehudy85

    Yehudy85

    Joined:
    Feb 14, 2019
    Posts:
    2
    I have tried mlapi in a simple 2d multiplayer game, but it is not very efficient. When it comes to randomly generating enemies on the client side, the movement of the enemies has a lag. This is the link of the game that I tried to create using mlapi since in the example they use the mirror library. https://gamedevacademy.org/how-to-create-a-multiplayer-game-in-unity/
     
    SweatyChair likes this.
  5. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
  6. FL329

    FL329

    Joined:
    Apr 4, 2021
    Posts:
    1
  7. luke-unity

    luke-unity

    Joined:
    Sep 30, 2020
    Posts:
    306
  8. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    Anyone using Normcore?

    Would be interested to see a pros / cons on that
     
  9. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    279
    LogicFlow and Ruchir like this.
  10. Mariiooo

    Mariiooo

    Joined:
    Sep 4, 2019
    Posts:
    6
    Did anything change in 2021? I'm researching this topic. I want to choose the right multiplayer solution for my project. Not only that, but I also saw that the Unity Networking Frameworks - Feature List docs haven't been updated for a long time. If anyone has any information about this topic in 2021 I would be happy to hear them.
     
  11. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    I did a deep dive on this last year and looked into it again last week. I'd still go with Mirror in most cases.

    One of the big things that has changed in the past year is that Epic started providing a lot of backend services for free (services that you can use in your Unity project; they have a plugin for Unity). Check out Epic Online Services and see if any of those features might be useful to you.
     
  12. RR7

    RR7

    Joined:
    Jan 9, 2017
    Posts:
    254
    we do have (MLAPI based) "unity game services" now, which is the official replacement for UNET, and there are lobby/relay examples which may fill the gaps left by HLAPI.
     
  13. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,173
  14. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    Any updates to the list? I don't see Fish-Net, NetCode or updates to Photon with Fusion. Anyone know of a maintained list like a wiki page that is kept up to date?
     
    vexstorm and georges-m like this.
  15. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    389
    It says "New Unity Networking (What's it actually called?)" lol...
    Seems this thread is very dated though; none of the links work.
     
  16. chrisx84

    chrisx84

    Joined:
    Nov 9, 2011
    Posts:
    85
    Thanks for the post. Been debating on going with Mirror, another solution or code my own with Java as the server code. Probably go on my own since it seems to give me more control over my game.
     
  17. Serinx

    Serinx

    Joined:
    Mar 31, 2014
    Posts:
    788
    @Punfish @chrisx84 I haven't been maintaining this list sorry. I'll add a note on the OP to warn people.
     
  18. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    389
    If you're bored and want to toss Fish-Networking on there I made this as unbias as possible.

    Fish-Networking
    Pros:
    - Free, and no concurrent user limits.
    - Original code base.
    - TCP and UDP support; can be swapped out. Other supported transports are Epic Online Services, Steam, and more.
    - Good documentation, consistently named and commented API.
    - Regularly updated, fast bug fixes.
    - Long-term support and scheduled/limited API changes.
    - Released games on product proven to scale to hundreds of CCU.
    - Advanced Area of Interest system with condition stacking, and Network Level of Detail.
    - Client-side prediction.
    - Lag compensation.
    - Scene manager for scene instances, global scenes, connection scenes, match scenes and more.
    - Network object pooling.
    - Most features of any free solution.
    - Encryption layer.
    - Addressables support for Scenes and Prefabs.
    - Allows for custom sync types, serializers, AOI conditions and more.
    Cons:
    - Unity dependent.
    - Match making requires a third party service.
    Model:
    - Client/server, or peer to peer with third party transports such as Steam.
     
    Ruchir likes this.
  19. Serinx

    Serinx

    Joined:
    Mar 31, 2014
    Posts:
    788
    @Punfish thanks, added it at the top since I've heard a lot of good things about it xD
     
    Punfish likes this.
  20. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    What actually makes Photon better then free options such as FishNet, Mirror, or NetCode for gameObjects? I'm looking at Pro versions of Photon that can cost 13K pre CCU costs and I don't see how it does anything that the others can't?
     
    Ruchir likes this.
  21. Jirka-Mayer

    Jirka-Mayer

    Joined:
    Mar 18, 2019
    Posts:
    18
    THE major difference between Photon and others is that Photon is a service, whereas the other solutions are frameworks/libraries. This means that with Photon you don't have to worry about server infrastructure. With the others, you handle that yourself. Completely.

    If you look at Photon Fusion "Public Cloud" pricing [1], you see that it costs $500 monthly for 2000 CCU. That sounds like a lot, right? FishNet or Mirror are for free with unlimited CCU! Well, let's do some calculations:

    Take an average desktop PC. How many CCU do you think it can handle? Let's say 100 CCU. This is wild guess, but it's in the ballpark. The reality is going to be somewhere in between 50 and 500. Now, let's look at Digital Ocean virtual server pricing [2]. Let's assume a machine with 4 GB of RAM and 2 CPU cores will do (it only runs the OS and your server, nothing else, but this is still a guess). One such machine costs $24 monthly. For ~100 CCU. That means you need to run 20 of them to handle 2K CCU, which will cost you $480. Suddenly the $500 for Photon isn't that much.

    I'm saying this to point out that Photon is not 100x more or less expensive than other solutions. In reality, it's more like 0.5x to 2x the cost. I.e. it's comparable.

    So which one should you choose? It depends:
    • Do you want a game prototype out quickly to validate it (and you don't know any of these)? Use Photon.
    • Do you want to use the Steam peer-to-peer networking [3] and let players run their own servers? Use FishNet.
    • Do you have older Unity devs who used to work in UNET and they don't want to learn much new stuff? Use Mirror.
    PS: If there's anyone from FishNet (@Punfish I know you did some benchmarks [4]) or other solutions and know how many CCU an average game can do with the server I mentioned, please correct me. I would like to know what the true raw cost per CCU is. Thanks!

    [1] https://www.photonengine.com/fusion/pricing
    [2] https://www.digitalocean.com/pricing/droplets#basic-droplets
    [3] https://partner.steamgames.com/doc/features/multiplayer/networking
    [4] https://fish-networking.gitbook.io/docs/manual/general/performance/fish-networking-vs-mirror
     
  22. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    Thanks that help clarify a lot and you link allowed me to look at a few services and use price calculators to find that Digital Ocean would cost about 11K up front instead of 13K and would than cost slightly less monthly for additional CCU. Normcore can also be compared with this information and one can compare dedicated servers VS cloud servers. So, it's good to know that as far as frameworks go photon is comparable but as far as services go Photon has a model for servers dedicated to game data and when it comes to cost it should be compared more with hosting services like Digital Ocean, Vultr, Azure, and AWS (Or if your able with bare metal or dedicated self-hosting) rather than networking frameworks. Based on that I still feel FishNet, Mirror or NetCode For game objects would suit my personal needs better.
     
    Jirka-Mayer likes this.
  23. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    389
    I don't have any recent benchmarks but I can say with absolute certainty that Fish-Networking still drastically outperforms NGO and Mirror in every way imaginable. It's very possible that Fish-Networking can use ~95% less bandwidth and CPU than Mirror, and Mirror is more performant than NGO.

    Far as cost calculations go, that's a tricky one, because there really is no way to provide a realistic expectation for cost per CCU. I'm a little rusty on my Exit Game products CCU cost but it's my understanding you pay a flat amount and get a flat amount of CCU and bandwidth, and pay more if you need it.

    Host your own solutions CAN be much cheaper, depending on which solution you use. I've received feedback that users of Fish-Networking have scaled to over 300 CCU on a $50 server. When I was shown the server metrics I saw that FishNet was nowhere near hitting their allotted bandwidth nor CPU; it's very likely the same could have been achieved with a $10 server. Also worth mentioning, this was on FishNet v1; needless to say we've made some very considerable improvements since that time.

    Far as all-in-one packages, the only one I'd consider using by Exit Games is Fusion; it's a good product. But costs aside I'm not sure I'd ever be comfortable locking into an Exit Games product because once you are in, you're stuck, and it's a huge rework to leave. Where-as with others if something does not work, you just take out that part and use something else.

    The only time in my opinion it makes sense to use an all-in-one is when you do not want to take the time to setup the other services. But you should be very aware if your game scales you're going to likely pay the price down the road.

    This response is not my advice on what to choose but rather how I would view this situation from the outside.
     
    WinterboltGames and Jirka-Mayer like this.
  24. Lukeesta

    Lukeesta

    Joined:
    Jan 7, 2016
    Posts:
    78
    From what I've seen in my experience, Industry standard rates for dedicated server cost are about $1-$10 per peak CCU (usually on the higher end, 1$ is what you will get with something like a console runner for a card game). This is often even true for AAA companies who spend millions on CPU and bandwidth cost and have a heavy incentive of optimizing this. Of course you can get much cheaper by renting a single server from something like Hetzner or running it in your own basement. What you need to consider in your costs are:
    - Cost of the server itself. Be it cloud CPU, baremetal rental, data center space etc.
    - Not using crappy cloud vCPUs that while cheaper on paper are not suitable production game servers.
    - Bandwidth cost. Yes bandwidth is not free and most often what's most expensive. You get this for free if you are small and under some introductory tier. Standard rates are 0.05-0.20$ per GB and some regions are notoriously expensive.
    - Operations cost. People who can do proper dev ops on game server and ensure that they stay online pretty much 24/7 are very expensive. As an indie you can hide this cost by running it yourself. 1 Person dev ops jobs are generally very efficient (but not reliable). However scaling this to a functional larger team running dev ops for a server fleet is a whole other story.
    - DDoS protection, while generally cheap for websites much more expensive for games due to the way we structure our fleets and multiple public access points of failure.

    So yes at a small scale you can probably be cheaper than Photon. But the idea that dedicated servers using any solution (including our own Photon Fusion) can be cheaper than our cloud relay based products for successful games is just wrong.
     
    Jirka-Mayer likes this.
  25. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    389
    Can you please help me understand something, because there's a fair chance I'm not 100% understanding your pricing charts.

    Looking at this page for example https://www.photonengine.com/fusion/pricing, is $125/mo the cheapest you can get with Exit Games for 500 CCU? Or is this $125/mo if explicitly using Fusion? Do you have other prices for perhaps your relay only?

    The reason I'd like clarification is because I am certain FN can handle 500 CCU on an under $50/mo server, which is cheaper than $125. To be perfectly clear, not trying to get into any contest, but either I'm wrong about your pricing or you're wrong about running your own dedicated servers always being expensive on larger scaled games. I don't want to be the one giving out wrong information so please educate me.
     
  26. Lukeesta

    Lukeesta

    Joined:
    Jan 7, 2016
    Posts:
    78
    Everything you said about Photon is correct. I cannot speak of Fishnet's ability to run game servers for incredibly cheap as I haven't run a Fishnet server myself. However I have already explained true costs of dedicated server hosting and why costs do not scale linearly above.
     
  27. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    389
    A lot of that seems speculative. I'm sure there is some truth behind extra/unforeseen cost, but when I say developers have run 300+ CCU on a $50 server using FishNet, I mean that is their total cost - not just renting the server, and repeating myself for clarity that the $50 server was overkill.

    Obviously not all HLAPI solutions are made equally, but if someone were to use an efficient networking solution or even create a custom implementation it's reasonable to believe self hosting would still be cheaper than Photon pricing. I know you need to back your product and I need to back mine so we are both a little bias in this; but when it comes to speaking openly I do my best to vocalize what I believe to be the truth, and that is: with supposition aside I simply I do not believe Photon pricing is cheaper than hosting your own servers be it for a pre-built HLAPI or your own stack.
     
  28. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    If you compare the bill for a "machine on the internet" to the bill of a hosted service, then yes, the single machine will be cheaper.

    You don't spend a lot of money but you set up the machine, maintain, monitor and fix it. You are on alert duty 24/7. You have to cover exploits and DDOS attacks. You scale your number of machines to the amount of players.

    The point is not that one is cheap and the other expensive but to acknowledge that the two approaches are not remotely the same. Money versus ease of use. Use Unity or build your own? Buy food or grow your own.
     
  29. HolyFireGames

    HolyFireGames

    Joined:
    Apr 23, 2014
    Posts:
    134
    There are other options out there such as Play Flow that handle all of the maintenance and scaling for you and still have super cheap prices that scale well, that works with solutions such as Fish Net. You definitely don't have to build your own setup anymore to leverage dedicated machines.