Search Unity

Large networked world with multiplayer?

Discussion in 'General Discussion' started by Voley6969, Mar 19, 2018.

  1. Voley6969

    Voley6969

    Joined:
    Apr 6, 2014
    Posts:
    12
    I'm looking to make a networked game like Rust (duh), I have some experience with Unity networking, and wanted to ask more experienced folks a few questions.

    My target platform is Mobile, maybe consoles.

    1. I'm planning to have relatively large world, maybe 4 by 4 km. Should I use meshes with LODs for better performance, or just use unity terrains stitched to each other? What is more performant from your experience?

    2. Unity networking has a class that detects if network updates are needed based on distance, is it ok to use?

    3. Since the world will be pretty big, will I need to store it all in memory on dedicated server to handle all the clients? Is it realistic in terms of memory and performance?

    4. Since I will be streaming only the parts of the world, is Unity networking ok with different world configurations on client and server? Because obviously the client will only see small part of the world at any given time.

    Thanks!
     
  2. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    First, get a team. Hire 20+ guys. Get a good technical director. Get a good network programmer. Problem solved. Solo you have zero chance of success.
     
  3. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    @Quingu : What? Why would you give such advice as to zero chance of success? For all you know his game could be cube players, basic inventory systems, perhaps I just feel more comfortable with network programming than single player games.

    But the truth is, nobody knows the game he wants to make other than the people he's told.
    Runescape for example was made by two people:
    • Andrew Gower
    • Paul Gower
    Granted it didn't stay as two people after it was developed(V1 release), but two people isn't much different than one person on such a massive feat. Say whatever you'd like, but there weren't any Unity's back then and they did it in a reasonable time frame.


    However, I'm sure Runescape didn't just come from some new developer overnight, I'm sure they had a few titles or at least experience under their belts before attempting it.

    According the the forums he's been a member for a few years, perhaps he has some sort of experience with making games and finishing them. But being he's asking these types of questions, I'd say the odds aren't in his favor, but that doesn't mean don't try, it just means they'll have to work harder at it.

    But to answer the OP
    @Dmitry-Volevodz :

    1: I'd say Terrains would be better (unless you need cliffs and such). Terrain has built in LOD.
    2: Of course I'd use that option, the less network traffic the better.
    3: This is a tricky one to answer, most servers don't actually have 'the world' in it, only the information it needs on the world, such as What world is it, and hand that to joining players. The rest is backend stuff. And of course Cheat Prevention if you want that.
    4: Goes back to #3: the server doesn't really need 'The World', it just needs to relate the proper world to players, the rest can be done on client side, except for cheat prevention. You can have the server store player locations (Vector3) and Rotations if you need that, and just distance check players for speed hacks and such.
     
  4. BoogieD

    BoogieD

    Joined:
    Jun 8, 2016
    Posts:
    236
    A 4kx4k world is easily done on a medium priced mobile. It will depend on how much detail you need in the topography and how many avatars, meshes and trees etc. you expect to be rendered in each frame. There are various ways to make a much larger and/or detailed world, just depends but not so important at this stage.
    Just start with a single large terrain first and get the controllers and multiplayer interaction working across the network. That is where most of your issues will be.
     
    Voley6969 likes this.
  5. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    He said "like Rust". Check screenshots of that game. Solo there is zero chance, like I said. Don't give him any hope. He will only waste a year or two and then he will realize what more experienced people see at a glance.
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    It depends on the complexity of your world as to what the best strategy is for dealing with it is. In my game I store a much larger world than 4km in memory on the server and the clients, but I keep my terrain and objects on it relatively simple. One thing to understand is you don't need to include everything displayed on the clients in the server version of the game world. You'll just need what is necessary to handle any server authoritative physics, and to run any server side logic, but not much else.

    As far as differing world configurations, Unity's UNET doesn't really know about that, and should only be a problem if your game is designed where that would be a problem. For example, if you did a lot of client side prediction for syncing object locations, but they are located in an area of the map not yet loaded on the client, that would be a problem. You might see them falling into nothingness on the client, only to repeatedly seen snapping back up to where the terrain is known to be on the server.
     
    Last edited: Mar 19, 2018
  7. Voley6969

    Voley6969

    Joined:
    Apr 6, 2014
    Posts:
    12
    Thanks for your concerns. I'm doing a game of a much lesser scope, I have some money for modellers and animators, and I have some experience.
    I only wanted to ask some practical questions, I know that scope of this is huge.
     
  8. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    If everyone in the world had that mindset we'd stil be living in caves not understanding how to create fire.
     
    Rodolfo-Rubens likes this.
  9. BoogieD

    BoogieD

    Joined:
    Jun 8, 2016
    Posts:
    236
    'like' Rust doesn't mean something the same as Rust.
    Besides that, maybe he is one for the journey rather than an assumed destination like most on this forum whether they know that or not.
    No one can pull off the same 'success' a AAA game company can do with teams of paid developers and a huge budget with extensive marketing but that doesn't mean that an individual shouldn't give it a go.
    That's how you learn. You fall off your bike and get back up again.
    So get in your pine box cause you gonna die anyway.
     
    Last edited: Mar 19, 2018
  10. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    if your target is mobile for an fps i would say its a bad idea to simulate physics on server, especially when the average ping is going to be 500.
    i dont remember having seen any mobile fast game that had server physics calculation.
     
  11. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    Creating fire requires just one capable guy who tries something new. There is nothing impossible about it. There is no comparison with development. In development, be it construction or games, you are dealing with HUGE volume of work. There is now way around it. Small teams with limited experience must be VERY cautions when choosing scope of their projects. It's a typical beginner mistake to shoot for something large and complex. 99/100 of such projects are not completed.

    Did you know that Minecraft has SEVEN "systems programmers"? At Mojang they have seven guys just for maintaining and enhancing core game systems which are already in production since 2009. Making games is hard and very time consuming.
     
  12. BoogieD

    BoogieD

    Joined:
    Jun 8, 2016
    Posts:
    236
    Absolutely true but how did the guys who work at these places get experience? They didn't just get it out of a Wheaties box.
     
  13. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    @Quingu : I'm not arguing that it's time consuming or hard. Only that nothing is impossible. Yeah the odds may not be in your favor. But that doesn't mean you have a 1% chance.

    Sometimes people are just wrong, like the Wright Brothers, the day before they finally took flight, a scientist wrote out a research paper on why it was impossible to achieve flight. And bam, they did it the next day.

    The only point I really am trying to make is, with enough determination, effort and imagination, you can achieve anything.

    Oh and about the fire and cavemen stuff, it might seem rather simple to us, but it is no easy feat. And doesn't just happen by accident. You can rub sticks into sticks all day long, doesn't mean you'll get a fire. That was an extreme feat of engineering for the time, when you consider they had no source of fire other than storms, sun starting fires, etc, for millions of years. (I'm talking about all Homo species combined), not just the one we are.

    We are just lucky to grow up in the time we did, when we can gain the knowledge from the ones before us, in an instant.
    Remember, cavemen and the ones before, didn't have a www.lmgtfy.com , well, unless the Aliens came and brought us lol.
     
  14. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    It's not true that "nothing is impossible". That's only your philosophy which is not grounded in reality. Try to bench press 1000 kg. Impossible. Try to make something like Skyrim solo. Impossible. Try to build a skyscraper solo. Impossible. Great many goals are impossible to complete. Some people don't realize that and they attempt the impossible. Certain things are impossible objectively. Some are impossible only subjectively. Your example with Wright Brothers refers to subjective impossibility which often my be conquered. That paper about impossibility of flight was scientific trash. Even birds can fly. There are goals which can't be met no matter who you are and when you set them God is laughing at your plans.
     
  15. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Well whatever you want to believe I suppose. I think the future will make you re-think every single thing you just said.

    But the main thing, quit saying making a type of game is impossible, because it is not. If someone wants to spend 30 years of their life making it, then what's to stop them other than people putting doubt into their head? It's not impossible, it's just not feasible if he expects and ROI, but if that is what he wants to make, as a life goal for him/her self, then let them at it.

    But that's it for me on this, we've derived off topic enough I suppose.
     
    Joe-Censored likes this.
  16. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    If you are a talented programmer nothing is impossible, the rest can be bought in various stores (Though it will not look triple A)
     
    N1warhead likes this.
  17. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    It is certainly possible to make a large open world game solo given enough time and properly scoping the project to what is feasible and what you're willing to pay for.
     
    N1warhead likes this.
  18. Jesper-Nielsen

    Jesper-Nielsen

    Joined:
    Nov 14, 2013
    Posts:
    95
    Have you considered not using Unity server-side? It's doable if you write an exporter and work with a much simpler geometry on the server. I'm doing an MMO type game - but smaller scope - and all of the logic is actually just 2D. Only the rendering is 3D.
     
    N1warhead likes this.
  19. ChazBass

    ChazBass

    Joined:
    Jul 14, 2013
    Posts:
    153
    Seriously, stop. Why do you care? You made your troll entry. If he wants to try, let him try. He asks very reasonable questions. Received some good advice. Move along.
     
    Rodolfo-Rubens and N1warhead like this.