Initial commit: Transcience MVP

Top-down twin-stick bullet-hell, Godot 4.7, server-authoritative dedicated
server with client-side prediction. Clients send input only; the server
resolves every hit for both players and enemies (no PvP).

- SimWorld: whole simulation as plain RefCounted objects (no nodes, no
  physics server), ~0.24ms/tick at peak load -- runs headless for free and
  drives 78 tests in under a second
- BulletPool: struct-of-arrays bullet storage, replicated as spawn/despawn
  events rather than per-tick state
- Emitter framework (Ring/AimedSpread/WallGap/ArcSweep) shared by trash
  enemies and bosses -- a new boss is data in src/content/content.gd, no
  simulation changes
- The Warden of the Fold: stationary 4-phase boss built entirely on that
  format
- Lobby hub with a portal into on-demand dungeon instances; one process
  hosts the hub plus every concurrent dungeon
- Emergency escape: 3s server-owned channel, cancelled by damage
- tools/check.sh, test.sh (GUT), smoke.sh (real server + bot clients over
  ENet), bench.gd; git hooks wired to the same scripts
- docs/ARCHITECTURE.md, NETCODE.md, WORKFLOW.md, ROADMAP.md
This commit is contained in:
2026-09-03 16:03:57 +02:00
commit c4beeae38f
385 changed files with 28725 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
---
description: Add a new boss as data, following the existing format
argument-hint: <boss name and the idea behind each phase>
---
Add a boss: $ARGUMENTS
Do it as data, not code:
1. Read `src/content/content.gd` — the Warden is the reference. Its phases layer
one idea at a time, which is the design intent, not an accident.
2. Add a `static func` returning a `BossDef`, built from the emitters in
`src/sim/patterns/`. Register the id in `Content.boss()` and add a
`BOSS_*` constant.
3. Give every phase a `telegraph_ticks` window so the transition is readable.
4. Add tests to `tests/unit/test_boss.gd`: phase thresholds, and that the
pattern actually fills the arena.
5. Run `tools/check.sh` then `tools/test.sh`.
If you find yourself wanting to add a branch to `SimWorld` for this boss, stop
and add a new `BulletEmitter` subclass instead — the format is supposed to
absorb the difference.
+14
View File
@@ -0,0 +1,14 @@
---
description: Launch a windowed client against a fresh local dedicated server
---
Start a dedicated server in the background and a windowed client against it, so
the change can be looked at rather than inferred:
```bash
tools/server.sh --port 27015 &
tools/client.sh --join --host 127.0.0.1 --port 27015 --name dev
```
Remember to stop the background server afterwards. If there is no display
available, use `tools/smoke.sh` instead and say that is what you did.
+15
View File
@@ -0,0 +1,15 @@
---
description: Run the full verification chain (parse check, tests, end-to-end smoke)
---
Run all three, in order, and stop at the first failure:
1. `tools/check.sh` — parse-checks every script
2. `tools/test.sh` — GUT suite
3. `tools/smoke.sh` — real server plus two bot clients over ENet
Report the outcome of each plainly. If the smoke test fails, its output includes
the tails of the server and client logs — read them before guessing.
Skip step 3 only if the change touched nothing under `src/net/`, `src/sim/`,
`src/instances/` or `src/autoload/`, and say that you skipped it and why.
+20
View File
@@ -0,0 +1,20 @@
{
"permissions": {
"allow": [
"Bash(tools/check.sh)",
"Bash(./tools/check.sh)",
"Bash(tools/test.sh:*)",
"Bash(./tools/test.sh:*)",
"Bash(tools/smoke.sh)",
"Bash(./tools/smoke.sh)",
"Bash(godot --headless --path . --import)",
"Bash(godot --headless --path . --script tools/bench.gd:*)",
"Bash(godot --headless --path . --script tools/export_content.gd)",
"Bash(godot --headless --path . res://tools/check.tscn)",
"Bash(godot --version)",
"Bash(git status:*)",
"Bash(git diff:*)",
"Bash(git log:*)"
]
}
}