Search Unity

doubts with unet pricing

Discussion in 'UNet' started by Xuzon, Mar 17, 2016.

  1. Xuzon

    Xuzon

    Joined:
    Mar 21, 2014
    Posts:
    83
    Update:
    I've Just discovered photon Bolt and it looks like we are searching for, anyone Just tried out?
    Hello, my team and me were working on a multiplayer online game with UNET over 10 months and today the price of UNET has surprised us.

    We are not sure how to check the bandwith used by our game per player so We can't estimate a price.

    We were looking to Photon today but the pricing is strange algo, I'm not sure if We can Make the game to use less than 500 messagges per second per room because our game is fast and with 10 players at least.

    So We are lost and We don't want to change all the code from UNET to another solution but we'll do it if it is necessary.

    This is our first game so We don't have a lot of money.

    So, what Will you do?
     
    Last edited: Mar 17, 2016
  2. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    I fee like I'm getting really spammy posting this everywhere but I just keep seeing relevant threads...

    Unity's relay servers are only needed when a direct connection can not be established between client and host. The problem is that most people are behind routers these days so they can't directly connect without a little help. That's where NAT Traversal comes in. When properly implemented you should be able to connect directly the vast majority of the time without any need for the relay servers.

    I've put together my own implementation that ties into the UNET HLAPI. Maybe give it a try:

    http://forum.unity3d.com/threads/unet-and-nat-punchthrough-it-can-be-done.391845/

    I'm pretty much in the same situation. We just finished 'upgrading' to UNET only to find out that there's no way we could ever afford to use it with the relays.
     
    Last edited: Mar 17, 2016
  3. Xuzon

    Xuzon

    Joined:
    Mar 21, 2014
    Posts:
    83
    I know what you're saying, I'm in my last year of telecomm engineering and I'm tired of program routers XD
    But there is a problem, if you use UNET to matchmake you have to buy unity pro (1500$) and you have a maximum CCU to create games using the matchmaker, don't you?

    We are planning to launch through Steam so we are checkint photon bolt because it seems suitable for us but I don't have a lot of info about people who use it
     
  4. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    I very well may be wrong but I'm pretty sure if you're only directly connecting you don't need pro or any ccu's at all. You can always replace unity's matchmaking with steam matchmaking which is probably more full featured anyway.
     
  5. GrymmyD

    GrymmyD

    Joined:
    Dec 2, 2015
    Posts:
    42
    So I've also been trying to wrap my head around the operating costs incurred from utilizing the Unity Multiplayer service as well, and here's what it's boiled down to (note that according to http://forum.unity3d.com/threads/relay-server-bandwidth-explanation.364594/ it seems as though bandwidth is calculated only by outgoing traffic from the relay server).

    My game has a maximum of 8 players per game. We'll assume the worst case that all games are always full.
    In the worst case, each client sends movement data at a rate of 20/sec with the payload size being approximately 32 bytes per packet (sizeof(Vector3) + sizeof(float) + overhead padding).
    The server streams all players' movement data to each other client.
    This means that the outgoing bytes/sec from the server to each individual client is approximately 8 bytes * 20 msgs/sec * 32 bytes.
    This means the total outgoing bytes from the server is approximately 40kb/sec. Now, from my testing I've seen it's significantly lower due to optimizations, but we'll just go with this.
    At 40kb/sec, or 0.00004096 GB/sec, means that each 8 player game hour costs $0.073728. Thus, each single player costs me $0.009216 per hour. Double-checking these numbers against results gotten from the price calculator here https://unity3d.com/services/multiplayer seems to line up fairly well.

    So all this being said, and after some thought, the metric I've been looking closest at to evaluate the financial viability of using UNET is basically # of hours a player has to play for me to start losing money on them. At $0.009216 per player hour, they have 108 hours of game time before they cost me $1. If I charge $4.99 for my game, minus a 33% cut, they can play 360 hours before I lose money on them. $1.99 for my game? 143 hours of game time. I have a feeling that's quite a bit more time, on average, than players will spend on a single game, especially an indie like mine.

    For the sake of argument, let's say I've made a mistake in my arithmetic (please, please call me out on it, I'd adore you) and I'm off by two orders of magnitude, i.e. they have 1 hour of game time before they cost me $1. If I charge $4.99 for my game, minus a 33% cut, they can play for 3.3 hours before it's unprofitable for me... it's bad, but I do wonder how many folks buy a cheap game like that, play it for an hour or two, and never pick it up again.

    So anyway, I was kind of freaking out yesterday by this pricing, but after going through this exercise I'm starting to think perhaps it's not completely unviable - or perhaps I'm just really bad at math? Anyone mind double-checking me here?
     
  6. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    280
    <ShamelessPlug>ON</ShamelessPlug>

    You may want to take a look at this:
    http://smartfoxserver.com/blog/?p=440

    Scroll in the middle for a series of examples of very affordable monthly fees.

    If anything is unclear let me know.

    <ShamelessPlug>OFF</ShamelessPlug>
     
  7. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Looks as if every solution is going to cost you.

    By far the cheapest over time, and IMO best solution overall, are both the same: Forge networking.

    • FULL SOURCE CODE (The only networking solution to give you Full Source Code)
    • No CCU cost
    • No messaging cost
    • Self-hosting will ALWAYS be cheaper than any paid hosting solution. (Rent your own - cut out the middleman)
    • Forge Cloud (Beta) as an option if you refuse to self-host. (I believe the cloud is in beta still. Might want to check this out first.)
    Buy once, never pay any money ever again. (Of course you have to pay your own hosting, but that is ALWAYS much cheaper than any other solution.)
    Forge is the best possible deal.
    Full Source Code alone makes it worth it. IMO, that is a requirement for me. I can fix the bugs myself if it is ever abandoned; with UNET, Photon, etc. you cannot. If they get abandoned, you're screwed. If there's a bug, you have to wait for them to fix it (if they even do). I never trust anyone else with my game: Full Source Code is a requirement for me. But Forge's team is alive & well, back to fixing bugs & adding features.

    I created a 40 hour project in UNET and converted it to Forge (creating a guide in the process). It's not extremely thorough, but explains a lot of the differences.

    I've uploaded the page below; you can take a look at the differences. It's pretty similar in many ways. Although it did take a bit of time to convert it, that may have been because I was writing this guide while doing it (which took most of that time). Just take a look and you might be able to tell if it's worth it. (There's a free version to test, btw.)
     

    Attached Files:

    Last edited: Mar 17, 2016
  8. Xuzon

    Xuzon

    Joined:
    Mar 21, 2014
    Posts:
    83
    To direct connection is not necessary but you have to announce the IPs somewhere and when you create a match the CCU is busy inmediatly

    I checked it out and it's at the same price that Bolt and Bolt can use Steam Matchmaking integration I think so I'm not sure about wich I'll try.
    I'm not sure how to implement this with code like Unet or Bolt where a client is the server

    Has anyone used Bolt? I've seen that the forest use it but there aren't more examples.
     
  9. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
  10. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Just to clarify are you saying that if I create a match, and then pull down a list of matches and directly connect to the ip address of the host of the match, without ever actually joining the match (NetworkMatch.JoinMatch() is never called), it's going to cost me CCU? That doesn't seem right to me.
     
  11. SpaceMidget75

    SpaceMidget75

    Joined:
    Feb 7, 2014
    Posts:
    21
    I just posted some calculations (after I calmed down from the initial shock) and unless I'm mistaken it's not as bad as I first thought. I'll paste it here if the mods don't mind:

    Okay, I've taken a step back and tried to simplify the on-line calculator down to the costs per single user/customer. I've set Concurrent Players to 1, Expected Utilization to 100%, Messages per second to 20 and size 64bytes. This SHOULD - correct me if I'm wrong - give me the cost for ONE player literally running my game for the whole month (impossible but gives me my baseline).

    It's comes to just $1.54. This works out at $0.002 per hour (for a 30 day month). If they play an hour a day, that's $0.064.

    6 cents a month is much better than I thought, unless I've messed up my maths here which would be extremely embarrassing for a dev of 20 years ;)

    Now I just need to figure out the Pro-license issue!


    Even though I've calmed down, the Pro-license is the biggest stumbling block and quite frankly I'm surprised more people haven't kicked off about it!

    It states the following on the FAQ:

    What do I need for my Multiplayer game to be “Ready to Release”?
    At this time, “Ready to Release” is only available to Unity Pro customers with a valid payment instrument.

    Basically you can't release your game unless you have a pro license. Does everyone on these boards who's been tinkering aware on their UNET games for the last 6 months all have a pro-license???
     
  12. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Not really. It's cheaper if your customers are based right next to each other, and you will not have downtime. Down time will happen. It's a when, not if.

    A cloud based solution means your game will always have players that can connect, since if one server is down, another won't be. There's no sane way rolling your own servers will ever scale, I'm sorry I have no confidence that an indie can run their own servers for any more than a handful of local people, or turn based.

    I'm all for saving money but you're just spreading delusional solutions if you're saying things like you hosting is ALWAYS cheaper. Likely, it'll ruin your title and business.

    I like your posts but come on.

    If not UNet then I would suggest old school punch through (people hosting servers themselves as part of the game) or Photon cloud. There's a reason people spend money here, and it's because they KNOW rolling their own is a sure fire way to throw their game in the trash.

    When your game gets popular, your servers become a great target for flood attacks and more. You really, really don't want to be dealing with this without dedicated and experienced staff. That you get from a solution like Photon. I can't speak for UNet since it's new. But outsourcing server stuff is pretty much a given if you're serious.
     
  13. Xuzon

    Xuzon

    Joined:
    Mar 21, 2014
    Posts:
    83
    I've just tried it out, I register a match through unet matchmaking with 12 players maximum but no one has connected and in the project page it said that 12 CCU is busy, so if you try to create another match with more than 8 players (for free maximum CCU is 20) it fails with the message maximum CCU is over overpassed so :/ at the time you register a match in the matchmaking service it reserve the CCU of the maximum players.

    but if you only need a matchmaking service because your middleware use punchthrough like bolt or something else you only need where to store the matches, dont' you?´

    So, Bolt it's updating nowadays?, is it ready to make a production release? I read that is full of bugs. if not it will my very favourite solution but we don't want to change the networking and then hit a brick wall again. The Forge networking's page in the asset store it is full of I used Bolt but is full of bugs so then we change to forge and that type of things :/

    So now, I'm more lost than before because all the solutions there are XDD
     
  14. SpaceMidget75

    SpaceMidget75

    Joined:
    Feb 7, 2014
    Posts:
    21
    Thanks for this. Very useful. I'm wondering how hard it would be to move the NetworkLobbyManager over instead of Networking manager?

    I really need to get back to finishing my project off as a matter of priority and unless Unity retract or explain the need for a $1500 pro-license I have no choice but to move to something like Forge for $75 instead. For me, this isn't a comment on the quality of either solution or the costs of hosting/CCUs, it's purely about a financial hurdle I'm unable to climb ...and that's a bloody shame. :(

    I just wish Unity had mentioned the Pro requirement earlier and I would never have started! I realise I could apparently write my own matchmaking server for HLAPI, but honestly I wouldn't know were to start nor do I have the days available to do it.
     
    CarterG81 likes this.
  15. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,260
    @SpaceMidget75 Check the FAQ posted some minutes ago. Pro license requirement will go away soon.
    I did some calculations too, and with 1000 CCUs playing all the time (100%), sending 20 messages/sec with 210 bytes in size, this comes down to $6.85 per hour. Which basically means that I have to (at least) show 1 video ad per hour to all players, in order to get the costs back. Each additional ad view or IAP will be a benefit. I don't have to handle all the servers and do the scaling, so that sounds reasonable to me...
     
    SpaceMidget75 likes this.
  16. JeremyUnity

    JeremyUnity

    Joined:
    Mar 4, 2014
    Posts:
    147
    Hi Everyone,
    We put together a FAQ to answer some of your questions here. Please feel free to ping us with additional questions too if anything is unclear, of course.
     
    GrymmyD likes this.
  17. SpaceMidget75

    SpaceMidget75

    Joined:
    Feb 7, 2014
    Posts:
    21
    This is GOOD news, and thanks for giving some feedback.

    I have to say though, if that's u-turn, then fair enough and thanks for listening. If it's always been the case, then I wish Unity had made it clear from the start. I've had a sleepless night and another wasted day looking for alternatives! :confused:
     
    GrymmyD likes this.
  18. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's always been the case since it went live at least. Like I've said, people are not understanding it, a new calculator needs to be developed, plus a debugging function to see how much traffic you're really generating.
     
  19. JeremyUnity

    JeremyUnity

    Joined:
    Mar 4, 2014
    Posts:
    147
    @hippocoder is exactly right. There's actually no change in policy here, we just didn't communicate everything as well as we could and hopefully this FAQ is a step in the right direction. This being GDC week hasn't helped with our response time either. Also, the calculator feedback in particular has been very helpful in letting us know we need to do better there.

    We are always looking for your feedback on how to improve the service and Multiplayer as a whole, and where we should focus our development. A lot of the recent work for the Multiplayer group has been dedicated to just making everything ready to leave beta and go into full production.

    Now that we have done that we'll continue to address issues and feedback with Multiplayer across the board, including service improvements, documentation, and new features.
     
  20. GrymmyD

    GrymmyD

    Joined:
    Dec 2, 2015
    Posts:
    42
    Yeah - I got tired of having to use separate tools to measure my bandwidth, so I had to wrap my most heavyweight networking messages (movement etc) to provide in-game realtime UL/DL rates. It still doesn't capture bandwidth used by all [Command] [SyncVar] and [ClientRPC]'s though.
     
  21. Xuzon

    Xuzon

    Joined:
    Mar 21, 2014
    Posts:
    83
    I undertstand that each GB of traffic cost you 0.49 and with wireshark I estimated a cost of 5kb/s/player I know I can optimize it but for now each player cost me 0,008 per hour?
    (0,49 / (1024 x 1024)) cost of each kb x 5kb x 3600s or do I have to multiply it by the number of players you are playing with?
     
  22. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Haven't got a clue, I'm pretty sure Unity will prioritise this though, can't sell a service if nobody knows what to buy. I don't know because the host does extra work. We need those debug features :)
     
  23. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Um, if it is not always cheaper to do things yourself / rent your own servers/cloud by cutting out the middleman... then how do Cloud services make any money?

    I am not talking about hosting it yourself on your home internet / PC. I'm talking about just cutting out the middleman and using significantly cheaper methods. And yes, it is definitely ALWAYS cheaper, otherwise the people you pay hosting for like Photon Cloud, would not make any money unless they owned all the server hardware themselves. These other services also provide security, 99.99% uptime, etc. For cheaper.
     
  24. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I think you have a fundamental misunderstanding of how this works. It *will* go wrong. It will cost you dearly. How is that cheaper?

    It's fine you'll find out.
     
  25. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Are you talking about a MMO, just having a matchmaking server, or what? That makes a huge difference. Unless you can provide a valid argument (legitimate reasons) then I don't see how this is anything more than exaggerated fears. Also how can it go wrong when you host your own server & it is protected with 99.99% uptime from the same people who support the same middle-man services that charge you extra for the same thing? If something can go wrong there, then it sounds like it could also go wrong with Photon Cloud or Unity Cloud or whatever they use. Especially when it's probably the same or very similar businesses supporting them that will also sell to you for cheaper than they charge.

    The entire idea of cutting out the middleman consists of saving money by doing a little bit extra work.
     
  26. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Because you have this assumption that a) everyone is local to your server and not worldwide b) you're capable of addressing issues and even getting it working and c) keeping it working when it is overloaded, slow, attacked, and so forth. Do you know how it all works? if you're learning or intending to maintain it, you're already losing time/money on it.

    The benefit of a paid service goes far beyond having a box somewhere running some software. Pretty sure it makes business sense not to do what you're suggesting. In fact, it's considered a risk for medium sized businesses to host their own servers, let alone single developers.

    That's right. Things DO go wrong - and often. The fact that you and your customers never see it, is the reason you pay a tiny bit extra. The internet is an unreliable hell hole.

    Can you tell me what is involved with cutting out the middleman? how do you run a relay server? how is it set up? What happens if it's stack gets corrupted? Will you use linux and log in and fix it? if so how?
     
  27. SpaceMidget75

    SpaceMidget75

    Joined:
    Feb 7, 2014
    Posts:
    21
    Thanks for getting back to us. I shall continue to work with UNET and hopefully by the time my game is ready for a public beta the Pro requirement will have been removed. I don't suppose you know how long we're talking? Weeks, Months, 6 Months or a Year?
     
    pKallv likes this.
  28. JeremyUnity

    JeremyUnity

    Joined:
    Mar 4, 2014
    Posts:
    147
    @SpaceMidget75
    Sadly, i don't have an ETA myself to even share. Like Richard said in the FAQ though, just message us when you're ready. This isn't a policy decision (but instead just a technical limitation) so we'll find a way to support you when you need to launch your game.
     
    SpaceMidget75 and pKallv like this.
  29. Freakyuno

    Freakyuno

    Joined:
    Jul 22, 2013
    Posts:
    138
    Anyone who comes to this post, needs to read this - and then re-read it. I've been on all sides of this, and approached it from every angle, and there's a lot of truth here that can lead any small, or medium sized game company in the right direction based on these observations.
     
  30. SpaceMidget75

    SpaceMidget75

    Joined:
    Feb 7, 2014
    Posts:
    21
    @JeremyUnity
    Awesome. Thanks Jeremy. Apologies if I came across entitled. You know what it's like when you think you've wasted days of development though.
     
  31. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I can't find the link, but the Forge developers suggested cheap hosting & were the ones who mentioned it will ALWAYS be cheaper. Since they are seasoned network professionals, I am inclined to trust them over a 'fear post'. Also, that is how business works. If you market yourself well or try to make the process easier, you can do the same services as your competitors for a little bit extra. You can also charge a lot of money for something that isn't a lot of work, if people are willing to pay so they don't have to handle it themselves (what is in esssence just a convenience fee). No reason to explain in detail, but business is business.

    If you're just running a matchmaking service, this fear is just nonsense. If you're running some kind of super beast MMO cloud, you need more than what these 'middleman' services provide ANYWAY. So you have, what? This niche where you need a tiny bit of assistance but not a whole lot...because..."stuff happens" that these competitive server providers don't handle but the middlemen do? What do these middlemen do that other service providers don't also do for less?

    This fear is quite exaggerated because it entirely depends on what you need. Not every game is small enough to not need an employee to maintain its servers but big enough & specifically in need of services these middlemen provide. What of the games that have small need or massive need?

    Sorry, but when your need is small enough, it's not a big deal to host it yourself by renting your own servers. That is definitely cheaper than paying additional costs for services you don't need. There are also literally hundreds of options for this stuff...with varying prices & services, maintenance requirements. It is almost always cheaper to do things yourself than to pay someone else to do it. That's just business. You don't have this imaginary cost because you have to do extra work. That's not a monetary cost, that's a monetary savings. Let's dispel with this notion that time is money, time is not money. Time is time. Money is money. That's why they have different definitions.

    I won't argue though. If I could find that post I'd link it and you can go from there. Otherwise, I'm out. What an incredibly silly argument. As if there is somehow one universal need for all game's network requirements, and as if they are all satisfied with something like Photon Cloud (which wouldn't be enough if you needed more services they don't provide or provide at an additional cost or could be too much if all you needed was something tiny).
     
    Last edited: Mar 20, 2016
  32. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    OK. Good luck with your game :)
     
    Chom1czek and tobiass like this.
  33. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Thanks, and I apologize if I have any aggressive tone. (That's just how I argue. Never any offense to anyone is ever intended. Even if I barely know what I'm talking about, I will argue like I am solid in my understanding, BSing included, hahaha!)

    Idk how, since I tried finding it earlier & it took forever, but I found it right away this second attempt! :)

    Maybe I misunderstood the post or misspoke & used the wrong technical terms? I am self-taught, so I often do that. You'll be able to tell what I was talking about here. However, I believe I understood correctly. (Correct me if I'm wrong).

    http://forum.unity3d.com/threads/unity-multiplayer-unet-features.336203/#post-2193798

    edit: Apparently the post right after his, is me making the same argument with someone else. Go figure. We are such creatures of habit... or at least I am ;)
     
    Last edited: Mar 20, 2016
    hippocoder likes this.
  34. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    You know what would be awesome? Someone writing up a guide to explain what the hell CCU's are, what to expect with various types of games, and how much money we'd save if we went with No-CCU vs pay-per-CCU.

    And included with it, UNET CCU limitations. Others can be included, but UNET must be priority so we can get educated on its costs.

    Even after hundreds of hours reading about CCU's and asking the same questions repeatedly, I still have a hard time understanding how many CCU someone's game would take. How many "One CCU" is. The numbers are all over the place (which makes sense, given that it will vary on the software).

    From my understanding though, paying per CCU is quite a bit unfair in many cases.

    Forge Cloud seeks to remedy this industry standard by charging only for your CPU Usage & Bandwidth Consumption.

    However, even with that I barely grasp the difference between that & something like Amazon/Rackspace.
     
  35. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's ok everyone is entitled to their own views, I stand by mine, and you stand by yours :)
    CCU - I thought I needed way more but when Photon quoted a few hundred thousand I knew I probably had the wrong idea, and then I realised I wasn't understanding typical behaviour patterns in online games.

    It does not help that its all very confusing without prior experience, hopefully Unity can fix up things for us so we can all understand it.
     
    CarterG81 likes this.
  36. Xuzon

    Xuzon

    Joined:
    Mar 21, 2014
    Posts:
    83
    If I think about that if the player send 20 msg/sec of his transform to the server then, if there are 30 clients the server need to replicate that message to all the clients so the number of messagges per second is exponential to the numbers of players in that match.

    So in the equation I have to multiply it by the number of players right? And then the cost is expontial also

    Can anyone like @JeremyUnity answer me
     
  37. GrymmyD

    GrymmyD

    Joined:
    Dec 2, 2015
    Posts:
    42
    @8NeonBitGuy The cost is not exponential based on my understanding, it scales in a more or less linear fashion. Remember, they only charge for outgoing traffic from the relay, which means what's coming out of the server to each individual client. My numbers look no different based on 8 player max vs 16 or 32. There might be a slight scalability difference when you factor in TCP overhead, but it's negligible probably.
     
    Last edited: Mar 20, 2016
  38. Xuzon

    Xuzon

    Joined:
    Mar 21, 2014
    Posts:
    83
    @GrimmyD well, look at the equation, if you have 8 players and everyplayer send 20 msg/sec to t server, then the server need to replicate all the messagges to everyclient so 8 players x 20 messagges/sec x 8 players again that means number of players ^2 x msg/sec/player right?
     
  39. JeremyUnity

    JeremyUnity

    Joined:
    Mar 4, 2014
    Posts:
    147
    Hi @8NeonBitGuy

    Bandwidth is only charged outgoing. Let's say you have a game that roughly sends 1k/second to the host (which is usually small because it just contains changes specific to that client), and the host sends 4k/second to each client (which is larger than the client->server stream because it contains world and game logic updates). Your bandwidth usage is roughly as follows:

    1 client (host only): 0k/second
    2 clients (host + 1): 1k to host + 4k to client = 5k/second
    3 clients (host + 2): 2k to host + 8k to clients = 10k/second
    4 clients (host + 3): 3k to host + 12k to clients = 15k/second
    5 clients (host + 4): 4k to host + 16k to clients = 20k/second
    6 clients (host + 5): 5k to host + 20k to clients = 25k/second
    7 clients (host + 6): 6k to host + 24k to clients = 30k/second
    8 clients (host + 7): 7k to host + 28k to clients = 35k/second

    As you can see the growth in a single host network match (which is how Unity Multiplayer works) is linear to the number of clients involved. In order to be exponential or worse you'd need a web where each client has connections to every other client directly, which starts to be so bandwidth intensive it's unlikely more than a hand full of clients could join a match before performance is affected. Unity Multiplayer does NOT work this way for this reason (among others).

    Even though we don't work this way, i'll try to put together an example of a network system that would in order to demonstrate the difference. In that world everyone would be sending 4k/second to each other client since everyone is basically a host.

    1 client (host only): 0k/second
    2 clients (host + 1): each client sends 4k to each 1 other client = 8k/second
    3 clients (host + 2): each client sends 4k to each 2 other clients = 24k/second
    4 clients (host + 3): each client sends 4k to each 3 other clients = 48k/second
    5 clients (host + 4): each client sends 4k to each 4 other clients = 80k/second
    6 clients (host + 5): each client sends 4k to each 5 other clients = 120k/second
    7 clients (host + 6): each client sends 4k to each 6 other clients = 168k/second
    8 clients (host + 7): each client sends 4k to each 7 other clients = 224k/second

    As you can see it becomes really ridiculous really quickly so, again, we don't support direct peer web networking and instead have a client/server host model.
     
    GrymmyD likes this.
  40. Freakyuno

    Freakyuno

    Joined:
    Jul 22, 2013
    Posts:
    138
    So you've obviously been through it from the standpoint that many are in here...looking at it from down the road and trying to understand it, and assuming the worst (12,000 / month server bills anyone?).

    Can you explain how YOU understand it to work now that you've released a game, and talk about your typical. Like, Daily we have about 1000 users an hour, users connect, match up and disconnect, they're connected for X amount of time, and use X amount of bandwidth, and it uses X CCU's per hour in a claim and release fashion, and costs me X a month.

    If that wouldn't be to invasive for details into your services, I think that'd help people...maybe you've posted something like that already and I've just missed it.
     
  41. Xuzon

    Xuzon

    Joined:
    Mar 21, 2014
    Posts:
    83
    @JeremyUnity Thanks a lot!! You have answered me perfectly, I was thinking about broadcasting and not in that way, but I still have a doubt, If the host send 4k to the client if there is one connected, then, if there are 2 clients connected the stream server -> client won't rise? because there is another transform updating for example.
     
    JeremyUnity likes this.
  42. GrymmyD

    GrymmyD

    Joined:
    Dec 2, 2015
    Posts:
    42
    Thanks for this post as it reaffirms my that my current understanding of the pricing model is correct.
     
    JeremyUnity likes this.
  43. JeremyUnity

    JeremyUnity

    Joined:
    Mar 4, 2014
    Posts:
    147
    Hi @Freakyuno
    The CCU and bandwidth caps are there specifically so you can decide on the worst case you want to support. You dial in the numbers you want for your game based on your needs, and can avoid even the possibility of a $12,000 server bill.

    Looking at the games using our service right now, i see roughly this for a pretty typical average breakdown:

    Monthly Active Users (extrapolated): X
    Monthly Distinct Active Users (extrapolated): X * .1 (aka 10% of MAU)

    Daily Active Users: Y
    Distinct Daily Active Users: Y * .1 (aka 10% of DAU)
    Peak CCU: Y * .05 (aka 5% of DAU)

    I'm a little hesitant to correlate MAU to DAU given the data i have (and that we've only been live for 5 days), but DAU is likely in the 3-5% of MAU range if your game doesn't drop off over the course of the month.

    ALL these numbers will vary somewhat given your game type, it's "stickiness," length of play session, etc. Those are figures in your control, not ours.

    KB used in 1 day is also a bit harder to nail down because it comes down to how much you need for your game, but we still don't have an individual game that uses over 1GB per day even with tens of thousands of users that day on that game.

    Keep in mind player CCUs almost always follow a graph that's lowest overnight in a region, and highest during prime time hours (8-11pm). This knocks the average way down because the area under the curve is very low despite the peak CCU being high. This is why our calculator has an average usage percent field.
     
  44. JeremyUnity

    JeremyUnity

    Joined:
    Mar 4, 2014
    Posts:
    147
    @8NeonBitGuy
    Somewhat yes, but not a terrible amount. Remember all data that goes to the server isn't just reflected back to the clients but instead put into the host's game world. That game world is then broadcast to clients. Adding another player is more like adding a NPC moving around, because everything they do is aggregated on the host and only things relevant to the clients is then sent back out (like transform updates as you mentioned).
     
  45. Xuzon

    Xuzon

    Joined:
    Mar 21, 2014
    Posts:
    83
    Thanks for your answer, our game is a PvP so We Just need the transforms, animations and shoots I tought that transforms use a lot of bandwith
     
  46. Freakyuno

    Freakyuno

    Joined:
    Jul 22, 2013
    Posts:
    138

    Thank you for this, this is absolute a perfect answer for those seeking a "real-world" case of figuring out what the monetary impact of using your services is. Great post.
     
    JeremyUnity likes this.
  47. Freakyuno

    Freakyuno

    Joined:
    Jul 22, 2013
    Posts:
    138
    Transforms use a lot less bandwidth than rigid body physics syncing, which requires a massive amount of variables be sent over the network as the simulation runs. Transforms are just a vector3 for position, and a quant for rotation, which is 3 floats, and 4 floats, so that would be a maximum of (4 bytes per float) so 32 bytes * send-rate. (28 bytes with packet encapsulation and header).
     
    JeremyUnity likes this.
  48. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Last edited: Mar 21, 2016
  49. DshFox

    DshFox

    Joined:
    Oct 10, 2013
    Posts:
    15
    What about ddos attack? Will it consume bandwith as a normal player? :(
     
  50. Azmar

    Azmar

    Joined:
    Feb 23, 2015
    Posts:
    246
    This is amazing advice, and would love more input on this. As a person with little money I understand that Forge is tempting as it is a one time purchase and only catch is you have to host your own servers. But I understand your argument about real life is not that easy, and when I look at Photon pricing we are literally reaching 10k$ per month or way higher just to support a lot of people. I don't understand how any indie can afford this? What is a reasonable solution where a company can host the server without taking my arm and leg in the process?
     
    CarterG81 likes this.