Unity Unet own Matchmaking
Hey guys,
I have a own dedicated Server and I want to neither use the matchmaking Service of Unity nor the relay server, so I don't have to spend money :)
The Problem is that I don't know how to set up my own matchmaking system (based on missing knowledge about Networking) and specifically I don't know how to run multiple instances (or matches). If I'm running the server it just starts one instance of the game but I want f. ex. 2 Instances running with 20 player (10 players in 1 match).
I hope I could explaing my question properly and hope for some advice :(
Unbelievable...
...145 persons are following this question and still no one has replied :(((
Answer by tomasara413 · Mar 12, 2017 at 05:55 PM
Well, I am afraid there is no unity function like kind of way of doing it, but I am certain it is possible. You will have to create simple separate application, new unity thread with some function on your dedicated server or separate unity app only for matchmaking purpose. You basically only want to keep either fixed list of ip addresses or your ded. server can contact your mm. server to add it to server list. List of data types (or dictionary) should contain: IP, port, number of players, max slots, and other info if you need.
Once you have your match finding process on, client sends query on mm. server, server sends rpc call on client to ping each not full server and send data back to mm. server, once client pinged every relevant server, server chooses the server with lowest ping (you can use other info from server to create your own order) and sends another rpc call to client with data to connect.
I don't know which network API are you using, In the explanation I expected HLAPI. But it doesn't really matter. You have few options: use the basic c# style or one of unity APIs, it is all bound to which type of solution app you are going to use.
In regards of multiple instances you can either somehow create some rooms/threads on your ded. server or just start another server app. on different port.
Hope it helped.
Your answer
Follow this Question
Related Questions
uNet Windows Dedicated Server 1 Answer
How to command dedicated server 1 Answer
UNITY PROBLEM 2 Answers
Client Spawning Player Objects 0 Answers
uNet: Failed to send internal buffer 0 Answers