Hey guys, I have been looking into multiple networking solutions, and have got very mixed messages about UNET, and would like to start a discussion to clear up some of my confusion and other peoples.
What is UNET?
From my understanding there is 2 different parts of what people call “UNET”, which many people do not know, and lots of people tend to just call it all “UNET”:
-
UNET is the official networking library in Unity. It is completely free to use.
-
Unity Services (CCU, Matchmaking, Relay servers, etc.) is a collection of services that Unity provides on top of UNET; mainly player-hosted games and matchmaking that avoid the need for you to host a dedicated server. These services are paid and optional to use.
With that being said, you DO NOT need to use Unity Services to make a multiplayer game in UNET, and you can host your own dedicated servers through Amazon etc. or even host your own servers at home for your game and never have to pay any sort of CCU/Subscription cost/etc.
However, if you decide to host your own servers, you will not have some nice features that come with Unity Services such as matchmaking, relay servers, etc. which you would have to figure out yourself (Which is not overly difficult, and several Unity Asset Store packs to help with this) if you required them and were not hosting through Unity.
How many players can UNET handle?
This is a question I have wondered myself, and I still do not fully understand as I am no multiplayer expert at all.
This is a very hard question to answer, because it all depends on the “action level” of your game, for example a super intense action game with which requires tons of things to be sent over the network constantly, will have a lower max players than say, a simple card game that requires almost nothing to be sent, so with that being said of course this max players number can vary almost indefinitely.
Many people on these forums have told other users:
“UNET” can handle at most 10-20 players for a FPS game.
Now from my understanding (and this is where I am confused), if you were to ask that person why they think it could only handle this amount, they would say things such as because Unity Services Matchmaking, Unity Services limits the amounts of messages you can send, Unity Services high cost, etc. etc.
However, like I said I am no multiplayer expert, so I do not understand the more complex technical side of things, and this is the part I need to clear up for myself.
With that being said If I am not mistaken all these “constraints” are related to Unity services, not the UNET library itself.
So my question for some of the multiplayer experts out there would be, (and excuse my ignorance if this is a ridiculous question)
without using Unity Services, and just using UNET with some sort of custom matchmaking, servers hosted on Amazon, and some AOI (Area of Interest), is it a good library to use for a large scale multiplayer FPS game with say 50 players sending frequent messages, or is UNET HLAPI simply not built for things of the sort, or does it not make a big difference to other solutions on the market and it is just basically just another networking library?
Final thougts
I cannot count the amount of users that I have seen be turned off of UNET because they simply search it, and read that “UNET” cannot be used for a MMO or FPS because it can handle no more than x amount of users, or read that it has huge costs for subscriptions and CCU, or that you cannot have a dedicated server and do authoritative movement, etc.
These same people will go on to look at solutions such as Forge or Bolt, and wish the UNET could do these things (which it can!!) simply because the bridge between UNET, and Unity Services is very very unclear to many users.
When I first read about UNET, I was sure that it was almost the exact same as PUN, with no server sided logic, no authoritative movement, no self hosted or cloud hosted servers, etc. could be done, which is simply not the case, it can all be done using UNET.
I think the things I have talked about above is really keeping a lot of users from coming to UNET, and stopping it from growing as rapidly as it could be growing.
It would be great if we could have a discussion, so I could add to this post for anyone that has been as confused as I have been. Also please let me know if I have made any mistakes, I am by no means an expert.
Thanks, looking forward to hearing peoples thoughts on this.