Custom master server

I am able to connect to a master server using serverPort = 23466 and my MultiPlayer game runs nicely. I now want to host my own master server on my spare PC laptop. I installed the master server files provided by the very kind Riekelt found here:
http://forum.unity3d.com/threads/144321-Pre-Compiled-Unity3D-masterserver!

But I believe my game is still using the Unity provided master server because when I shut down my pc which runs the master server,
my game still connects.

The read me supplied with the master server installation states the following:
MasterServer.ipAddress = “127.0.0.1”;
MasterServer.port = 23466;
Network.natFacilitatorIP = “127.0.0.1”;
Network.natFacilitatorPort = 50005;

But in the star trooper demo, I only see a var for serverPort.
Where would I define the other vars like IP?

Thx for any help!

i meant to post as comment..sorry

1 Answer

1

It seems you don’t know what 127.0.0.1 is. This IP will always address your own PC / Tablet / whatever. You need to host the masterserver on a real fix IP address so everyone connects to the same IP.

So now I installed facilitator and masterserver on my mac and closed my pc laptop for now. They run properly and I can see in the console that it connects by reporting connecting to connection tester at .... connected to masterserver at ...... incoming host list...... then iget two errors failed to initialize network interface is the listener port already in use its not possible to register a host until it is running.

Does that mean it would never work with my current computer/network?

Well, it seems you try to register your game at the masterserver before you actually called Network.InitializeServer on your server. There's not much we can say about that without seeing the code that produces those errors. Btw, did you get those errors in Unity or in the MasterServer console?

In Unity console. Thx Bunny!