Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Standalone Client Matchmaking / Peer to Peer Multiplayer

Discussion in 'Multiplayer' started by Denozone, Sep 2, 2015.

  1. Denozone

    Denozone

    Joined:
    Jul 28, 2014
    Posts:
    4
    Hi unity community,

    My basic idea is to have a Launcher with basic update functionallity, shop, statistics and matchmaking.

    My problem is I don't know how I would implement it. It's sort of a MOBA game so my actual Unity game would only be 1 scene right? I could imagine that I have to start the process and give some startup arguments. Like an array of properties.

    [host] = "xxx.xxx.xxx.xxx"
    [username] = "name"
    [team] = "team_X"
    [character] = "swordsman"
    etc..

    but is this possible?

    The second problem is I would like it to be a peer to peer game. So 1 of the players is assigned as the host. (All sort of ping/latency tests and choosing the best host is done in the client). First of all is this Peer to Peer approach easy to use in Unity (no portforwarding/NAT/Firewall problems) or do I have to build dedecated servers?
     
  2. TehGM

    TehGM

    Joined:
    Nov 15, 2013
    Posts:
    89
    The way I did it in my old prototype (really, very old, in old networking system, and I was new to Unity too), was to code out-of-engine launcher and auth server using just .NET. Then launcher would save the data it got from the launcher to a temp file, and game would load it on startup, and then delete the file.
    However, that was a mess. It worked, but a mess. Unsure if there's anything better though. If there is and someone has an idea, I'd also like to hear.