Hi,
I’m starting to use Unet to make a multiplayer game. It seems that if the game is hosted on a server, not a client there is a limit of 20 ccu with the free services of unity. My question is : if I create my own network manager and still use unet, could I bypass this 20 ccu limit?
And if so, do you have any advices / recent tutorials on how to make it? I found a lot of things that seems out of date.
Thanks!
You seem to confuse several things here. First of all the NetworkManager is just a convenient class that ties up the serveral different parts. Next thing is the CCU limit is only a development limit that is tied to your Unity editor license. It’s meant for testing during development. When you’re game is ready to be published you would “go live” and would have to pay for the used traffic seperately but have no limit on the number of players.
Note that the CCU as well as the traffic you have to pay for only accounts traffic going through one of the services Unity provides. That is the Match Making service (lobby system, etc) as well as the Relay server service which ensures connectivity for prople behind NAT routers. You can use UNet without those services as long as you make sure your players can connect to each other. That means they either have to forward a port in their router in order for others to connect or you have to provide some kind of relay service yourself. The pure network system of UNet doesn’t have any limitation.
So for example if you have played older games it was common to only have direct connections where the server has to ensure he is reachable by other players and the other clients have to directly connect to the IP / port of the server.
Most of this information you can find here, though not as clear as we would like. If you scroll down to where they distinguish between personal, plus and pro just scroll down a bit further. When you release a serious game and you want to use the services that Unity provides it was never meant that you use the CCUs you have included in your Unity license.
Keep in mind that any traffic through the internet costs money. Unity has to pay for any traffic that goes through their servers. That’s why when you go live you simply have to pay for the traffic that your game produces on their servers. Note that flat rates basically do not exist in the business area. Flat rates work like an insurance as they expect the majority of the users to only use a tiny fraction of what they pay for.
@Bunny83 Thanks for your answer. Some things are not quite clear for me yet (I’m sorry, hard for me to understand).
In the link you provide There is an estimation of the cost depending on the game you have. But for each offer there is a ccu limit between 500 and 5000. That seems quite low for a game, is this normal? And with this offer you would have servers to host games right?
Plus the costs seems expensive. My situation is that I have a little amateur multiplayer game made for fun with unity / unet (based on this tutorial). Now I would like to “go live” as you said, so players could download and try my game, give me some feedbacks…
But I did not want to spend like 150€ a month just for feedbacks on a little amateur game (cost in the 1st link for a fps). Do you have any advices on how I could do it without paying a lot of money or creating my own server? I wonder how others indies would do that.
@Bunny83 Ok! I’m sorry I’m doing my best to understand but english is not my native language and networking is new for me, I swear I’m really trying ^^
I think I get what you meant and yeah, for a little free-to-play I will try to avoid using the matchmaking. I did research and found this that seems to be what I’m looking for, to avoid unity matchmaking
But if I understood what you said, this is a solution where the game is hosted on a player’s computer, and this plugin can be use to avoid the use of unity’s services. I can do the job for my little game I think, but out of curiosity if I wanted the game to be hosted on a server (so that if the host disconnect it won’t end the game), what would I need to have to perform this?
Thank you very much for your time
Changing the network manager will not increase the CCU. Generally, that free 20 limit is just to test the initial features between developers and maybe a few friends. Any kind of live game with an actual player base would require you to rent a server. Unity basically just sees how many people are connected to the project and limits it, regardless of your code.
As far as hosting options, Unity builds just need a ‘computer’ to run on. It doesn’t have to be from Unity specifically. For example Google, Amazon, and Microsoft all have virtual cloud hosting that gives you a unique IP address, hard drive, processor, etc. Virtual servers are the cheapest solution, since you are only using a small portion of a physical server. Never done it with the High level stuff, only base transport layer code.
You can also just run a UNET server from your home PC. I do this all the time for testing over LAN, lets you hook up different computers and test it without needing data plans. While you can also open that up to the public, its generally a bad idea to do on your own stuff.
If the game ever really took off you would want to look at renting an entire physical server. Of course, super pricey.
The cheapest and most efficient option is usually to get a headless Linux server. That way you aren’t paying for an operating system license. Companies like Digital Ocean (my favorite) let you rent out a server for 5$ per month. Keep in mind you’ll need some kind of headless Unity project file that doesn’t need a user interface, and it requires some knowledge of setting up Linux from the command line.