Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Note: clang-format can reflow and align comments, but it cannot enforce
# documentation *content* (e.g. forbidding @brief). Use
# scripts/check_comment_style.py for that β€” see docs/CodingStyle.md.
# scripts/check_comment_style.py for that β€” see Skills/coding-style.md.

BasedOnStyle: LLVM
Language: Cpp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
mkdir -p Logs
./build/FlingTests/bin/FlingTests.exe

# Doc-comment conventions for first-party sources (see docs/CodingStyle.md / issue #166).
# Doc-comment conventions for first-party sources (see Skills/coding-style.md / issue #166).
# clang-format cannot enforce comment *content*; this script does.
comment-style:
name: Comment style
Expand Down
10 changes: 4 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,19 @@ platform setup (Vulkan SDK, GLFW, etc.).

## Coding style

- Canonical style doc: [`docs/CodingStyle.md`](docs/CodingStyle.md) β€” documentation
- Style doc: [`Skills/coding-style.md`](Skills/coding-style.md) β€” documentation
comment conventions (no `@brief`, no `/*!`), enforced by
`python3 scripts/check_comment_style.py`.
- Layout/formatting is enforced by `.clang-format` at the repo root (run
`clang-format`, not manual formatting judgment).
- Applies to first-party code only (`FlingEngine/`, `Sandbox/`, `FlingTests/`).
**Never edit code under `external/`** β€” it's vendored third-party code.
- AI-assistant-focused summary and common pitfalls: [`Skills/coding-style.md`](Skills/coding-style.md).

## Architecture / module layout

- Current folder layout and the in-progress module split (Core, Graphics, Gameplay,
Resources, Editor) are documented in [`docs/BuildModules.md`](docs/BuildModules.md) β€”
read it before restructuring includes or CMake targets, it records locked decisions.
- Orientation for where things live today: [`Skills/architecture.md`](Skills/architecture.md).
- Orientation for where things live today, and the in-progress module split
(Core, Graphics, Gameplay, Resources, Editor): [`Skills/architecture.md`](Skills/architecture.md) β€”
read it before restructuring includes or CMake targets.
- Adding a new CMake module (folder + `fling_add_module`, with a UI example):
[`Skills/adding-modules.md`](Skills/adding-modules.md).

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Notice the `-DDEFINE_SHIPPING` option is set to `ON`. This sets a definiton that
#endif
```

See [docs/CodingStyle.md](docs/CodingStyle.md) for documentation-comment conventions and
See [Skills/coding-style.md](Skills/coding-style.md) for documentation-comment conventions and
how to run the comment-style check / clang-format.

## AI coding assistants
Expand Down
4 changes: 0 additions & 4 deletions Skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ detail on a given topic. These files are meant to be read on demand, not all at
| [`coding-style.md`](coding-style.md) | Doc-comment conventions, formatting, what not to touch |
| [`architecture.md`](architecture.md) | Current folder/module layout, where new code belongs |
| [`adding-modules.md`](adding-modules.md) | How to add a new engine module (`fling_add_module`, UI example) |

These are supplementary to, not a replacement for, the canonical docs they
reference (`docs/CodingStyle.md`, `docs/BuildModules.md`) β€” when in doubt, the
canonical doc wins.
7 changes: 4 additions & 3 deletions Skills/adding-modules.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Adding an engine module

Canonical design and locked decisions: [`docs/BuildModules.md`](../docs/BuildModules.md).
This file is the how-to. Do not invent a second pattern (extra globs in the root
CMakeLists, a hand-rolled `*_API` header, or edits under `external/`).
This file is the how-to for the in-progress module split described in
[`architecture.md`](architecture.md). Do not invent a second pattern (extra
globs in the root CMakeLists, a hand-rolled `*_API` header, or edits under
`external/`).

`fling_add_module()` lives in [`CMake/FlingModule.cmake`](../CMake/FlingModule.cmake).
Until `FlingEngine/CMakeLists.txt` `add_subdirectory`s each module, the engine is
Expand Down
30 changes: 14 additions & 16 deletions Skills/architecture.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Architecture / where things live

This is orientation for today's layout, not a design doc. For the in-progress
module split (Core/Resources/Gameplay/Graphics/Editor as separate CMake targets)
and its locked decisions, read [`docs/BuildModules.md`](../docs/BuildModules.md)
before touching CMake targets, `FLING_ENGINE_INC()`, or cross-folder includes β€”
several things that look like cleanups are explicitly deferred or ruled out there.
This is orientation for today's layout, not a design doc. The engine is
mid-way through an in-progress module split (Core/Resources/Gameplay/Graphics/Editor
as separate CMake targets) β€” the rules below hold regardless of how far that
split has progressed. Read [`adding-modules.md`](adding-modules.md) before
touching CMake targets, `FLING_ENGINE_INC()`, or cross-folder includes.

## Today

Expand All @@ -16,13 +16,12 @@ several things that look like cleanups are explicitly deferred or ruled out ther
location doesn't currently enforce isolation. `fling_add_module()` lives in
`CMake/FlingModule.cmake` but is not yet used for a real shared module.
- `Sandbox/` β€” the sample game + editor, one executable today (editor support is
toggled by a project-wide `WITH_EDITOR` define, which `docs/BuildModules.md`
plans to remove in favor of two separate executables).
toggled by a project-wide `WITH_EDITOR` define; a planned follow-up splits
this into two separate executables).
- `FlingTests/` β€” Catch2 tests, links the full `FlingEngine` library. See
[`testing.md`](testing.md).
- `external/` β€” vendored third-party dependencies (submodules). Never modified.
- `docs/` β€” human-facing docs: `docs/CodingStyle.md`, `docs/BuildModules.md`, and
the `Fling-Engine-logo/` image used by the root README.
- `docs/` β€” the `Fling-Engine-logo/` image used by the root README.
- `scripts/` β€” repo tooling (`check_comment_style.py`, the one-time
`migrate_doxygen_comments.py` migration).
- `CMake/` β€” CMake helper modules (e.g. `FlingEngineInc.cmake`).
Expand All @@ -32,10 +31,9 @@ several things that look like cleanups are explicitly deferred or ruled out ther
- Gameplay code (`Transform`, `Camera`, `World`, `Game`) must not include Graphics
headers (`MeshRenderer.h`, Vulkan-facing types). Graphics may include Gameplay.
- Editor is a leaf: `Engine` and `Graphics` must not include `BaseEditor` or any
Editor header. If you find yourself adding such an include, that's the bug
`docs/BuildModules.md` calls out explicitly β€” look for the debug-UI hook pattern
it describes instead.
- Don't add a new module folder or CMake target without reading the "Locked
decisions" section of `docs/BuildModules.md` first β€” several plausible-looking
approaches (per-module PCH, git submodules per system) are explicitly rejected there.
The how-to (including a UI module example) is [`adding-modules.md`](adding-modules.md).
Editor header. If you find yourself adding such an include, that's a bug β€”
look for the debug-UI hook pattern instead of a direct include.
- Don't add a new module folder or CMake target on a whim β€” per-module PCH and
git submodules per engine system have already been considered and rejected
for this project. The how-to (including a UI module example) is
[`adding-modules.md`](adding-modules.md).
8 changes: 3 additions & 5 deletions Skills/coding-style.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Coding Style

The canonical reference is [`docs/CodingStyle.md`](../docs/CodingStyle.md) β€” read
that first. This file is a quick-reference summary plus the pitfalls an AI assistant
Conventions for first-party Fling Engine C++, plus the pitfalls an AI assistant
is most likely to hit.

Scope: first-party code only β€” `FlingEngine/`, `Sandbox/`, `FlingTests/`.
Expand Down Expand Up @@ -49,8 +48,7 @@ Trivial members/accessors can use a one-line `/** ... */`.
## Naming / conventions to preserve

- Flat include names (`#include "Logger.h"`, not `#include "Core/Logger.h"`) are
intentional, even across the module split described in
[`docs/BuildModules.md`](../docs/BuildModules.md). Don't "fix" these to
path-qualified includes.
intentional, even across the in-progress module split described in
[`architecture.md`](architecture.md). Don't "fix" these to path-qualified includes.
- `pch.h` is being deleted per the module-split plan β€” don't add new `#include "pch.h"`
to public headers, and don't rely on it as a kitchen-sink include.
Loading
Loading