Skip to main content

Welcome Contributors

Thank you for your interest in contributing to Osiris! This guide will help you get started with contributing to the project.

Getting Started

1

Fork the repository

Fork the Osiris repository on GitHub to your own account
2

Clone your fork

git clone https://github.com/YOUR_USERNAME/Osiris.git
cd Osiris
3

Set up development environment

Follow the Building from Source guide to set up your development environment
4

Create a feature branch

git checkout -b feature/your-feature-name

Code Guidelines

Technical Requirements

All contributions must adhere to Osiris’s technical constraints:

No CRT in Release

Release builds must not use the C++ runtime library. Use the custom CRT implementation in Platform/Windows/CRTWindows.cpp on Windows.

No Heap Allocations

All memory must be allocated statically or from pre-allocated pools. Use the custom memory allocation system in MemoryAllocation/.

No Static Imports (Windows)

Windows release builds must not have static imports. Use dynamic loading or system calls.

No Threads

Do not create new threads. All code must execute on existing game threads.

No Exceptions

Exception handling is disabled in release builds. Use error codes or other error handling mechanisms.

No External Dependencies

Do not introduce third-party libraries or external dependencies.

Code Style

  • C++ Standard: Use C++20 features where appropriate
  • Naming Conventions: Follow the existing code style in the repository
  • File Organization: Place new files in the appropriate directory based on functionality
  • Comments: Add clear comments for complex logic, but avoid obvious comments

Compiler Compatibility

Ensure your code compiles on:
  • Windows: Visual Studio 2022 (MSVC)
  • Linux: GCC 11+ or Clang 18+

Making Changes

Feature Development

1

Understand the architecture

Review the Project Structure to understand where your changes should go
2

Implement your feature

  • Add new features in the Features/ directory
  • Create platform-specific code in Platform/Windows/ or Platform/Linux/ as needed
  • Use existing utilities from Utils/ and Common/
3

Test thoroughly

  • Test on both Debug and Release builds
  • Test on all supported platforms if possible
  • Verify no regressions in existing features
4

Update documentation

Document any new features or significant changes

Bug Fixes

1

Identify the issue

Clearly understand the bug and its root cause
2

Fix the bug

Implement the minimal change necessary to fix the issue
3

Test the fix

Verify the bug is fixed and no new issues are introduced
4

Add regression tests

If applicable, add tests to prevent the bug from recurring

Submitting Changes

1

Commit your changes

git add .
git commit -m "Add feature: brief description"
Write clear, concise commit messages that explain what changed and why.
2

Push to your fork

git push origin feature/your-feature-name
3

Create a Pull Request

  • Go to the original Osiris repository on GitHub
  • Click “New Pull Request”
  • Select your fork and branch
  • Fill in the PR template with:
    • Clear description of changes
    • Motivation for the changes
    • Testing performed
    • Screenshots/videos if applicable
4

Respond to feedback

Address any review comments and update your PR as needed

Pull Request Guidelines

Keep PRs focused on a single feature or bug fix
Ensure all builds pass (Windows and Linux)
Test both Debug and Release configurations
Follow the existing code style
Update documentation if needed
Respond promptly to review feedback

Development Tips

Memory Allocation

// ❌ Don't use heap allocation
auto* data = new MyData();
auto vector = std::vector<int>();

// ✅ Use static allocation
static MyData data;
StaticVector<int, 100> vector;

Platform-Specific Code

#if defined(_WIN32)
    // Windows-specific code
    #include "Platform/Windows/WindowsHeader.h"
#elif defined(__linux__)
    // Linux-specific code
    #include "Platform/Linux/LinuxHeader.h"
#endif

Error Handling

// ❌ Don't use exceptions
try {
    riskyOperation();
} catch (...) {
    // Handle error
}

// ✅ Use return codes or optional types
if (!riskyOperation())
    return; // or handle error

License

By contributing to Osiris, you agree that your contributions will be licensed under the MIT License.
Copyright (c) 2018-2025 Daniel KrupińskiThis project is licensed under the MIT License.

Getting Help

If you need help or have questions:
  1. Check existing issues and pull requests
  2. Review the technical features documentation
  3. Create a new issue on GitHub with:
    • Clear description of your question
    • What you’ve already tried
    • Relevant code snippets

Community

  • Be respectful and constructive in all interactions
  • Help other contributors when possible
  • Follow GitHub’s community guidelines
We appreciate all contributions, whether they’re bug fixes, new features, documentation improvements, or helping other users!

Build docs developers (and LLMs) love