Search Unity

Question Which Network Framework to use?

Discussion in 'Multiplayer' started by seelen31, Jun 8, 2023.

  1. seelen31

    seelen31

    Joined:
    Mar 13, 2015
    Posts:
    5
    I want to create a multiplayer game with both local as well as online multiplayer with a maximum of 4 players. Can anyone advise which would be the best multiplayer framework option to use (Photon, Mirror, FishNet, NetCode for GameObjects)? I am an indie developer and as such would like to keep the costs as low as possible.

    Any assistance would be greatly appreciated!
     
  2. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    440
    Hi @seelen31 , "a maximum of 4 players" is just one aspect that needs to be considered. The type of game matters too.
    If your game is slow-paced, you can consider Netcode For GameObjects.

    P.S: if you're unfamiliar with the best use cases of each multiplayer framework, you should hire a multiplayer consultant to get proper advice.
    This will help you avoid rewriting all your game from scratch in 3 months from now.
     
  3. seelen31

    seelen31

    Joined:
    Mar 13, 2015
    Posts:
    5
    Thanks for the feedback. I envisage the game to be somewhat slightly fast paced (like a "collect as much coins before the other team can" run around - not as fast as a sonic game but similar in pace to Super Mario 3D World) but like I said, it will have a maximum of 4 players per game. I was looking at Mirror but I also see that FishNet has the same functionality but is faster (as per the dev and some reviews on it). Photon could work but I'm not sure how the cost would ramp up (for example if I have my game on mobile and each time players connect to a room). If this scales up, would I be paying for each ccd per room created? - I'm guessing so. I have been leaning towards Netcode For GameObjects but like you said, I needed some proper, qualified input before I started developing and then realising that 3 months down the line, that the networking framework does not meet the requirements for my game.
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,980
    If you ever find yourself asking for "the best" <insert any programming framework here> you should see that as a bright red flag because it means you did not flesh out the requirements enough to make a sensible decision. More so if you defer that decision-making process to random strangers on the Internet, and cost being your primary concern.

    Generally speaking, I'm afraid that this is your job first and foremost. You can use this feature matrix to help you narrow down the options.

    As to cost, you will have to run the numbers. None of the solutions is really "free" because you will need to host at least one server somewhere, and unless you want players to play only with friends you'll need Matchmaking and Lobby services too. Unity and Photon both provide such paid services. I always find that the built-in services are far more attractive due to ease of use and not having to worry about server administration issues.
     
  5. MrBigly

    MrBigly

    Joined:
    Oct 30, 2017
    Posts:
    221
    He did come to the right place, yes?