Unity multyplayer server

Which server I can use in the game instead of localhost? Do I need a computer with white ip the address and to run the server part of the game? Or are there any services from Unity? Is there any way to play multiplayer without having own server?

Unity services : Game Development Software: Build a Multiplayer Game | Unity
Can you play something other than localhost? Of course you can.
You need a computer on the internet, for sure… I’m not sure what a white ip address is, sorry.
You can play without a dedicated server, if that’s what you’re asking; where players can be the server+client at the same time, even switch to a new host/server for a different game or if someone disconnects…

Did you search for an answer before asking?

But many times I have already visited before the page you specify. There is no answer to my question. There I just turned on the permission for multiplayer in my game and identified the number of players 4. Which server I need to specify instead of localhost, so I can try the game with friends via Internet?

Well, the ip address you’d use, to try with your friends, would be… magically … your ip address :slight_smile: If you’re the host .:slight_smile:

I think the Unity Services mean relay and/or lobby services. They don’t actually “host” the game, afaik.
You can have a dedicated server of your own, or let any player be the host or host+player.

One of the players would be the host server. It’s how co-op modes function in games like Borderlands.

Correct. For the record it’s the same with Steam if you choose to use their services.

Thank you very much for your answers! This is exactly what I wanted to know. I will try to purchase a static ip address from my Internet provider to run the host game server.

You don’t need to purchase a static IP address. You can use a dynamic DNS service to achieve the same thing.

https://www.noip.com/free

Essentially a dynamic DNS service provider will assign you a subdomain on one of their domain names and assign your dynamic IP to it (typically you’ll receive an app that will check your current IP address once per hour and forward the number to the service to keep it updated).

Alternatively if you don’t want your computer to be accessible to anyone who knows or finds the domain or IP you can use a virtual LAN service. Hamachi is the one that I have used the most and they offer a free tier of up to five users. For small co-op games this is a very simple and effective solution.

https://www.vpn.net/

Agree, installing Hamachi is the best way to set up a private VPN (be it commercial or self-made service). You may also need to install Privoxy in order to remotely access the net through your home PC running Hamachi. You could run Privoxy on its own, but all traffic would be transferred over unsecured HTTP, that is why you need to use Hamachi.