Yes I know this is like my 4th thread in this section but I’m still confused about networking and that’s what the forums are for.
As some of you already know, Unity’s Master Server has been having some… difficulties… running at a constant time. I’ve been told I shouldn’t complain about this, as it’s only a testing server, and I can set up my own Master Server instead. (Which I figured I’d need to do anyways because people said that you shouldn’t host the final game on Unity’s Server)
But… I have no clue how to set this up. (To all you who are probably going to say pay for hosting I do not wish to do this, it’s just for testing currently, so why should I have to pay?)
I have downloaded the Master Server files but all I see is MakeFile, MasterServer.cpp, MasterServer.h etc. I have no clue what programs these open with or how to set up the server correctly. (I am on a Mac by the way)
Any help would be appreciated! (Please like a step by step)
The reason why people tell you to rent a vps is because the master server needs to be on a server that is reachable by anyone that want’s to play your game(s). Nope, you don’t have to do that if you don’t want this. You can build the master server in visual studio or the equivalent on MAC and run it on your local PC/MAC. Or on some old pc in your LAN. It doesn’t have to be a fast one or a recent one. CPP stands for C++ so you need to get something that can compile C++ on your MAC to build the server and then you can run it.
You could try opening a command prompt, going to the folder containing Makefile, and running “make”. If it works then it will save you the pain of trying to do anything useful with XCode. You should end up with an executable somewhere than you can then just run.
First off I’m on a Mac, so no command prompt, just terminal. Second I’ve already tried that, “make” is not a command recognized. I guess I don’t have makefile installed or something.
Terminal’s fine, anything that lets you run shell commands.
If the command line tools are not installed, run Xcode, and look in Preferences/Downloads/Components for Command Line Tools, and install that. Then make should work.
You can use Xcode if you prefer, it’s up to you. But for third party apps I prefer one shot build commands rather than poking around in an IDE - there’s less potential for user error, building with the wrong settings etc.
If the command line tools are not installed, run Xcode, and look in Preferences/Downloads/Components for Command Line Tools, and install that. Then make should work otherwise you could try opening a command prompt, going to the folder containing Makefile, and running “make”.
I’m trying to install the facilitator masterserver as well, on a VPS with Ubuntu. I’ve downloaded and unpacked the zips, installed the curses lib as suggested, and gave the ‘make’ command, but am getting the following errors:
RakNet/Sources/SignaledEvent.o: In function 'SignaledEvent::InitEvent()':
SignaledEvent.cpp:(.text+0x81): undefined reference to 'pthread_mutexattr_init'
RakNet/Sources/SignaledEvent.o: In function 'SignaledEvent::CloseEvent()':
SignaledEvent.cpp:(.text+0xf0): undefined reference to 'pthread_mutexattr_destroy'
RakNet/Sources/RakThread.o: In function 'RakNet::RakThread::Create(void* (*)(void*), void*, int)':
RakThread.cpp:(.text+0x54): undefined reference to 'pthread_attr_setstacksize'
RakThread.cpp:(.text+0x7d): undefined reference to 'pthread_create'
collect2: ld returned 1 exit status
make: *** [Facilitator] Error 1
Anyone knows what I’m doing wrong? Building the masterserver gives errors like these as well…
It works for me on a rather old Ubuntu box. But try editing the Makefile, line 90 (for the facilitator) - move “$(CFLAGS)” to the very end of the line.
So I compiled the master server and i can run it. Now I have a question: How do I connect to that Master Server? Using my IP in MasterServer.ipaddres and the displayed Port in MasterServer.port didn’t really work. It said: “Can’t connect to Master Server at .…”. Am I making a mistake.
@riekelt Thanks that worked I already had the facilitator running and I insert the ip and the port but I used my IP i got from a page like Whatsmyip and such. I didn’t try the localhost-ip.
Thanks.