Search Unity

[Solved] Is Unity capable of smoothly hosting up to ~5,000 concurrent players?

Discussion in 'Multiplayer' started by MithrilDice, Mar 1, 2018.

  1. MithrilDice

    MithrilDice

    Joined:
    Mar 1, 2018
    Posts:
    5
    I'm an aspiring programmer currently doing this as a hobby. However, my end-game goal would be to create a multiplayer RPG. I want to make sure that the time and effort I put into learning Unity and C# will help lead me to my goal. I know that even if Unity isn't what I'm looking for, I will still pick up useful skills that will stay with me if I end up ditching the software. However, I'd like to stay. I haven't heard of too many multiplayer games being made with Unity, so I figured I'd come here and ask.
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,529
    Multiplayer games raise development difficulty and time investment significantly. As a beginner you should probably avoid a multiplayer rpg on your first try. Use the learn section to learn the basics and go from there. The button is on the website header.
     
  3. MithrilDice

    MithrilDice

    Joined:
    Mar 1, 2018
    Posts:
    5
    Thanks for your reply. This is my end-game goal (many years down the road). I just want to gauge Unity's capabilities for such a project.
     
  4. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,529
    Given how long it would take you to actually make that, Unity may not even exist by then.
     
  5. MithrilDice

    MithrilDice

    Joined:
    Mar 1, 2018
    Posts:
    5
    Entirely avoiding my question ;)
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Unity itself is capable of maintaining 5k connections, including the built in UNet networking API as well as other 3rd party offerings. Most likely though you're going to be continually sending updates and taking commands from all those connected users, which will be too much for a single server instance to handle much lower than 5k users even on high end hardware.

    Typically in large MMO games the game world is either slit up into various zones, that are actually separate servers for different areas of the map, or players are connected to separate instances or "shards" where the game is duplicated across multiple server instances (or a combination of both).

    In general when you start getting above 10-20 users on a single server you start needing to really constrain your network usage, 100+ would need exceptional network optimization. 5,000 connected to a single server is going to be limited to the very simplest and infrequent messages back and forth. Maybe 5,000 players playing checkers could work if doing things highly optimized. I'm just speaking in generalities here by the way, not hard numbers.

    So if you wanted to go ahead with this, central to your game's design should likely be a segmentation of the users into separate servers. You could design it so players can pass from server to server, for example if a server covered a specific map area. But you'll want to keep the number of users connected to a single server to be as low as reasonably possible. I'd shoot for around 40 to 60 on the high end.
     
  7. MithrilDice

    MithrilDice

    Joined:
    Mar 1, 2018
    Posts:
    5
    Thank you. Aside from Tale of Toast, I've never heard of an MMORPG being developed with Unity. I was starting to wonder if the software was just not capable.
     
  8. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    I don't agree. This is highly dependent on the game. If you run a game over TCP that allows players to click where they want to go, do simple interactions through menus for gathering resources etc. I would shoot for much more than 40-60. In this type of game a player would not really send more than at max, a few messages per second. Usually less than one.
     
  9. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,435
  10. Ellernate

    Ellernate

    Joined:
    Aug 25, 2017
    Posts:
    81
    You could use Unet, but should you? Unet is great for getting started or for small / medium games. But at 5000 ccu you would save a lot of money by squeezing out every drop of performance and efficiency from your network code - which cannot be done with the llapi. There's also the whole issue if there is a game-breaking bug with Unet, you will be stuck with your hands tied hoping for a engine-wide update
     
  11. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Fair enough.