Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Maximum players/connections in multiplayer game built on Netcode?

Discussion in 'Netcode for GameObjects' started by PurplePineapples, Feb 23, 2022.

  1. PurplePineapples

    PurplePineapples

    Joined:
    Sep 21, 2017
    Posts:
    3
    Hi all. I was curious what the maximum number of players or connections is that a game built on netcode for gameobjects can handle.
    In the unity blog post 'choosing the right netcode for your game' there is a flow diagram with use-cases for the different networking solutions, with netcode recommended for games with 64 or fewer players in a match. Apart from this I cannot find an answer to this question in official documentation. Is 64 a hard limit that can't be overridden or is it a soft limit beyond which the framework will not scale well/perform poorly? Does UNET vs UTP transport layer influence this at all?
     
  2. luke-unity

    luke-unity

    Unity Technologies

    Joined:
    Sep 30, 2020
    Posts:
    306
    There is no hard limit. Right now we are focusing on smaller scale games with small numbers of players. The exact amount your game is able to support will depend on your game genre and the complexity of your gameplay code.

    Building a game with 64+ players in the same session is a huge task. Often existing solutions don't provide everything needed to build a game like that so it's quite common for large scale games like that to build their own networking stack and optimize it for their specific use case.
     
  3. PurplePineapples

    PurplePineapples

    Joined:
    Sep 21, 2017
    Posts:
    3
    I see, thank you for answering :)
     
  4. Tech_Bud

    Tech_Bud

    Joined:
    Jun 24, 2020
    Posts:
    18
    Would NGO be good for a game with 20 players? I want to make a game show/trivia game with about 20 players, whose positions don't need to be sent over the network as they will be in fixed positions. But I would like their rotations to be tracked.
     
  5. CosmoM

    CosmoM

    Joined:
    Oct 31, 2015
    Posts:
    199
    That would be very doable, especially since it’s not a fast-paced game with, say, hundreds of networked bullets flying about. ;)
     
    Tech_Bud likes this.
  6. Tech_Bud

    Tech_Bud

    Joined:
    Jun 24, 2020
    Posts:
    18
    Thanks, I saw one of your posts mentioning that you use Unity transport. I'm not too sure on the difference between NGO and unity transport. Would I be correct to assume that Unity transport should be used for games with more demanding network requirements, as opposed to NGO which should be used for smaller scaled multiplayer games?
     
  7. CosmoM

    CosmoM

    Joined:
    Oct 31, 2015
    Posts:
    199
    NGO always needs a transport layer for network communication. Unity Transport is included with current versions of NGO for that reason, although you can replace it by another transport package (e.g. Photon) if you like — and likewise, Unity Transport can be used in other multiplayer solutions. So no, it’s not really an alternative to NGO but more a part of it.
     
    Mauschelbaer and Tech_Bud like this.
  8. Gray_FoxWare

    Gray_FoxWare

    Joined:
    Jan 31, 2019
    Posts:
    8
    the new Photon fusion can have up 200 players.
     
  9. itisMarcii_

    itisMarcii_

    Joined:
    Apr 5, 2022
    Posts:
    98
    Currently the only treshhold is due a bug with the MaxPacketQueueSize. Since there is for some reasons a hard limit on that value, which will be changed/fixed in the future.
    The reason is that, on connection, all the world state information will be loaded at once, filling the MaxPacketQueueSize to its treshhold.

    Besideds that, i had 200+ Clients running. I expect that there can run a lot more if that issue is fixed.
     
  10. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    231
    Is this issue the stack overflow for large values of
    MaxPaquetQueueSize
    ? If so, it should now be fixed in version 1.2.0 of the Unity Transport Package (which version 1.0.1 of Netcode for GameObjects depends on).
     
  11. itisMarcii_

    itisMarcii_

    Joined:
    Apr 5, 2022
    Posts:
    98

    Its the same issue I already mentioned back then and you already replied towards :)

    So yes :D
     
  12. Topthink

    Topthink

    Joined:
    Sep 18, 2016
    Posts:
    7
    Okay, I want to put my RPG online (my RPG is substantially developed). I'm pretty sure I won't need a fast tick rate and it seems like Netcode for GameObjects (NGO) may suit my needs. But lets say there is a CCU limit of some sort. Is it possible to get around that by having 50 or 100 users in one instance/zone and then having a similar number of users in another instance/zone and another and another and so forth with perhaps thousands of players total. YET, they all exist in the same "game" and can move from instance to instance etc? Of course, they would maintain their stats and equipment and so forth. I have substantial C# and Unity experience although I have little network/multiplayer experience.
     
  13. Sensistaar

    Sensistaar

    Joined:
    Nov 12, 2021
    Posts:
    1

    What you mean can be done by what is called a "Realm". For example Diablo by Blizzard uses realms. You could have your character saved to the realm and then 10 servers that are hosting a specific zone and players can join one of the servers. The downside is that they need to disconnect and connect to another zone with the realm methode.