Build and Run Executables for Server - Alteredux/XR GitHub Wiki
Build Game Server
- Add Linux Module to Unity for Server Builds
- Select
Build -> Build Server (Linux)
Build Matchmaking Server
- Clone this Git repository in the destination server: http://gitlab-ce.logti.etsmtl.ca/pfe-alteredux/matchupserver
- Open the MatchUpServer folder in a terminal.
- Execute
make
inside the destination server for a debug executable ormake release
for a release executable.
Transfer Files
- Zip the Builds/Linux/Server folder in your local computer.
- Upload the zip file to the server and unzip it.
- Copy the MatchUpServer file from MatchUpServer/bin/debug or MatchUpServer/bin/release.
- Open the Builds/Linux/Server folder inside the server and paste the MatchUpServer file.
- Download the portpicker.py script from Github and put it in Builds/Linux/Server.
- If not available, download from here: portpicker.py
Setup Server
- Install Python using
sudo apt install python
- Limit port range for port picking using
sudo sysctl -w net.ipv4.ip_local_port_range="15000 25000"
(the portpicker.py script picks a random available port for each created room)
Run Server
The matchmaking server is responsible for launching and killing game servers. Therefore, we only need to launch the matchmaking server.
- Open Builds/Linux/Server in the terminal.
- Execute
sudo chmod +x ./MatchUpServer
andsudo chmod +x ./Server.x86_64
- Execute
./MatchUpServer --port 14999