Search Unity

A way to play multiplayer

Discussion in 'Multiplayer' started by CheeseFriz, May 26, 2021.

  1. CheeseFriz

    CheeseFriz

    Joined:
    Apr 1, 2020
    Posts:
    24
    Hi! I'm new to the Multiplayer category, so I'm asking this question. Well, I'm making a game that is supposed to be a multiplayer game. Unfortunately, I don't know of any solution that would allow people to play different hardware far apart on one server. I do not mean a dedicated server because I am looking for a free method. I would like the person who clicks the 'Create server' button to become the host and people who see this server on the list could join it. There is a way?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    So the problem is pretty much everyone is behind a NAT enabled router. The IP addresses issued to any device behind such router doesn't actually exist as far as the Internet is concerned, so packets from outside the local network can't be routed to it.

    So the solutions are every person who wants to host the game, logs into their router (if under their control at all), and manually makes port forwarding changes, then provides the router's IP address to any other player to manually enter to connect to the game. Or you use some kind of server, either your own or via a 3rd party, which all players can connect to.

    For more information on this issue research what NAT does.
    https://en.wikipedia.org/wiki/Network_address_translation

    Basically every home router, every corporate network, every university network, and most mobile phone providers, all use NAT. That's the overwhelming majority of the internet.