Search Unity

Networking framework for matchmaking

Discussion in 'Multiplayer' started by ZickigeZicke, Aug 27, 2017.

  1. ZickigeZicke

    ZickigeZicke

    Joined:
    Aug 27, 2017
    Posts:
    2
    Hi, I am developing a multiplayer game based on matchmaking system. The game will be played with 4 players in a room. There could be hundreds of rooms. The game is an action game, so the sync latency is important (its important that the player could react to other players actions in time).

    What are my options here ? I dont want to pay or cant pay 100 $ per month, as I dont know if the game will be a hit or not. So im looking for something open source or free so I can tweak it to my needs.
     
  2. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    For matchmaking, Websockets is fantastic.
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Match making is the easy part. Getting one user to host the game behind their NAT enabled router is where the pain starts. The Unity Multiplayer service's relay servers solve this by bouncing all game traffic off their servers, but that will add what may be an unacceptable amount of latency, and incurs a bandwidth use cost $$$.

    The NAT Transversal asset store package would allow direct connections between the host and other players without bouncing off a relay server, eliminating the latency issue and cutting costs, but the developer themselves say connections won't succeed this way between 5-15% of the time. This is probably where I would start looking though. You'd use Unity's existing matchmaking service and then go for NAT punch through connections, and then decide if that fails do you want connections to simply fail or do you want to use Unity's relay servers (which would mean higher latency and $$$ cost). If you went that way you would get to leverage all the tutorials and examples on how to use the Unity multiplayer service while saving most of the costs that typically go along with it.

    https://assetstore.unity.com/packages/tools/network/nat-traversal-58948

    The developer is on here all the time. I'm sure he'd be happy to talk about what is needed for your users to ensure that connections almost never fail.
     
    thegreatzebadiah likes this.
  4. ZickigeZicke

    ZickigeZicke

    Joined:
    Aug 27, 2017
    Posts:
    2
    I am not talking about peer to peer connection or player hosted games. I am interested in full authorative servers. As I understand, this is an advanced for most of you looking at the answers :) funny
     
  5. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    As Joe said. "Matchmaking is the easy part".
    It's not difficult at all. And if your question is still what networking framework to use. I still recommend WebSockets. Then your matchmaker can be written in Java, C# or NodeJS. (Our backend is written in Node) and we use Websockets for matchmaking. This is because we only matchmake people with similar skill level. In our case we base our ranking off of Glicko 2
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I'm confused. A fully authoritative server networking solution supporting hundreds of individual game simulations simultaneously isn't as much a problem of what network framework to use. As far as cost and latency is concerned its a problem of hosting.

    So you want a dedicated server (a full authoritative server that the player does not host himself is a dedicated server) capable of handling hundreds of simultaneous game simulations, potentially 1000+ simultaneous players, all with fast response and low latency. No matter how efficient you are with CPU and networking, no matter what networking framework you go with, that is going to cost some money. I'd be concerned if you only had $500 per month to spend, but under $100? I'd be rethinking what you're trying to do. This is the reason why most games have one of the players act as the host.
     
    Last edited: Sep 1, 2017
    TwoTen likes this.