Search Unity

A simple Networking game?

Discussion in 'Getting Started' started by Frutty, Jun 9, 2017.

  1. Frutty

    Frutty

    Joined:
    Nov 3, 2015
    Posts:
    12
    Hello there!

    This question has problably been asked 10000 times already, but I couldnt find a recent one.

    If I were to make a simple boxing game. Nothing fancy. Just a floor, a first-person view, a hit/block button and movement. Just so I can play against a friend, how would I go about?

    Should I focus on making the networking first or should I finish the game, and then go for the networking? - I'm only asking about your personal experience.

    Also, do you know a good networking tutorial? - And do you have any advice?

    Thanks in advance! :)
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Disclaimer: I've only made finished one game so far. It was a turn-based board/strategy game for iOS with local and online multiplayer.

    My recommendation to you is to definitely not wait until you have the game nearly finished before adding in networking. That's kinda what I did, and it was a huge PITA to try and retrofit systems with the multiplayer API.

    Looking back, if I had been smarter I'd have created a separate class to handle online calls. Anything network related would be handled by this class, so the rest of the project would have no vendor-specific code anywhere. For example, my main menu would just have a Sign In button that would call the Multiplayer.ShowLogin() method. That method would have platform checks and run the appropriate API call for Apple, Google, etc. If I had done this, I may have gotten around to porting the game to Android.

    But yeah, get your basic online functionality working very early on. Then, as you add features to the game, tie them into the networking framework.

    Good luck!
     
    Tset_Tsyung, eXonius and Ryiah like this.
  3. Frutty

    Frutty

    Joined:
    Nov 3, 2015
    Posts:
    12
    Thanks alot! It's better to ask about personal experiences from others than to remake the same mistakes. :) Thanks for sharing! :D
     
  4. Tset_Tsyung

    Tset_Tsyung

    Joined:
    Jan 12, 2016
    Posts:
    411
    Totally agree with Scneider on this one.

    I wanted to make a Spy vs. Spy style game. I spen MONTHS on it, doing the models, animation (all in blender) level design, getting my head around how to add the different ideas and features in! But I had to shelve the project when I realised that all the work I had done was going to have to be ripped out to incorporate the networking side of things. And I haven't returned to it since.

    I did get a basic prototype of a networking game up that my friends and I played... that was a fun project - another failed one though... :(