Communication in a network

Hello everyone !

I’m learning some interesting stuff on networking in Unity, but I am looking for a specific thing. Although I understand how a server and a client communicate (or clients between them), I need a precision.

I’m working on a little multiplayer FPS, and the player has two possibilities to begin a game : he can create a game (he’ll be the server), or he can join a existing game (he’ll be a client).

My problem is the following : when a player has created a game, how can the other players know that a game has been created (at this moment, in my opinion they are not yet connected to the server)? I would like to know how we can “see” an opened game in the network.

Thanks in advance !

Correct :wink: You can use the default Unity Masterserver, but for serious games you should host your own masterserver. Unity’s master server is ment for development and was not very stable in the past.

The master server is of course only needed if your game should run across the internet. In a local area network you can also use normal .NET Sockets and send UDP broadcasts into the LAN. This might be a bit more complicated, but you don’t have to rely on a internet connection. With a masterserver it’s easier and it usually works in all setups (even in the webplayer, local and / or the internet).