Making own server instead of using unity matchmaking and relay servers?

Hi. This is my first time into multiplayer games, and I wanted to try and create a server for matchmaking as I don’t have funds for unity’s multiplayer service. So I just wanted to ask how I can create a server for my game, and host it on that server instead of unity’s servers. I am using uNet for the networking part. Any alternatives to unity’s matchmaking service, which is free, is also greatly appreciated(though i doubt there will be one :slight_smile: ). Please do let me know if you know how to create a server for matchmaking, cause I can’t seem to find any information on it anywhere. Thanks for all the help!


Ps… I am ridiculously new to networking and servers and whatnot :slight_smile:

Just to Clarify; Creating a game server has nothing to do with matchmaking and you can create one using unity’s network manager, see the api here. You can make it so a player simply enters an IP and they join their friend; you don’t need unity matchmaker at all.


If you want to create a matchmaking server (i.e. a list of game servers running), you can do that by having a script use WWW (Api here) to retrieve the list from a remote database (mysql for example) via php. You would be best looking at some tutorials on having php interact with a remote database to get a general idea of what to do.


So the basic premise would be have a server script that sends the gameserver details such as the name and a unique id when the server is started and then have it update every X seconds with the player count etc using that unique id and then removes itself when the server stops. The client then retrieves this and puts it into a list. That would give you a basic server list. There are more things like removing servers that crashed and what not. Bear in mind, you will need a vps or dedicated server to host this which may be more expensive than unity matchmaking. Unity Matchmaking - if you switch to advanced calculator and look at 2000 monthly players (20CCU), it’s only $6. If you have more than that, you are likely making enough to afford to pay for more.