Thank you for your interest in contributing to the R-Type Clone project! This guide will help you get started.
- Code of Conduct
- Getting Started
- Development Workflow
- Coding Standards
- Commit Guidelines
- Pull Request Process
- Project Architecture
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Keep discussions on-topic
Click the Fork button on GitHub to create your own copy.
git clone --recursive https://github.com/YOUR_USERNAME/R-type-Clone.git
cd R-type-Clone# Bootstrap vcpkg
./vcpkg/bootstrap-vcpkg.sh # Linux
# or
.\vcpkg\bootstrap-vcpkg.bat # Windows
# Build the project
python3 build.py
# Verify the build
cd build
./r-type_client localgit remote add upstream https://github.com/thinkboosted/R-type-Clone.git| Prefix | Purpose | Example |
|---|---|---|
feature/ |
New features | feature/charge-shot |
fix/ |
Bug fixes | fix/collision-detection |
docs/ |
Documentation | docs/api-reference |
refactor/ |
Code refactoring | refactor/module-loader |
test/ |
Test additions | test/network-unit-tests |
# Sync with upstream
git fetch upstream
git checkout main
git merge upstream/main
# Create your branch
git checkout -b feature/your-feature-namegit fetch upstream
git rebase upstream/main- Use C++17 features
- Use smart pointers (
std::unique_ptr,std::shared_ptr) - Prefer RAII for resource management
- Use
nullptrinstead ofNULL
// Classes: PascalCase
class ModulesManager {};
// Functions/Methods: camelCase
void processMessages();
// Variables: camelCase
int playerScore;
// Constants: UPPER_SNAKE_CASE
const int MAX_PLAYERS = 4;
// Private members: prefix with underscore
class Example {
private:
int _privateVar;
};
// Namespaces: camelCase
namespace rtypeEngine {}// Header files (.hpp)
#pragma once
#include <system_headers>
#include "project_headers.hpp"
namespace rtypeEngine {
class MyClass {
public:
// Public methods
protected:
// Protected methods
private:
// Private members
};
} // namespace rtypeEngine/**
* @brief Brief description of the function.
*
* Detailed description if needed.
*
* @param param1 Description of parameter
* @return Description of return value
* @throws ExceptionType Description of exception
*/
int myFunction(int param1);-- Modules: PascalCase
local PlayerSystem = {}
-- Functions: camelCase
function PlayerSystem.updatePosition(entity) end
-- Variables: camelCase
local playerHealth = 100
-- Constants: UPPER_SNAKE_CASE
local MAX_ENEMIES = 50-- Component factory functions: PascalCase
function Transform(x, y, z, rx, ry, rz, sx, sy, sz)
return {
x = x or 0,
y = y or 0,
z = z or 0,
-- ...
}
end<type>(<scope>): <subject>
<body>
<footer>
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation changes |
style |
Code style (formatting, etc.) |
refactor |
Code refactoring |
test |
Adding/modifying tests |
chore |
Build process, dependencies |
# Feature
git commit -m "feat(gameplay): add charge shot mechanic"
# Bug fix
git commit -m "fix(collision): resolve bullet-enemy detection issue"
# Documentation
git commit -m "docs(readme): update installation instructions"
# Refactor
git commit -m "refactor(renderer): optimize entity batch rendering"-
Test your changes
cd build ./r-type_client local # Test in solo mode
-
Check for warnings
cmake --build . 2>&1 | grep -i warning
-
Update documentation if needed
-
Push your branch to your fork:
git push origin feature/your-feature-name
-
Go to GitHub and create a Pull Request
-
Fill in the PR template:
- Title: Clear description of the change
- Description: What and why
- Testing: How you tested
- Screenshots: If UI changes
- Code follows style guidelines
- Changes are tested
- Documentation is updated
- No merge conflicts
- CI/CD passes
The engine uses a dynamic module architecture:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Application β
β βββββββββββββββββββββββββββββββββββββββββββββββ β
β β ModulesManager β β
β β βββββββββββ βββββββββββ βββββββββββ β β
β β β Window β βRenderer β β ECS β ... β β
β β β Manager β β β β Manager β β β
β β ββββββ¬βββββ ββββββ¬βββββ ββββββ¬βββββ β β
β β β β β β β
β β βββββββββββββ΄ββββββββββββ β β
β β β β β
β β βββββββββ΄ββββββββ β β
β β β ZeroMQ Bus β β β
β β β (Pub/Sub) β β β
β β βββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Directory | Purpose |
|---|---|
src/engine/modules/ |
Module implementations |
src/engine/app/ |
Application base classes |
src/game/ |
R-Type game implementation |
assets/scripts/ |
Lua game logic |
- Create interface in
src/engine/modules/YourModule/IYourModule.hpp - Implement in
src/engine/modules/YourModule/Impl/ - Add CMakeLists.txt for the module
- Register in ModulesManager
See Architecture Documentation for details.
Include:
- Description: What happened?
- Expected: What should happen?
- Steps to Reproduce: How to trigger the bug
- Environment: OS, compiler, etc.
- Logs: Any error messages
Include:
- Description: What you want
- Use Case: Why it's useful
- Proposed Solution: How it could work
- GitHub Issues: For bugs and features
- GitHub Discussions: For questions
- Code Review: Request review from maintainers
Every contribution makes this project better. We appreciate your time and effort!