Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How difficult would it be to create 4 player online multiplayer game with NPCs?

Discussion in 'Multiplayer' started by Lord-Herek, Oct 3, 2020.

  1. Lord-Herek

    Lord-Herek

    Joined:
    Mar 12, 2016
    Posts:
    1
    I'm creating a up to 4 player game I intend to release. However so far there's no online multiplayer, only local.

    In terms of scope the game is similar to for example Crash Bash but with bunch of mindless NPCs (about 30) that only wander around and play certain animations. Nothing else.
    The game is 3D, top-down, very modular (about 4 independent game modes) and has no physics but at given time the animations (of all game objects) should be the same on all devices. Meaning that an given NPC (or gameobject) should look exactly the same on each device (it's important).

    How difficult is it to implement online multiplayer in Unity where 1 player is the host and others connect to his computer?

    If you have some useful resources how to learn that I would be very glad :)
     
  2. ferverence

    ferverence

    Joined:
    Jul 15, 2014
    Posts:
    56
    Multiplayer is essentially another code base on top of single player, or you modify your single player code to be multiplayer also. It's not a quick and easy feat and it's up to you which way to go.

    Mirror is pretty easy to tack onto Unity. But still has it's quirks and learning curves if you're new to the multiplayer concept. There are plenty of other solutions that may be better options that others can mention - But I've only used UNet and Mirror.

    Prepare to be frustrated, annoyed, and want to give up. But if you push through it's worth it (maybe) lol...
    Before tacking multiplayer onto your codebase I'd recommend building some simple test projects with it to learn it first.


    https://mirror-networking.com/docs/Articles/Guides/index.html
     
    Lord-Herek likes this.
  3. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,010
    Single programmer ? Don't even approach multiplayer, until it is a turn based game.
     
  4. ferverence

    ferverence

    Joined:
    Jul 15, 2014
    Posts:
    56
    Not sure what that means, turn based could be even more complex. If anything, multiplayer should just be considered and coded from the onset of a project. Backtracking is what is most time consuming and difficult.
     
  5. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,010
    Match 3 can be more difficult to make than MMORPG. But let's face the reality, multiplayer turn based is mostly easier to do than real time multiplayer.
     
    ferverence likes this.
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    For a rough estimate, take your estimated time for a single player version of your game and multiply it by 4. Good luck
     
  7. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    Wiser words have never been said. @Joe-Censored +1
     
    Joe-Censored likes this.
  8. ferverence

    ferverence

    Joined:
    Jul 15, 2014
    Posts:
    56
    Haha. When I hit this mystical x4 mark it made me simplify the single player. Stuff can be added later just need to at least finish it >.<