Search Unity

Question Considering switching from Photon to NGO. Are there different SDK's for Dedicated and Peer 2 peer?

Discussion in 'Netcode for GameObjects' started by miinoy, Jan 19, 2023.

  1. miinoy

    miinoy

    Joined:
    May 27, 2019
    Posts:
    17
    I am coming from a Photon background where there is a Host/Server as well as "shared" P2p mode.
    These two modes require you to write netcode and think about game architecture in very different ways.

    Is it the same with NGO? What if i wanted to start my game using Epic Relay Service as peer 2 peer but down the line I decided i want it as a dedicated server as a headless linux client?

    Thanks!
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,005
    NGO is server-client architecture, and that‘s it. No separate dedicated server code necessary. No peer to peer though, not in the exact sense at least where each client communicates directly with any other client. Of course with the additional latency you can relay any message through the host.

    If Epic is implementing true peer to peer: just stay away from that, unless your game is coop / non competitive but even then if it‘s like the p2p that I know where if one client drops the game ends, it‘s just not a good experience. Not sure if NGO has an Epic transport though, check the github community repo for NGO.
     
    RikuTheFuffs-U and CreativeChris like this.
  3. Serinx

    Serinx

    Joined:
    Mar 31, 2014
    Posts:
    788
    Unity has a Relay service that allows you to connect 2 players without a dedicated server:
    https://unity.com/products/relay

    This works similarly to Photon PUN relay.

    Relay basically lets clients connect to each other via a relay server, and with netcode for gameobjects you can have 1 client work as the server (host).

    It's not true peer-to-peer but gets around the common NAT issues and doesn't require port-forwarding etc at the cost of a slight delay (same as PUN).