Repository navigation
[RType] Build & Run
In this section, you’ll find all the information needed to install and launch the project.
To compile this project, you’ll need the following dependencies:
- Conan for third-party dependencies.
- CMake to build the project.
- GCC or Clang to compile the project.
- Visual Studio 2022 to compile on windows
Note: If you encounter any issue, see the official Conan installation guide.
To install Conan on Windows, follow these steps:
- Download the Conan installer from Conan's official website.
- Follow the installer instructions to complete the installation.
To install Conan on Linux, you can use pip:
pip install conan- Download the CMake installer from CMake’s official website.
- Run the installer and follow the instructions.
Install CMake via your package manager:
sudo apt update
sudo apt install cmakeFor Windows, you can install GCC via MinGW or install Clang directly:
- Download MinGW from MinGW’s official website.
- Follow the installation instructions, and ensure you add MinGW to your PATH.
On most Linux distributions, you can install GCC or Clang using the package manager:
# For GCC
sudo apt install gcc
# For Clang
sudo apt install clang- CMake (3.10+)
- Conan (1.36+)
- Open a terminal and navigate to your project directory.
cd path\to\your\project- Create a build directory:
mkdir build && cd build- Install dependencies:
conan install .. --output-folder=build/conan --build=missing- Configure with CMake:
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release- Build the project:
cmake --build .- Open a terminal and navigate to your project directory.
cd path\to\your\project- Create a build directory:
mkdir build && cd build- Install dependencies:
conan install . --output-folder=build/conan --build=missing -c "tools.system.package_manager:mode=install" -c "tools.system.package_manager:sudo=true"- Configure with CMake:
cmake .. -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="conan/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW- Build the project
cmake --build . --config ReleaseTo build with SDL, use:
conan install .. -o graphics=SDL --output-folder=build/conan --build=missingIf you prefer not to use Conan, make sure you have the following dependency versions:
- glm > cci.20230113
- asio > 1.30
- sfml > 2.6
- lua > 5.4
- nlohmann_json > 3.11
Note: Download the installer from this link and follow the instructions for a quick installation.
To play, a client needs to connect to a server.
For the game launch of a client, our approach is based on a classic game startup process. Similar to VALORANT, Overwatch, and Minecraft, no parameters are required—just an executable to run. The program will automatically retrieve the player’s IP and use the first available port on their machine. The only connection needed occurs in the menu, where the server’s host and port are requested for the player to connect.
./r-type_client.\r-type_client.exeIf you would like to specify the necessary fields for launching your game on the client side, a debug mode is available that allows you to choose your host and port.
Linux
./r-type_client --debug [HOST] [PORT]
# Example
./r-type_client --debug 127.0.0.1 4242Windows
.\r-type_client.exe --debug [HOST] [PORT]
# Example
.\r-type_client.exe --debug 127.0.0.1 4242The server can be launched without specifying any arguments, similar to the client.
Warning: By default, the server will use
127.0.0.1as the host and8581as the port, making it accessible only on a local machine.
./r-type_server.\r-type_server.exeIf you want to run your server with a specific host and port, use the following command:
Linux
./r-type_server -p [PORT] -H [HOST]
# Example
./r-type_server -p 4242 -H 127.0.0.2Windows
.\r-type_server -p [PORT] -H [HOST]
# Example
.\r-type_server -p 4242 -H 127.0.0.2Previous page: RType Documentation
Next page: How to play
This project was developed and documented by the MarmotteurInc team.