Skip to content
This repository was archived by the owner on Jan 31, 2026. It is now read-only.

Latest commit

 

History

History
90 lines (77 loc) · 3.36 KB

File metadata and controls

90 lines (77 loc) · 3.36 KB

Contributing to R-Type

This guide ensures contributions are consistent, readable, and maintainable.


Contribution workflow

We strictly use GitHub Issues and Pull Requests (PRs). No direct commits to main are allowed.

Create / Find an Issue

Before contributing, make sure there is an open issue for your task. If not, create one using the provided templates:

  • Bug Report
  • Feature Request

Branching & PR Naming

Each contribution must be developed in a dedicated branch. Branches and Pull Requests must follow this naming convention:

<Type>/<Scope>/<Sub-scope>
  • TypeFeature | Fix | Refactor | Docs | Test | CI
  • ScopeClient | Server
  • Sub-scopeEngine | ECS | Game | etc.

This ensures consistency across branches and PRs, making it easy to identify the purpose of each contribution at a glance.

Commit Norms

Commit Type Description
build Changes that affect the build system or external dependencies (npm, make, etc.)
ci Changes related to integration files and scripts or configuration (Travis, Ansible, BrowserStack, etc.)
feat Addition of a new feature
fix Bug fix
perf Performance improvements
refactor Modification that neither adds a new feature nor improves performance
style Change that does not affect functionality or semantics (indentation, formatting, adding space, renaming a variable, etc.)
docs Writing or updating documentation
test Addition or modification of tests

Code Style

C++

  • Use clang-format with the provided configuration
  • Follow RAII principles
  • Use std::unique_ptr/std::shared_ptr instead of raw pointers
  • Header files: .hpp - Implementation : .cpp
  • Namespace prefixes:
    • eng:: → Engine
    • ecs:: → ECS
    • cli:: → Client
    • gme:: → Game logic
    • utl:: → Utils library

Naming Convention

  • Classes / Structs / Enums: PascalCase
class PlayerEntity { ... };
struct TransformComponent { ... };
  • Methods / Variables / Functions: camelCase
void updatePosition();
int playerHealth;
  • Private members:
unsigned int m_privateMember
  • Constants / Macros: UPPER_CASE_SNAKE_CASE
const int MAX_PLAYERS = 4;
  • Namespaces: lowercase
namespace ecs { ... }
  • Types / struct member: snake_case
using entity_id = unsigned int;

struct MyStruct {
   std::string my_member;
}

Yaml

  • Extention : .yml