Search Unity

Unity 2017 Massive Multiplayer Open-world Game

Discussion in 'Multiplayer' started by Kidara, Dec 18, 2017.

  1. Kidara

    Kidara

    Joined:
    Jul 6, 2017
    Posts:
    16
    Ok, so first of all thanks to anyone who opened this thread knowing that this would probably be another S***-post.
    Then, sorry if I make some mistakes in english, I read it well, but can't write at all.

    What is the point of this discussion?
    I want create a huge game, and I know it is F***ing hard. If I say it is a MMORPG game I could be misunderstood. I'm actually resizing my project to fit good graphics and mechanics in a reasonable time. All I want in this topic is to understand how to work with massive multiplayer.

    There aren't rooms, all players connect to a server in a openworld map. I need to setup multiplayer for early testing, and I don't want to redo it after a while. So, I know I must study hard, but I want to find a way to start prototyping and testing multiplayer in order to build a huge game, e.g. 5000+ CCU.

    Now, I took a look at Unity Networking HLAPI and Transport Level API, then Photon, Thunder, Bolt.
    I have an idea of how Multiplayer and Networking works, but I don't know which framework or system is the best choice for this type of game. Can you give me any advice, links, videos, resources?

    Thanks
     
    jfkrzy likes this.
  2. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    One server will not handle 5000 CCU. You are going to need to split your world up behind the scenes and have server(s) covering each area - passing a player session between them as required.

    There are no right or wrong answers - and most of everything the player "sees" is fudged to a greater or lesser degree.
     
    Kidara and Joe-Censored like this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    As already mentioned, you're not going to get a single server instance to handle 5,000 currently connected players. My approach is to split the game world into hundreds of zones, each a separate server instance, and pass the clients between zone servers when they cross a barrier between them.

    If you "don't want to redo it after a while" you're going to be in for some disappointment, as optimizing your networking code is going to have to be an ongoing process throughout the game's development.
     
    Kidara likes this.
  4. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,525
    There's really not a simple answer here. Nothing off the shelf is going to provide you with what you need without substantial unique work done specifically for your game.
     
    Kidara likes this.
  5. Kidara

    Kidara

    Joined:
    Jul 6, 2017
    Posts:
    16
    First of all, thanks both for this elucidation. I thought I would take this approach but was unsure. Now the question is: it can be done so that players don't notice anything or I need to put a sort of loadscreen? Is there a keyword that summarize this approach? (To semplify my researches on the net)

    Oh yes, for sure. Maybe I explained badly: what I'm trying to say is that I'm searching a framework (if exist, or I will code it) which I will probably use for all development time. I don't want try UNET, change to Thunder, then Bolt, then build my own. If I need to create a networking system from scratch, I will do it from beginning. But if exist something that could help me in this crazy idea, well, why don't use it? Fast-paced, massive multiplayer in an openworld, I need something that can fit one or more of these requirements, leaving me the chance to do the rest without comflicts.

    As I said before, if there is something partially ready, or some keywords that could help me to figure out how to these, I really appreciate.

    Thanks all and again sorry for my english. I hope in more replies :D
     
  6. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    567
    Last edited: Aug 7, 2018
    Kidara likes this.
  7. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    You may want to look into SpatialOS.
     
  8. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I'm sure there is a way to design a system to do this seamlessly, but UNet doesn't have it built in. There was a thread on this topic around a month ago here. My current approach is to fade to black, change scenes/servers, and fade back in after the new scene is set up.
     
  9. Salmjak

    Salmjak

    Joined:
    Nov 25, 2014
    Posts:
    20
    I've been trying to look into this topic as well. Too bad most people are very unhelpful and just reply with the standard "MMOs are too hard. Don't even try." and you never learn anything (as a hobbyist I dont care if it's too hard, I'm not trying to make a finished product). Glad to see people here being different.

    What you should think about is how you're going to scale your server (a server in this context is simply an application handling network connections). Instancing (several servers that the player can switch between, e.g. Maplestory) and Zoning (separate areas are running on separate servers, with some overlap and players are transfered either by maps or "seamlessly" (again, Maplestory probably have several servers for each map or cluster of maps)) are two strategies which I've read about. As someone said above, look at MassiveNets implementation of zoning for an introduction. Instancing might be a necessity if you're aiming for 5000 CCUs... would suck if they all decide to go to the same place and you need to send N^2 network updates for positions. In this case you would "silently" move people to other (hidden) instances.

    You should also think about utilizing as many CPU cores as possible. Use multithreading where possible (and beneficial) and split up your application into parts (e.g. have one game server, have one server for the chat, have one server for handling accounts, etc and make the client connect to all of them).

    Design your game and server structure so you can (relatively) easy increase capacity if needed (CPUs are not getting a lot faster, but they're getting more cores).
    A good read for me was IT Hares chapters on multiplayer games.
     
    Last edited: Dec 19, 2017
    Kidara likes this.
  10. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Splitting the game world into separate zone server instances does take care of utilizing as many CPU cores as possible for the most part, as you can run multiple zones on the same physical server, with each zone putting most of its work on a single core. For example, if you have an 8 core physical server, and a zone instance typically uses around 50% of a single core, you could run up to around 16 zone servers on that physical machine to fully utilize the CPU. Memory and other resource constraints may come into play to reduce that though.
     
    Kidara likes this.
  11. Salmjak

    Salmjak

    Joined:
    Nov 25, 2014
    Posts:
    20
    Yeah, definitely. I separated the two though since I considering zoning being a global solution (maximizing CCU in the whole game world) while CPU utilization is a local solution (maximizing CCU/Entities/Objects in the zone which could contribute to player experience) and zones don't have to be on the same machine.
     
    Last edited: Dec 19, 2017
    Kidara likes this.
  12. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Make the game without worrying about how to scale it. Forget multiple zones for now. Just get the core game to the point that it's fun in a single zone/scene.

    If you can do that, scaling will be the easy part, I guarantee it.
     
    Kidara likes this.
  13. Kidara

    Kidara

    Joined:
    Jul 6, 2017
    Posts:
    16
    Interesting things, I took a look at them.

    So, should I do it from scratch? (I know this require high knowledge, but I will study for it, and I have a friend who can help me)

    Mhm, I should analyze their pricing, I don't find anything on their website.

    Good approach, but I prefer find a way to make it unnoticeable. Anyway I will search for that thread, thanks :)

    Thankssss, really helpful

    I see you're experienced. I will consider your advice and see what you have done in your signature links. Thanks :D
     
  14. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    One issue to be concerned about when making the transition seamless is you may want to make objects that are across a server "border" visible from the adjacent server some how. I'm not referring to terrain objects, but instead the players themselves. Otherwise when you cross the border all players behind you will seem to just disappear and other players ahead of you will suddenly appear out of nowhere. I'm not sure the best way to accomplish this.

    I'm not necessarily advocating you do my approach, but a fade to black transition tells the player that there is a real transition happening so they aren't surprised when it fades back in that some things have appeared or disappeared.
     
    Kidara likes this.
  15. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    567
    It's better to start working with a low-level networking library. Instead of creating everything from scratch, it's in your best interest to find a flexible networking solution and build a server on top of it.

    Networking:
    ENet (C# Wrapper)
    LiteNetLib (Some improvements are needed, but the developer is working on it)

    Databases:
    NoSQL RethinkDB
    SQL CockroachDB
     
    Last edited: Aug 7, 2018
    Kidara likes this.