From c89142264a401530165847a37ab440817cafcf57 Mon Sep 17 00:00:00 2001 From: Steven Brown Date: Thu, 15 Oct 2026 16:31:54 +1300 Subject: [PATCH] Introduces the framework, why it exists, the projects built on it, what each library is, a first window, the licence obligations and the contribution rules, linking the merged CONTRIBUTING, SECURITY, CODE_OF_CONDUCT and CONTRIBUTORS files. Logo swaps with the viewer's light or dark theme through a picture element. --- .github/ISSUE_TEMPLATE/bug_report.yml | 36 +++++ .github/ISSUE_TEMPLATE/config.yml | 11 ++ .github/pull_request_template.md | 12 ++ .github/workflows/first-interaction.yml | 35 +++++ CODE_OF_CONDUCT.md | 20 +++ CONTRIBUTING.md | 72 ++++++++++ CONTRIBUTORS.md | 25 ++++ README.md | 177 ++++++++++++++++++++++++ SECURITY.md | 26 ++++ 9 files changed, 414 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/first-interaction.yml create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 CONTRIBUTORS.md create mode 100644 README.md create mode 100644 SECURITY.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..3a8df01 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,36 @@ +name: Bug report +description: Something in BRUTAL doesn't work as documented. +labels: [bug, needs-triage] +body: + - type: markdown + attributes: + value: "Questions belong on the [forums](https://forums.ahwoo.dev/forums/brutal/). Security issues: see SECURITY.md." + - type: input + id: packages + attributes: + label: Packages and versions + placeholder: Ahwoo.BRUTAL.Vulkan 2026.10.1, Ahwoo.BRUTAL.Memory 2026.10.1 + validations: + required: true + - type: input + id: env + attributes: + label: Environment + placeholder: .NET 10.0.x, Windows 11, RTX 4070 / driver 581.x + validations: + required: true + - type: textarea + id: repro + attributes: + label: Minimal repro + description: The smallest code that shows the problem. + render: csharp + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected vs actual + description: Include the full exception and stack trace if there is one. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ebb876d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Questions and help + url: https://forums.ahwoo.dev/forums/brutal/guides-and-help/ + about: "How do I…?" questions go here, not in issues. + - name: Discussion and ideas + url: https://forums.ahwoo.dev/forums/brutal/general/ + about: General discussion about building on BRUTAL. + - name: Report a security vulnerability + url: https://github.com/ahwootech/BRUTAL/security/advisories/new + about: Please report security issues privately. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..9565a13 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ +## What and why + + + +## Checklist + +- [ ] Linked to an agreed issue (or it's a trivial doc/typo fix) +- [ ] Focused on one change; no unrelated refactors +- [ ] Built and tested on: +- [ ] No new dependencies (or they were agreed in the issue) +- [ ] Every commit is signed off (`git commit -s`, DCO), and I agree to section 5.0 (Contribution Grant) of the BRUTAL License +- [ ] AI assistance: diff --git a/.github/workflows/first-interaction.yml b/.github/workflows/first-interaction.yml new file mode 100644 index 0000000..83ff448 --- /dev/null +++ b/.github/workflows/first-interaction.yml @@ -0,0 +1,35 @@ +name: Greet first-time contributors + +on: + issues: + types: [opened] + pull_request_target: + types: [opened] + +permissions: + issues: write + pull-requests: write + +jobs: + greeting: + runs-on: ubuntu-latest + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: | + Thanks for opening your first BRUTAL issue! šŸ‘‹ + + We're a small team, so please be patient with us. It may be a while before someone replies. To help us: + - **Questions and "how do I…?"** belong on the [BRUTAL forums](https://forums.ahwoo.dev/forums/brutal/). We may close and redirect them. + - **Bugs:** please make sure you've included package versions, OS/GPU, and a minimal repro. + - **Security issues:** please don't post them here. See [SECURITY.md](../blob/main/SECURITY.md). + pr-message: | + Thanks for your first pull request to BRUTAL! šŸ‘‹ + + Before we can review it: + - It should be linked to an issue where a maintainer has agreed the approach (tiny doc and typo fixes excepted). + - Every commit needs a DCO sign-off (`git commit -s`). By contributing you agree to section 5.0 of the BRUTAL License. + - If a substantial part is AI-generated, please say so. You need to understand and have tested every line. + + BRUTAL's scope is deliberately small, so we may decline changes that add engine-style features. Please read [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md). We're a small team and reviews may take a while, so thanks for your patience. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..50f6de8 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,20 @@ +# Code of Conduct + +BRUTAL follows the [Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/), together with the [Ahwoo Community Guidelines](https://ahwoo.com/help-centre/community-guidelines). Where they overlap, the stricter rule applies. + +## In short + +- Be respectful. Criticise code and decisions, not people. +- **Don't direct abuse at maintainers or staff.** Disagreement is fine, but harassment isn't, and it will get you removed even if your technical point is correct. +- No harassment, hate speech, sexual content, doxxing, threats, scams, malware or spam. +- Stay on topic. GitHub issues and PRs are for BRUTAL development. Use the [forums](https://forums.ahwoo.dev/forums/brutal/) for everything else. + +## Scope + +This applies to the BRUTAL GitHub repositories, the BRUTAL forums, and BRUTAL channels on Ahwoo's Discord, and to anyone representing the project elsewhere. + +## Enforcement + +Report problems to **conduct@ahwoo.com** (or privately to a moderator). Reports are handled confidentially. + +Maintainers may edit or remove comments, lock threads, close issues and PRs, and temporarily or permanently ban anyone whose behaviour breaks this code. We follow the Contributor Covenant's enforcement ladder: correction, warning, temporary ban, permanent ban. Serious breaches (threats, doxxing, sexual content involving minors, malware) skip straight to a permanent ban and may be reported to the platform and to authorities. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5629fdd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,72 @@ +# Contributing to BRUTAL + +Thanks for your interest in BRUTAL. You can submit issues and pull requests. We're a small team, and maintaining a public framework is a lot of work, so please be patient with us. We'll see how things go at first and adjust our process as we learn. Feedback on that process is welcome on the [forums](https://forums.ahwoo.dev/forums/brutal/general/). + +## The short version + +- **Questions and "how do I…?"** go to the [BRUTAL forums](https://forums.ahwoo.dev/forums/brutal/guides-and-help/), not GitHub issues. +- **Bugs:** open an issue using the bug template, with a minimal repro. +- **Anything bigger than a small fix:** open an issue first and wait for a maintainer to agree the approach before you write the code. +- **Security problems:** report them privately. See [SECURITY.md](SECURITY.md). + +## BRUTAL's scope + +BRUTAL is a framework, not a game engine. At its core is an interop layer that gives C# access to native APIs and libraries, with supporting libraries for maths, memory, strings, job scheduling, logging, localisation and Vulkan bindings. It is built for "hard to make games", and its job is to do a few low-level things extremely well. + +Think of the relationship between the Linux kernel and a distribution like Ubuntu. BRUTAL is the foundation, and developers build their own systems on top of it. **We're aggressive about keeping that scope.** Pull requests that drift away from that purpose will be declined, for example ones that: + +- add engine-style features (scene graphs, editors, high-level renderers, gameplay systems) +- add abstractions over APIs that BRUTAL deliberately exposes directly +- add dependencies without prior discussion +- change public APIs without an agreed issue + +That isn't because we don't appreciate contributions. Adding everything is how the industry ended up with the kinds of engines BRUTAL exists to avoid. If you build something on top of BRUTAL, please share it in the [Tools and Libraries](https://forums.ahwoo.dev/forums/brutal/tools-and-libraries/) forum. + +## Reporting bugs + +Please include: + +- BRUTAL package names and versions +- .NET version, OS and GPU/driver (for graphics issues) +- the smallest code sample that reproduces the problem +- what you expected and what happened instead (full exception and stack trace) + +## Pull requests + +1. Make sure an issue exists and a maintainer has agreed the approach (typo and tiny doc fixes excepted). +2. Keep the PR focused on one change. +3. Follow the existing code style. Avoid allocations in hot paths, and don't add abstraction for its own sake. +4. Build and test on at least one target (Windows, Linux or macOS), and say which. +5. Sign off every commit (see below). + +### Agentic and AI-assisted contributions + +Agentic tools can make you very productive. They also make it easy to submit large amounts of code without understanding it, testing it, or considering how it fits into the project. You may use them, but you are responsible for every line you submit: you must understand it, have tested it, and be able to explain it in review. Say in the PR description if a substantial part was AI-generated. Large, untested or unexplained AI-generated PRs will be closed without review. + +## Licensing of contributions + +BRUTAL is distributed under the [BRUTAL License](LICENSE). **Section 5.0 of the licence covers contributions.** By submitting a contribution you grant Ahwoo Limited and all recipients of BRUTAL a perpetual, worldwide, non-exclusive, royalty-free, irrevocable licence to include it in BRUTAL and use it under the licence's terms. You also confirm that you're legally entitled to grant that licence and that your contribution doesn't infringe anyone else's rights. Please read section 5.0 before opening a PR. + +Third-party components that BRUTAL redistributes keep their own licences, listed in the `LICENSES/` directory (section 4.0). Don't add third-party code without discussing it in an issue first. + +### Sign-off (Developer Certificate of Origin) + +Each commit must be signed off to confirm you agree to the [Developer Certificate of Origin](https://developercertificate.org/). Use `git commit -s`, which adds: + +``` +Signed-off-by: Your Name +``` + +## Using BRUTAL in your own game + +You don't need to contribute to use BRUTAL. It's free, including for commercial games, with no royalties. The licence asks three things of any game or product built with it: + +- **2.1:** the copyright notice in your Credits screen (or equivalent) +- **2.2:** the BRUTAL logo from [ahwoo.com/brutal-branding](https://ahwoo.com/brutal-branding) shown before gameplay starts +- **2.3:** `NOTICE.txt` shipped alongside your game + +For a logo waiver (for example non-profit projects, or where the logo would get in the way of the product's purpose) or a separate commercial licence, contact Ahwoo at **[CONTACT ADDRESS]**. + +## Code of Conduct + +Everyone taking part in BRUTAL spaces is expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md). diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 0000000..af5cfe1 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,25 @@ +# Founding Contributors to BRUTAL + +BRUTAL is Copyright (c) 2024 Ahwoo Limited. Being listed here does not confer any copyright or licence rights. + +- Aaron Koolen-Bourke +- Benoit Fouletier +- Bobby Lever +- Brogan King +- Christopher Howlett +- Craig Warne +- Daniel Southon +- Dean Hall +- Eric Chiu +- Felipe Falanghe +- Ghassen Lahmar +- Hadley Patchett +- Hanan Finnerty +- Jane Kim +- Josh O'Hagan +- Max Kooij +- Maxwell Johnson +- Rian Drake +- Simon Brown + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..72bc63a --- /dev/null +++ b/README.md @@ -0,0 +1,177 @@ +

+ + + BRUTAL + +

+ +# BRUTAL Framework + +**A free, open source C# framework for making games, or your own game engine.** + +BRUTAL is a framework. You can make a game directly with it, or use it as the foundation for a separate engine. We made Kitten Space Agency directly on BRUTAL. Ludeon built their Waylith engine on it to move RimWorld off Unity. + +At its core is a custom interop layer giving C# direct access to native APIs and libraries. Around that we've built mathematics, memory management, strings, collections, job scheduling, logging, localization, and bindings for Vulkan, GLFW, Dear ImGui, FMOD, RakNet, Jolt and Box2D. BRUTAL doesn't make the architectural decisions for you. You write your own stack. You can use whatever NuGet packages you want, including third-party ones. + +It's called BRUTAL for a reason. In some ways it's much harder to use than Unity, Unreal or Godot. In other ways, particularly if you're doing something unusual, it's considerably easier. You actually have to know what you want to do first. + +## Why + +You are only as independent as your tools are. + +Developers have surrendered an extraordinary amount of control over their work to companies whose interests are not necessarily aligned with their own. We're not suggesting everyone should make their own game engine. We're suggesting every developer should have the option to, without having to spend four years building the foundations first. + +What that means in practice: + +- **Free, including for commercial games.** No royalties. We don't want a percentage of your game's revenue. We ask for credit. +- **Open source.** The source is here under an MIT-based licence. If one day we stop being accountable to developers, you can fork it and go your own way. +- **Deliberately small.** We do a few low-level things well: interop, memory, concurrency, maths, strings, and bindings to native libraries, on the latest C# and Vulkan. We avoid allocations and unnecessary overhead and use unmanaged memory and unsafe code where it makes sense. +- **A foundation, like a kernel.** Think of the Linux kernel and something like Ubuntu. It's not an exact comparison, but it gets the idea across. We provide the foundation and you build your own systems on top. + +### What BRUTAL is not + +BRUTAL is not trying to be a general-purpose engine. There is no editor, no scene graph and no renderer, and we're not adding them. We push back on efforts to add more, because adding everything is how the industry ended up with the kind of engines we don't want to use. Pull requests that drift away from a clear purpose will be rejected. + +## Projects using BRUTAL + +| Product | Studio | Engine (if any) | +| --- | --- | --- | +| [RimWorld](https://store.steampowered.com/app/294100/RimWorld/) | Ludeon Studios | Waylith | +| [Kitten Space Agency](https://ahwoo.com/app/100000/kitten-space-agency/) | RocketWerkz | Direct on BRUTAL | +| Torpedia | RocketWerkz | Direct on BRUTAL | +| Art of the Rail | RocketWerkz | Direct on BRUTAL | +| Afterskies | Floating Origin Interactive | Direct on BRUTAL | + +Ludeon report 2 to 4 times the performance of the Unity build in their own tests, with the vast majority of existing mods still compatible. See their [Steam announcement](https://steamcommunity.com/games/294100/announcements/detail/672882362547178634). + +Kitten Space Agency is a free pre-alpha spaceflight simulation. It runs a solar system at real scale, and is the first major project built directly on BRUTAL. [Download it on Ahwoo](https://ahwoo.com/app/100000/kitten-space-agency/) and see the technology yourself. + +## What is in the box + +Each top-level folder in this repository is one library, published as a NuGet package. Reference only the ones you need. + +| Library | What it is | +| --- | --- | +| `brutal.core` | Base types, attributes, platform detection, pointer helpers, Roslyn analyzers | +| `brutal.interop` | The custom interop layer that gives C# direct access to native APIs | +| `brutal.memory` | Unmanaged memory management and allocators | +| `brutal.collections` | Collections that don't allocate | +| `brutal.strings` | String building and handling without allocation | +| `brutal.maths`, `brutal.numerics` | Vector, matrix and numeric types | +| `brutal.concurrency` | Job system and threading | +| `brutal.logging` | Logging | +| `brutal.localization` | Localization | +| `brutal.vulkan` | Vulkan bindings, abstractions and the Vulkan Memory Allocator | +| `brutal.opengl` | OpenGL bindings | +| `brutal.glfw`, `brutal.sdl` | Windowing and input | +| `brutal.imgui` | Dear ImGui and ImPlot bindings, docking branch | +| `brutal.render` | Mesh utilities | +| `brutal.texture`, `brutal.ktx`, `brutal.gli`, `brutal.stb` | Texture loading, KTX and compressed formats, image decoding | +| `brutal.gltf`, `brutal.meshoptimizer` | glTF loading and mesh optimisation | +| `brutal.freetype` | Font rasterisation | +| `brutal.fmod`, `brutal.openal` | Audio | +| `brutal.raknet` | Networking | +| `brutal.jolt`, `brutal.box2d` | 3D and 2D physics | +| `brutal.monitor`, `brutal.renderdoc` | Runtime monitoring and RenderDoc capture integration | +| `brutal.nativefiledialog`, `brutal.notcurses`, `brutal.zlib` | Native file dialogs, terminal UI, compression | + +Third-party notices for each binding live in that library's `LICENSES` folder. + +## Getting started + +### Prerequisites + +- [.NET 10 SDK](https://dotnet.microsoft.com/download) +- A Vulkan 1.3 capable GPU with current drivers (if you render) +- The [Vulkan SDK](https://vulkan.lunarg.com/) if you want validation layers while developing +- Windows or Linux + +### Your first window + +Create a project and add Core and Glfw: + +```sh +dotnet new console -n HelloBrutal +cd HelloBrutal +dotnet add package Ahwoo.Brutal.Core +dotnet add package Ahwoo.Brutal.Glfw +``` + +Replace `Program.cs`: + +```csharp +using Brutal.GlfwApi; +using Brutal.Numerics; + +if (!Glfw.Init()) + throw new Exception("Failed to initialize GLFW"); + +Glfw.WindowHint(GlfwWindowHint.ClientApi, 0); +var window = Glfw.CreateWindow(new GlfwWindow.CreateInfo +{ + Title = "Hello BRUTAL", + Size = new int2(1280, 720), +}); + +while (!window.ShouldClose) + Glfw.PollEvents(); + +Glfw.Terminate(); +``` + +```sh +dotnet run +``` + +That opens a window with no graphics API. What you add next is up to you: + +- **Rendering:** `Ahwoo.Brutal.Vulkan.Abstractions` and `Ahwoo.Brutal.Vulkan.Vma` for a Vulkan renderer, `Ahwoo.Brutal.ShaderC` to compile shaders at runtime. +- **Debug UI:** `Ahwoo.Brutal.ImGui` and `Ahwoo.Brutal.ImPlot`. +- **Parallelism:** `Ahwoo.Brutal.Concurrency` for the job system. +- **Audio and networking:** `Ahwoo.Brutal.Fmod`, `Ahwoo.Brutal.RakNet`. + +Questions and "how do I" threads go on the [Guides and Help forum](https://forums.ahwoo.com/forums/brutal/guides-and-help/). + +### Building from source + +This is the source for every published package. Project files, a solution and build scripts are coming. Until then use the NuGet packages, and use this repository to read and fork the code. + +```sh +git clone https://github.com/ahwootech/BRUTAL.git +``` + +## Licence + +BRUTAL is free to use, modify and distribute, including in commercial games. There are no royalties and we don't want a percentage of your game's revenue. + +The licence is based on MIT with an added attribution requirement. A game or product built with BRUTAL: + +1. includes the BRUTAL copyright notice in its credits screen, or equivalent (section 2.1) +2. shows the BRUTAL logo before gameplay starts (section 2.2) +3. ships `NOTICE.txt` alongside the product (section 2.3) + +If you don't want to do that, we can arrange a separate commercial licence. We also waive the logo requirement for non-profit projects and where displaying it would be detrimental to the application's purpose. + +BRUTAL is open source. There are already OSI-approved licences that allow graphical attribution. Ours is not yet OSI approved because we have not submitted it yet. We intend to, and to develop the licence with community feedback. See [LICENSE](LICENSE) for the full text. + +## Contributing + +You can submit PRs and issues. We are a small team and maintaining a public framework is going to be a lot of work, so please be patient with us. We'll see what happens, assess the problems, and change our workflows as necessary. What won't change is BRUTAL's scope. + +Before opening a PR, read [CONTRIBUTING.md](CONTRIBUTING.md). It covers scope, what we expect from AI-assisted contributions, the contribution grant in section 5.0 of the licence, and the sign-off every commit needs. Small changes you understand and have tested, with a clear purpose, are the ones that will get merged. + +- Security issues: report them privately, see [SECURITY.md](SECURITY.md). Don't open a public issue. +- Conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). + +## Community + +- Source: https://github.com/ahwootech/BRUTAL +- NuGet packages: https://www.nuget.org/profiles/Ahwoo +- Forums: https://forums.ahwoo.com/forums/brutal/ +- Discord: https://discord.gg/MEuNTYbAh8 + +## Credits + +BRUTAL was made by the RocketWerkz Enterprise team and others, named in [CONTRIBUTORS.md](CONTRIBUTORS.md). When we talk about wanting credit for BRUTAL, these are the people we are talking about. + +BRUTAL is Copyright (c) 2024 Ahwoo Limited. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..12c1578 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,26 @@ +# Security Policy + +## Reporting a vulnerability + +**Please do not report security issues in public issues, PRs, forums or Discord.** + +Report privately via either: + +- GitHub: **Security → Report a vulnerability** on this repository (private advisory), or +- email: **security@ahwoo.com** + +Please include the affected packages and versions, a description of the issue and its impact, and steps or code to reproduce it. + +## What to expect + +- We'll acknowledge your report within **5 working days** (NZ time). +- We'll keep you updated while we investigate, and agree a disclosure timeline with you. +- We're happy to credit you in the advisory unless you'd prefer not to be named. + +## Supported versions + +Security fixes are made to the **latest released version** of each BRUTAL package on NuGet. Please update before reporting if you can. + +## Scope + +In scope: BRUTAL source and packages in this repository. Out of scope: issues in third-party libraries we bundle (report those upstream; see `LICENSES/`), and in games built with BRUTAL (contact that game's developer).