Getting Started
This guide will help you set up your development environment and build the R-Type project.
Prerequisites
Before you begin, ensure you have the following installed:
- CMake (version 3.19 or higher)
- Ninja (build system)
- C++ Compiler with C++20 support (GCC 11+, Clang 14+, or MSVC 2022)
- Git
Optional (for documentation):
- Doxygen (for API documentation)
- Node.js v20+ (for web documentation)
Clone the Repository
git clone --recursive https://github.com/My-Epitech-Organisation/Rtype.git
cd Rtype
Note: The
--recursiveflag is required to fetch the vcpkg submodule.
Setup vcpkg (first time only)
./scripts/setup-vcpkg.sh
This script initializes vcpkg and bootstraps it automatically.
Alternative: If you have your own vcpkg installation, set the VCPKG_ROOT environment variable:
export VCPKG_ROOT=/path/to/your/vcpkg
Build the Project
Configure
# Linux Debug
cmake --preset linux-debug
# Linux Release
cmake --preset linux-release
# Windows Debug (MSVC)
cmake --preset windows-debug
# Windows Release (MSVC)
cmake --preset windows-release
Build
cmake --build build
Run Tests
ctest --test-dir build --output-on-failure
Run the Application
Start the Server
./scripts/run_server.sh
Start the Client
./scripts/run_client.sh
Configuration
Configuration files are located in the config/ directory:
-
config/server/- Server configurationserver.toml- Network settings (port, max players, etc.)gameplay.toml- Game rules and mechanicsconfig.toml- General server configuration
-
config/client/- Client configurationvideo.toml- Graphics settings (resolution, fullscreen, vsync)controls.json- Input mappings (key bindings, gamepad)client.toml- General client configuration
-
config/game/- Game entity configurationsenemies.toml- Enemy types and propertiesplayers.toml- Player ship configurationspowerups.toml- Power-up definitionsprojectiles.toml- Projectile configurationslevels/- Level and wave definitions
Running Tests
cd build
ctest --output-on-failure
Generating Documentation
To generate both Doxygen and Docusaurus documentation:
# Configure CMake with documentation enabled
cmake --preset linux-debug -DBUILD_DOCS=ON
# Generate complete documentation
cmake --build build --target docs
To view the documentation with live reload:
cmake --build build --target docs-serve
This will start a dev server at http://localhost:3000
Or manually with npm:
cd docs/website
npm install
npm start
Available Documentation Targets
docs- Generate complete documentation (Doxygen + Docusaurus)docs-doxygen- Generate API reference onlydocs-serve- Start Docusaurus dev serverdocs-build- Build production documentation
Next Steps
- Read the Architecture Guide to understand the system design
- Browse the API Reference for detailed class documentation
- Check out example implementations in
src/games/rtype/