Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is it considered bad practice to implement your networking after the game is in development?

Discussion in 'Game Design' started by ImAldu, Jun 12, 2016.

  1. ImAldu

    ImAldu

    Joined:
    Mar 6, 2015
    Posts:
    64
    Hello,
    How do you guys feel about this? I typically do it well before I'm ready to start active development on the title but I see a lot of people do it after development has started. While sure, there shouldn't be a problem whatsoever if said game is not 100% dependent on multiplayer but what if it is a prime component of the game and the design depends on multiplayer being there?

    All help is appreciated! :)
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,964
    Multiplayer is ideally considered and made part of the design of a game early in development. Actual implementation is best handled early too. Otherwise you run the risk of having to slow down development by returning to older code and ensuring its written with multiplayer in mind.
     
  3. ImAldu

    ImAldu

    Joined:
    Mar 6, 2015
    Posts:
    64
    That's what I figured. I've never personally done it later in the dev cycle but I figured I'd ask. I was taught to do it ASAP. Thank you for the reply.
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    This. Multiplayer massively effects the game. Design, code and art all change if the game needs to support multiplayer.

    You don't need to implement multiplayer early. But you do need to structure your game in a way that supports multiplayer.
     
    AndrewGrayGames and Ryiah like this.
  5. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    The Subnautica team scrapped multiplayer as part of the game, and instead talked about releasing a separate multiplayer game. They hadn't really started on network code and decided it wasn't worth the pain to try to add it to the already working single-player game.

    Design for MP or just forget it!
     
    AndrewGrayGames and Ryiah like this.
  6. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    It is bad form to be changing the inherent nature of your game's design during the development process, in general. You would think that bit would have been sorted during the prototyping and planning phases.

    That said, there's a walk through just for that:

    http://docs.unity3d.com/Manual/UNetConverting.html
     
  7. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I tried this guide on Pond Wars. You don't get a much simpler game then that. Yet it still made sense to basically throw the whole thing out and start over. Networking gets intertwined everywhere. You really need to plan your architecture to deal with it from the beginning.
     
    AndrewGrayGames and Ryiah like this.
  8. BingoBob

    BingoBob

    Joined:
    Feb 26, 2016
    Posts:
    80
    Don't Starve, Skyrim, Portal, Magicka. are just a couple games I can think of that came back latter with Multiplayer versions of their games. I'm no expert but it would make sense to me that even if you don't 'plan' on making a multiplayer game when you start. probably aught to lay that foundation just in case.

    EDIT: now watching No Man's Sky. It's only a matter of time before they realize it needs to be multiplayer I just hope they have made the necessary preparations.
     
    Last edited: Jun 14, 2016
  9. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    Ummm...that didn't actually happen. The Elder Scrolls Online does not count, as that's an MMORPG.
     
    BingoBob, Ryiah and Kiwasi like this.
  10. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Skyrim and Portal at least we're two different games. The multiplayer for both was added in a new release with a seperate structure. Portal even had two totally separate campaigns.

    This probably proves the point that it's easier to start over with a new game then to add multiplayer to a single player game.
     
    Ryiah likes this.
  11. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah although if you're inexperienced in networking and you're making up the game as you go along, it's best to do networking when the game's finished. It sounds counter productive, but I believe that would be the most productive option for the majority of single developers or indies in that situation. Which seems to be a large bulk of the forum.

    The fact UNet is poorly understood and a WIP doesn't cause a stampede to implement it early either. The problem overall with doing networking first is that you need to have done networking before. Otherwise you have no real idea what you're doing to begin with and overengineer, underengineer and make a grand mess of your main game's code.

    So the benefit for doing it after is you have hindsight and can see where or why and what needs to be changed to support networking. Of course if you've got some experience then do it first.
     
    Ryiah, AndrewGrayGames and Kiwasi like this.
  12. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    Chicken-and-Egg Paradoxes always suck.

    Of course...that's also why mankind created the humble Tech Demo. There's a reason I create so many. Don't be afraid to prototype with a new technology, not everything you write has to go to market. In fact, if Sturgeon's Law is to be believed, by default 90% of it should not.

    Also, a side note - no matter what kind of software development you do, being able to cobble together a rudimentary demo of some technology that reflects a legitimate use case for your team/shop is one of those key skills that helps to separate "merely" good programmers from great programmers.
     
    Last edited: Jun 14, 2016
    Ryiah, Kiwasi and hippocoder like this.
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah I am majorly big on prototypes. I have so many cube demos it would make notch have a serious case of envy. Even use the odd sphere.
     
  14. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    Hmm... without diving into specifics, it's not actually that bad. The tutorials on here are quite good, as well. I guess if you feel like it's easier to toss out everything and begin from scratch, maybe it would be helpful to code some networking stuff from scratch. And when you've tried that, you'll come back and Unity's network stuff will feel like hitting the easy button. It's really all relative.

    What's funny is your pond game is basically the same concept as Unity's networking tutorial, two player characters, projectiles and collision data. There's few enough projectiles that you could keep it pretty tightly in sync.
     
    Ryiah and Kiwasi like this.
  15. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I think I will tackle a 'network tech demo' first before I revisit networking in Pond Wars.

    Syncing the players and the projectiles was straight forward. Syncing the 100 odd rigidbodys and 200+ joints that made up the water was a little more challanging. That's the stage where throwing it out and starting over made more sense.
     
    GarBenjamin and Master-Frog like this.
  16. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    Ah, interesting... seems like you'd just want to have the server simulate the water and then use the network transforms on the ships. Probably use some type of interpolation on the water, since its just a visual effect on the client side at that point. I wonder if you couldn't have a few key rigidbodies and then use Lerp techniques to simulate the same effect. But yeah, it's almost starting over at that point.
     
    Ryiah and Kiwasi like this.
  17. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    If nothing else, you want to be testing networking as early as possible. It's a hell of a lot easier to retool a system to work with networking before you start building it up. Networking can and will clash with architecture, and architectural issues make for great excuses to toss a project.
     
    AndrewGrayGames, Ryiah and Kiwasi like this.