Skip to content

remythai/R-TYPE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ธ R-Type โ€” Online Multiplayer Game

Documentation

Project Overview

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.


๐Ÿš€ Quick Start

Prerequisites

  • CMake โ‰ฅ 3.16
  • C++17 compiler (GCC, Clang, or MSVC)
  • Asio (standalone or Boost.Asio)
  • SFML 3.0.2 (for client rendering)

Supported Platforms

  • Linux
  • Windows

Build & Run

1. Clone the repository

git clone https://github.com/EpitechPGE3-2025/G-CPP-500-BDX-5-1-rtype-7.git
cd G-CPP-500-BDX-5-1-rtype-7

2. Build the project

mkdir build && cd build
cmake ..
cmake --build .

Executables will be generated at the project root:

  • r-type_server โ€” Game server
  • r-type_client โ€” Game client

3. Run the server

./r-type_server -h 0.0.0.0 -p 8080

4. Run the client(s)

./r-type_client -h 127.0.0.1 -p 8080

Multiple clients can connect to the same server for multiplayer gameplay.


๐Ÿ“ Project Structure

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

๐ŸŽฎ Key Features

Client Features

  • 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

Server Features

  • 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

Technical Architecture

  • 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

๐Ÿ”Œ Network Protocol

The game uses UDP with a compact binary packet structure:

[Type:1 byte][PacketID:2 bytes][Timestamp:4 bytes][Payload:variable]

Example Packets

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.


๐Ÿ“š Documentation


๐Ÿงช Testing

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
ctest

Tests cover:

  • Packet serialization/deserialization
  • ECS component behavior
  • Client/server interaction logic

๐Ÿ‘ฅ Development Team

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

๐Ÿ“– Additional Resources


โš–๏ธ License

This project was developed as part of Epitech's educational curriculum.
Use is restricted to learning and technical demonstration purposes.


๐Ÿ“ž Contact

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages