Player creates game room UNet.

Is there a way in UNet where the player creates the game room on their computer and other players join? I’m trying to learn UNet by making small browser games and don’t have a budget for servers. So I want the player to host the game. Thanks :slight_smile:

That is the standard way things work with UNet. It’s actually quite a bit more difficult to set up dedicated servers. Maybe you’re getting confused by the MatchMaking or relays. The MatchMaking is just a list of matches stored on some Unity server somewhere. Players connect to it to get the list of matches or to add a new match to the list, but the MatchMaking servers aren’t actually hosting the match. The host is whoever creates the match.

It is a similar situation with the relays. Player data may pass through a relay server but the relay server is not really hosting the game, it’s just passing data between clients and the host. Again the host is whoever creates the match via NetworkMatch.CreateMatch()

All of that was kind of assuming you are using the matchmaking, but if you’re not it should be even more clear who the host is, since it will be the player who calls StartHost()

No matter what you’re going to have to pay for the relays if you’re making a multiplayer web game, but there’s no reason you should have any other server costs (other than the server that is hosting the actual web build of course, but that server isn’t actually hosting the game either, it just serves up the build so that the player’s browser can download and run it.)

Ok, you’ve been really helpful. Please tell me if anything to do with web NAT Traversal comes out :slight_smile: