Build and Run Executables for Server - Alteredux/XR GitHub Wiki

Build Game Server

  1. Add Linux Module to Unity for Server Builds
  2. Select Build -> Build Server (Linux)
    image

Build Matchmaking Server

  1. Clone this Git repository in the destination server: http://gitlab-ce.logti.etsmtl.ca/pfe-alteredux/matchupserver
  2. Open the MatchUpServer folder in a terminal.
  3. Execute make inside the destination server for a debug executable or make release for a release executable.

Transfer Files

  1. Zip the Builds/Linux/Server folder in your local computer.
  2. Upload the zip file to the server and unzip it.
  3. Copy the MatchUpServer file from MatchUpServer/bin/debug or MatchUpServer/bin/release.
  4. Open the Builds/Linux/Server folder inside the server and paste the MatchUpServer file.
  5. Download the portpicker.py script from Github and put it in Builds/Linux/Server.
  6. If not available, download from here: portpicker.py

Setup Server

  1. Install Python using sudo apt install python
  2. 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.

  1. Open Builds/Linux/Server in the terminal.
  2. Execute sudo chmod +x ./MatchUpServer and sudo chmod +x ./Server.x86_64
  3. Execute ./MatchUpServer --port 14999