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

Unet, Mirror, Dots ..... Which one to use for first attempt at a multiplayer game?

Discussion in 'UNet' started by Zaine7673, Nov 15, 2019.

  1. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    238
    Hi all,

    I've been looking into this for the past few days and I'm getting more and more confused.

    I understand Unet is deprecated so i thought id look into what its been replaced with. I think its been replaced with Dots? Couldn't find about this on unity 2019. Doesn't even look like its fully integrated yet.

    Then I thought id look into Mirror (only heard of this one today) and it says that its based on Unet (which has been deprecated)

    So what should i use? o_O

    It's my first attempt at a multiplayer game so I would prefer something that is easy to grasp but also something that would allow me to expand my knowledge.

    Any advice?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    It depends on the game. A game with lots of small matches where you don't want to host a dedicated server for each one, I'd probably go with one of the Photon Cloud offerings. A game with dedicated servers, I'd consider Mirror or a few others.

    DOTS isn't actually a networking solution, it is a different way of coding your entire game. Unity is working on a networking system which directly supports DOTS, though they have been working on their new networking system for a good while now with little to show for it for the amount of time which has passed. With their networking track record I'm skeptical.
    https://unity.com/dots

    Mirror might be the easiest to get started with, since with all Unet's faults it was easy to get something basic up and running, and Unet tutorials are common on YouTube (they only need minor code changes to apply to mirror outside of a few features which have changed or were removed which most beginners don't use anyway - full disclosure, I've never used Mirror but I used Unet for a few years).
     
  3. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    238
    @Joe-Censored thanks for clarifying that.

    I had my assumptions about DOT so that is out of the question now.

    So its out of photon and mirror.

    I've checked photon's website and the free package looks okay for now but even if i get the $95 for 60 months package, I'm concerned that i may get charge if i get over 100 users. I need to understand the charges a little more.

    mirror has good reviews but i understand that its based off of UNET and isn't that being deprecated anyway?
    Also, using mirror means I will still be using unity's networking packages and their price plans will apply right?

    The game I am working on will be based on small matches, sort of like a non-turn-based game of chess. what do you think would be better for that?

    Sorry for all the questions but I'm really trying to get my head around this. So far I'm siding more with Photon
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    If you haven't checked out this thread, take a look:
    https://forum.unity.com/threads/wha...of-available-network-solutions-assets.609088/

    Unet was deprecated over a year ago, but effectively it has been deprecated since at least 2016, as Unity had basically stopped developing for its high level API at that point and had 1 developer working on occasional bug fixes for the low level API. But Mirror has lots of bug fixes and active support by the developer, so I wouldn't be concerned about it going away so long as the developer's network related assets on the store remain popular.

    On your last question, ask yourself if you want to host a dedicated server for these matches. There's pros/cons to doing so. The answer will help you decide between those two API's.
     
  5. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    238
    @Joe-Censored thanks for that link. Super helpful!!!!!!

    that's enough info to help me make a decision.

    I've been looking around and I'm thinking of trying something a bit more fun :) not sure if it will work though.

    As it's a small game that will not require massive amounts of data to be sent, I'm wondering if I can build a p2p host/client sort of thing.

    I will try to get a better understanding of my limitations first though then i can make decision on which direction to go in

    I also have a server already where im hosting a website and can code in PHP/mysql so I want to see if i can find some diiferent method that might suite my needs.

    Maybe this is a waste and I'll settle with Mirror/Photon but I enjoy the process of learning :)

    Might start another thread about it
     
    Joe-Censored likes this.
  6. Slaghton

    Slaghton

    Joined:
    Sep 9, 2013
    Posts:
    139
    I moved my Unet project over to mirror. Got an account/login system set up using php/mysql database. Had a few people login,create some characters, and run around in the world so appears mirror is working alright. I'll have to get more people in for stress tests and probably do some optimizations later.
     
  7. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,384
    Mirror is pretty great.
     
  8. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    238
    Thanks brother. I've decided to play around with a few of them in test projects. just downloaded mirror.

    Are you using the server for just logging in? is there any cool things that mirror can be used with php/mysql?