noob question about master server

hi, i an new to networking in unity and i m a bit confused with master server functionality, i dont know exaclty what it is? and what is that for? i thought what u need for making multiplayer its a server (creating with Network.InitializeServer) and client but then i saw the master server and look for this, but only found tutorial for use it but dont explain whats the diference. well sorry for my poor english and thanks .

A masterserver is an application that lists games and connects clients to servers. Each server instance of a game can register it’s game on a masterserver so clients can connect to it. Clients retrieve the games list from the masterserver and connect to the (game)server of their choice.

Don’t worry, I don’t think that this is a noob question. I consider myself a newby, too, and I had to struggle with the same question.
Appels put it right: The master server is simply a “directory service” that helps bringing clients and servers together.

However, one important thing mostly goes unnoticed when people start getting into multiplayer gaming with unity:
You don’t need a master server at all! You can also implement a simple peer-to-peer network game, where each client enters the IP/hostname to connect to, instead of retrieving potential servers from a master directory.

There is an excellent tutorial series on youtube by GTGD (“GameToGameDeveloper”). You may want to have a look at episode 1.4 of it:
https://www.youtube.com/watch?v=quxZ3DCtjuI

It explains exactly how to implement such a peer-to-peer connectivity. It helped me tremendously in setting up my own game - without any master server!

HTH

Please don’t use wrong terminology which will confuse people, it’s allways client/server in Unity.
The methods of connecting to a server can change but it’s still client/server.

Yes, you’re right, I wasn’t precise about that.
All I wanted to point out is that the master server isn’t needed if you don’t want to use it.
Without a master server, one of the connecting machines still has to play the “server role”, while all others are clients.
Hope that was a better attempt.

thanks all a last questions.

the machine running the master server cant play the game, is that right? only work for server game, and can host more than one servers?

in the other side you can run the game and host a server and play as client too, is that right?

No, the masterserver application can run on any windows machine, it’s a sepperate application so you can run a gameserver also on the same machine.
The masterserver does not host anything, it lists games ( like a database application ). You only retrieve the list to be able to connect to a server. ( which can be on the same host or a different host )

Yes, the machine acting as the host (=server) can also participate in the game like a client.
Also note that you can even run multiple instances of the game on one PC, deciding for yourself at runtime (when connecting) which one will be the server and which ones will be the clients. This becomes obvious when developing and testing the connectivity of your game on your local single machine.

If you take a look at the tutorial I’ve linked above, you’ll see that it demonstrates exactly this.

ok thanks very much, i am getting now, i am watching tutorials and now iccan understand. thanks again