R-Type is a multiplayer shoot 'em up game developed as part of the Advanced C++ / Network Programming module at Epitech Technology.
This project recreates the classic R-Type experience with modern multiplayer capabilities, implementing:
- Client/server architecture in C++17
- UDP network communication via Asio for low-latency real-time gameplay
- Modular game engine based on ECS (Entity Component System)
- Support for up to 4 simultaneous players
Players can connect to a server, choose a game, control their character, shoot enemies or avoid obstacles, and face waves of opponents or obstacles in real-time cooperative gameplay.
- CMake โฅ 3.16
- C++17 compiler (GCC, Clang, or MSVC)
- Asio (standalone or Boost.Asio)
- SFML 3.0.2 (for client rendering)
- Linux
- Windows
git clone https://github.com/EpitechPGE3-2025/G-CPP-500-BDX-5-1-rtype-7.git
cd G-CPP-500-BDX-5-1-rtype-7mkdir build && cd build
cmake ..
cmake --build .Executables will be generated at the project root:
r-type_serverโ Game serverr-type_clientโ Game client
./r-type_server -h 0.0.0.0 -p 8080./r-type_client -h 127.0.0.1 -p 8080Multiple clients can connect to the same server for multiplayer gameplay.
R-Type/
โโโ .github/ # CI/CD workflows
โโโ assets/ # Game sprites and resources
โโโ client/ # Client application
โ โโโ src/
โ โโโ CMakeLists.txt
โโโ gameEngine/ # ECS game engine
โ โโโ src/
โ โโโ include/
โ โโโ docs/
โโโ server/ # Server application
โ โโโ src/
โ โโโ docs/
โ โโโ CMakeLists.txt
โโโ CMakeLists.txt # Root build configuration
โโโ README.md
- Real-time server connection via UDP
- Keyboard input handling (movement, shooting)
- Entity rendering (player ships, enemies, projectiles, power-ups)
- Network synchronization with server snapshots
- Low-latency gameplay experience
- Asynchronous UDP networking with Asio
- Dynamic player ID assignment
- Player slot management (max 4 players)
- Game event broadcasting to all connected clients
- Entity management: spawn, movement, collision, destruction
- Timeout-based disconnection detection
- ECS (Entity Component System) for modular and scalable game logic
- UDP protocol for minimal latency (see comparative study)
- Binary packet serialization for efficient network transmission
- Timestamp synchronization for consistent game state
The game uses UDP with a compact binary packet structure:
[Type:1 byte][PacketID:2 bytes][Timestamp:4 bytes][Payload:variable]
Client โ Server:
| Type | Name | Description |
|---|---|---|
0x01 |
INPUT | Player movement and shooting input |
0x02 |
JOIN | Connection request with username |
0x03 |
PING | Latency measurement |
0x04 |
DISCONNECT | Player leaving notification |
Server โ Client:
| Type | Name | Description |
|---|---|---|
0x08 |
PLAYER_ID_ASSIGNMENT | Unique player ID assignment |
0x09 |
PLAYER_LIST | List of connected players |
0x10 |
SNAPSHOT | Full game state synchronization |
0x11 |
ENTITY_EVENT | Entity spawn/destroy events |
0x12 |
PLAYER_EVENT | Player-specific events (death, score) |
For complete protocol specification, see Network Protocol Documentation.
- API Documentation โ Doxygen-generated API reference
- Game Engine Guide โ How to implement game logic with our ECS
- Comparative Studies:
Unit tests can be enabled during build:
cmake -DENABLE_TESTS=ON ..
cmake --build .- **[Game Engine Guide](https://remythai.github.io/R-TYPE/gameEngine)** โ How to implement game logic with our ECS
ctestTests cover:
- Packet serialization/deserialization
- ECS component behavior
- Client/server interaction logic
| Name | Role |
|---|---|
| Antton Ducos | ECS Developer / Backend |
| Louka Ortega-cand | ECS Developer / Game Logic |
| Rรฉmy Thai | Client Developer / Game Interface |
| Simon Maigrot | Network Developer / UDP Server |
- Asio Documentation: https://think-async.com
- ECS Pattern: https://skypjack.github.io/entt/
- UDP Game Networking: Valve Developer Wiki
- SFML Documentation: https://www.sfml-dev.org
This project was developed as part of Epitech's educational curriculum.
Use is restricted to learning and technical demonstration purposes.
For questions, suggestions, or contributions, please open an issue on the GitHub repository.
Repository: https://github.com/EpitechPGE3-2025/G-CPP-500-BDX-5-1-rtype-7