Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0cec192a7 | ||
|
|
2dba562c52 | ||
|
|
afd086ba11 | ||
|
|
b4d189c325 | ||
|
|
6684d36739 | ||
|
|
3f4ac7e9aa | ||
|
|
294ac17333 |
No files matched your search
@@ -113,6 +113,9 @@ jobs:
|
|||||||
- name: Publish Gitea release (tags only)
|
- name: Publish Gitea release (tags only)
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
env:
|
env:
|
||||||
|
# An explicit repo secret wins. Without one, publish_release.sh reuses
|
||||||
|
# the local git extraheader that actions/checkout configures for the job
|
||||||
|
# (the runner's own credentials), so tag builds still publish.
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
VERSION: ${{ github.ref_name }}
|
VERSION: ${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ Completed in the working tree (uncommitted with the control pass). Headless **74
|
|||||||
to the entrance.
|
to the entrance.
|
||||||
- [x] Wand shortcut is `C`, not `W`. Tests: `src/test/tests/test_access_loadout.gd`.
|
- [x] Wand shortcut is `C`, not `W`. Tests: `src/test/tests/test_access_loadout.gd`.
|
||||||
|
|
||||||
## Player control, focus ring, and radial action menu
|
## Player control, focus circle, and radial action menu
|
||||||
|
|
||||||
Completed 2026-10-31 with ADR-0007–0010. Headless **77/77**, plus a windowed smoke
|
Completed 2026-10-31 with ADR-0007–0010. Headless **77/77**, plus a windowed smoke
|
||||||
(`src/test/smoke_focus_radial.gd`) that opens the wheel and saves screenshots.
|
(`src/test/smoke_focus_radial.gd`) that opens the wheel and saves screenshots.
|
||||||
@@ -334,13 +334,13 @@ Completed 2026-10-31 with ADR-0007–0010. Headless **77/77**, plus a windowed s
|
|||||||
- [x] `cancel` (Esc / RMB) closes the top modal first; with nothing open, Esc toggles mouse
|
- [x] `cancel` (Esc / RMB) closes the top modal first; with nothing open, Esc toggles mouse
|
||||||
capture and RMB does nothing.
|
capture and RMB does nothing.
|
||||||
|
|
||||||
### Focus and head ring
|
### Focus and focus circle
|
||||||
|
|
||||||
- [x] Focus cone in `src/game/npc_focus.gd` (~10 m, ~10°). Closest-to-forward wins; occlusion
|
- [x] Focus cone in `src/game/npc_focus.gd` (~10 m, ~10°). Closest-to-forward wins; occlusion
|
||||||
ray skips building hits. `Tab` still cycles 12 m.
|
ray skips building hits. `Tab` still cycles 12 m.
|
||||||
- [x] 8-frame miss grace so walk-bob does not drop focus.
|
- [x] 8-frame miss grace so walk-bob does not drop focus.
|
||||||
- [x] Billboarded torus on `Rig/Head`; gold idle, brighter while the radial is open; `Label3D`
|
- [x] Billboarded blue circle in front of the face on `Rig/Head`; brighter while the radial is
|
||||||
`display_name`. HUD target line uses the display name, not the node name.
|
open; `Label3D` `display_name`. HUD target line uses the display name, not the node name.
|
||||||
- [x] Screen-center crosshair.
|
- [x] Screen-center crosshair.
|
||||||
|
|
||||||
### Radial HUD
|
### Radial HUD
|
||||||
@@ -364,7 +364,7 @@ Completed 2026-10-31 with ADR-0007–0010. Headless **77/77**, plus a windowed s
|
|||||||
|
|
||||||
- [x] Named input map: `action_menu` (Space/LMB), `confirm` (Space/Enter), `cancel`
|
- [x] Named input map: `action_menu` (Space/LMB), `confirm` (Space/Enter), `cancel`
|
||||||
(Esc/RMB), `inspect` (E), `wand` (C). `GameManager` uses `is_action_pressed`.
|
(Esc/RMB), `inspect` (E), `wand` (C). `GameManager` uses `is_action_pressed`.
|
||||||
- [x] Windowed smoke: focus ring + name, wheel open/step/confirm/cancel
|
- [x] Windowed smoke: focus circle + name, wheel open/step/confirm/cancel
|
||||||
(`src/test/smoke_focus_radial.gd`, exits non-zero on failure).
|
(`src/test/smoke_focus_radial.gd`, exits non-zero on failure).
|
||||||
- [x] README controls table, smoke checklist, test count, implemented/not-yet lists.
|
- [x] README controls table, smoke checklist, test count, implemented/not-yet lists.
|
||||||
|
|
||||||
@@ -405,7 +405,6 @@ screenshots.
|
|||||||
|
|
||||||
Completed 2026-10-31 (working tree). Headless **88/88**; `src/test/smoke_session_shell.gd` and the windowed focus/radial smoke both pass.
|
Completed 2026-10-31 (working tree). Headless **88/88**; `src/test/smoke_session_shell.gd` and the windowed focus/radial smoke both pass.
|
||||||
|
|
||||||
|
|
||||||
- [x] The skyline backdrop was removed: `assets/textures/ai/game_ready/skyline.png` has an
|
- [x] The skyline backdrop was removed: `assets/textures/ai/game_ready/skyline.png` has an
|
||||||
opaque black background, so the planes rendered as black slabs with window dots. Re-add
|
opaque black background, so the planes rendered as black slabs with window dots. Re-add
|
||||||
the backdrop only with a transparent asset or a keyed shader.
|
the backdrop only with a transparent asset or a keyed shader.
|
||||||
@@ -414,7 +413,7 @@ Completed 2026-10-31 (working tree). Headless **88/88**; `src/test/smoke_session
|
|||||||
- [x] Steps and the landing are visual-only (no collider). The guard walks through them; add
|
- [x] Steps and the landing are visual-only (no collider). The guard walks through them; add
|
||||||
simple step colliders or restage the landing so it does not intersect the walk path.
|
simple step colliders or restage the landing so it does not intersect the walk path.
|
||||||
- [x] Marquee text (`STEP LINE`) is tiny from the sidewalk. Scale the Label3D up.
|
- [x] Marquee text (`STEP LINE`) is tiny from the sidewalk. Scale the Label3D up.
|
||||||
- [x] Focus ring and name tag are small at 2–3 m. Consider a larger torus / font after a
|
- [x] Focus circle and name tag are small at 2–3 m. Consider a larger circle / font after a
|
||||||
real playtest.
|
real playtest.
|
||||||
- [x] NPC crowd cap (`MAX_LIVE_NPCS`) silently drops routine traffic at 16. Add a short
|
- [x] NPC crowd cap (`MAX_LIVE_NPCS`) silently drops routine traffic at 16. Add a short
|
||||||
despawn/lifetime for ordinary guests so the entrance does not fill up with standers.
|
despawn/lifetime for ordinary guests so the entrance does not fill up with standers.
|
||||||
@@ -423,7 +422,6 @@ Completed 2026-10-31 (working tree). Headless **88/88**; `src/test/smoke_session
|
|||||||
|
|
||||||
Completed 2026-10-31 (working tree). Headless **88/88**; `src/test/smoke_session_shell.gd` and the windowed focus/radial smoke both pass.
|
Completed 2026-10-31 (working tree). Headless **88/88**; `src/test/smoke_session_shell.gd` and the windowed focus/radial smoke both pass.
|
||||||
|
|
||||||
|
|
||||||
The game boots into a live 900 s shift. `Save` declares `settings.json` and never uses it.
|
The game boots into a live 900 s shift. `Save` declares `settings.json` and never uses it.
|
||||||
`V` cycles venues by restarting the shift.
|
`V` cycles venues by restarting the shift.
|
||||||
|
|
||||||
@@ -439,7 +437,6 @@ The game boots into a live 900 s shift. `Save` declares `settings.json` and neve
|
|||||||
|
|
||||||
Completed 2026-10-31 (working tree).
|
Completed 2026-10-31 (working tree).
|
||||||
|
|
||||||
|
|
||||||
- [x] README controls table, smoke checklist, test count, and implemented/not-yet lists
|
- [x] README controls table, smoke checklist, test count, and implemented/not-yet lists
|
||||||
refreshed for the control pass (77 tests).
|
refreshed for the control pass (77 tests).
|
||||||
- [x] `PLAN.md` Tech Stack / Planned Commands still say GUT and GitHub Actions; the project
|
- [x] `PLAN.md` Tech Stack / Planned Commands still say GUT and GitHub Actions; the project
|
||||||
@@ -450,7 +447,6 @@ Completed 2026-10-31 (working tree).
|
|||||||
|
|
||||||
Completed 2026-10-31 (working tree). Headless **98/98**; `src/test/smoke_plan_verbs.gd` exercises all five verbs.
|
Completed 2026-10-31 (working tree). Headless **98/98**; `src/test/smoke_plan_verbs.gd` exercises all five verbs.
|
||||||
|
|
||||||
|
|
||||||
- [x] Eye contact as a Level 1 action (PLAN / glossary). Distinct from raise-hand. Add a
|
- [x] Eye contact as a Level 1 action (PLAN / glossary). Distinct from raise-hand. Add a
|
||||||
radial slice if it ships.
|
radial slice if it ships.
|
||||||
- [x] "I recognize this person" is a player decision recorded as evidence, not a pre-attached
|
- [x] "I recognize this person" is a player decision recorded as evidence, not a pre-attached
|
||||||
@@ -466,7 +462,6 @@ Completed 2026-10-31 (working tree). Headless **98/98**; `src/test/smoke_plan_ve
|
|||||||
|
|
||||||
Completed 2026-10-31 (working tree). Headless **105/105**; `src/test/smoke_crowd.gd` verifies rubbernecking and panic clearing. A 16-NPC entrance measured ~1.2 ms/frame (824 fps, vsync off), so no LOD/culling was added at the current cap.
|
Completed 2026-10-31 (working tree). Headless **105/105**; `src/test/smoke_crowd.gd` verifies rubbernecking and panic clearing. A 16-NPC entrance measured ~1.2 ms/frame (824 fps, vsync off), so no LOD/culling was added at the current cap.
|
||||||
|
|
||||||
|
|
||||||
`CrowdSystem` is a mood/attention float. PLAN wants people watching, gathering, and panicking.
|
`CrowdSystem` is a mood/attention float. PLAN wants people watching, gathering, and panicking.
|
||||||
|
|
||||||
- [x] On `aggressive_behavior` / `emergency_responder`, nearby idle NPCs stop and face the
|
- [x] On `aggressive_behavior` / `emergency_responder`, nearby idle NPCs stop and face the
|
||||||
@@ -478,7 +473,6 @@ Completed 2026-10-31 (working tree). Headless **105/105**; `src/test/smoke_crowd
|
|||||||
|
|
||||||
Completed 2026-10-31 (working tree). Headless **113/113**; `src/test/smoke_emergency.gd` covers the unjustified-call investigation, the evacuation aftermath, and the review copy.
|
Completed 2026-10-31 (working tree). Headless **113/113**; `src/test/smoke_emergency.gd` covers the unjustified-call investigation, the evacuation aftermath, and the review copy.
|
||||||
|
|
||||||
|
|
||||||
Responder outcomes (`command` / `restraint` / `evacuation` / `arrest`) are log lines. PLAN also
|
Responder outcomes (`command` / `restraint` / `evacuation` / `arrest`) are log lines. PLAN also
|
||||||
wants evacuation, a closed street, and an investigation when the call was unjustified.
|
wants evacuation, a closed street, and an investigation when the call was unjustified.
|
||||||
|
|
||||||
@@ -491,7 +485,6 @@ wants evacuation, a closed street, and an investigation when the call was unjust
|
|||||||
|
|
||||||
Completed 2026-10-31 (working tree). Headless **120/120**; `src/test/smoke_timeline.gd` opens the timeline from the review, steps through every event, and returns to the review.
|
Completed 2026-10-31 (working tree). Headless **120/120**; `src/test/smoke_timeline.gd` opens the timeline from the review, steps through every event, and returns to the review.
|
||||||
|
|
||||||
|
|
||||||
- [x] Shift review: a timeline of recorded incident events (ADR-0005 already stores them).
|
- [x] Shift review: a timeline of recorded incident events (ADR-0005 already stores them).
|
||||||
Scrub or step through; no live 3D replay required in the first version.
|
Scrub or step through; no live 3D replay required in the first version.
|
||||||
|
|
||||||
@@ -499,9 +492,25 @@ Completed 2026-10-31 (working tree). Headless **120/120**; `src/test/smoke_timel
|
|||||||
|
|
||||||
Completed 2026-10-31 (working tree). Headless **127/127**; verified visually with a staged sit/photo/perform lineup.
|
Completed 2026-10-31 (working tree). Headless **127/127**; verified visually with a staged sit/photo/perform lineup.
|
||||||
|
|
||||||
|
|
||||||
Intents `sit` / `photo` / `film` / `perform` already pick waypoints. ADR-0010 rig (face/hair)
|
Intents `sit` / `photo` / `film` / `perform` already pick waypoints. ADR-0010 rig (face/hair)
|
||||||
is in the working tree. Bodies still idle-stand at those spots.
|
is in the working tree. Bodies still idle-stand at those spots.
|
||||||
|
|
||||||
- [x] Sit pose at `steps_end`. Photo: brief raise of the influencer/tourist prop. Performer
|
- [x] Sit pose at `steps_end`. Photo: brief raise of the influencer/tourist prop. Performer
|
||||||
stays put and plays the hat/sign.
|
stays put and plays the hat/sign.
|
||||||
|
|
||||||
|
## Audio
|
||||||
|
|
||||||
|
Completed 2026-10-31 (working tree). Headless **134/134**; `src/test/smoke_audio.gd` checks the bed follows mood and the radio crackles, headless and windowed (real audio server).
|
||||||
|
|
||||||
|
`AudioFeedback` is sine beeps. DONE called that "crowd ambience"; it is not.
|
||||||
|
|
||||||
|
- [x] Loop a low crowd bed that rises with `CrowdSystem.mood`.
|
||||||
|
- [x] Radio open/close crackle on the existing radio panel, still headless-safe (no-op without
|
||||||
|
an audio server).
|
||||||
|
|
||||||
|
## Accessibility
|
||||||
|
|
||||||
|
Completed 2026-10-31 (working tree). Headless **139/139**; verified visually at 1.4x font scale with the shape meter showing.
|
||||||
|
|
||||||
|
- [x] Escalation colors that still read in grayscale (shape or label, not hue alone).
|
||||||
|
- [x] HUD font scale in settings.
|
||||||
@@ -21,8 +21,8 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
|
|||||||
Windowed control smoke: `godot --path . --script res://src/test/smoke_focus_radial.gd` → exit 0.
|
Windowed control smoke: `godot --path . --script res://src/test/smoke_focus_radial.gd` → exit 0.
|
||||||
- `main` is in sync with origin. **v0.2.2** tags the session-shell + world-follow-up commit;
|
- `main` is in sync with origin. **v0.2.2** tags the session-shell + world-follow-up commit;
|
||||||
CI builds the portable binaries, NSIS installer, and AppImage on the tag push.
|
CI builds the portable binaries, NSIS installer, and AppImage on the tag push.
|
||||||
- Next work: `TODO.md` audio (crowd bed rising with mood, radio crackle), then accessibility and
|
- Next work: `TODO.md` scenario content gaps (Joke Shop / Studio / Building events), then the
|
||||||
scenario content.
|
remaining polish and tooling items.
|
||||||
- Do not re-open `override_access`. Do not bind wand to `W`. Do not remove the radio easter egg.
|
- Do not re-open `override_access`. Do not bind wand to `W`. Do not remove the radio easter egg.
|
||||||
|
|
||||||
## Current State
|
## Current State
|
||||||
@@ -36,7 +36,7 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
|
|||||||
`hud.controls` / `hud.screen_first` updated.
|
`hud.controls` / `hud.screen_first` updated.
|
||||||
- Control pass (in tree, uncommitted, smoke-tested): cone focus via `src/game/npc_focus.gd`,
|
- Control pass (in tree, uncommitted, smoke-tested): cone focus via `src/game/npc_focus.gd`,
|
||||||
accel/decel, gravity only airborne, `input_locked` freeze, Esc no longer on the guard.
|
accel/decel, gravity only airborne, `input_locked` freeze, Esc no longer on the guard.
|
||||||
`NpcAvatar` in group `npc`; neck/hair/eyes/shoes; torus head ring + `Label3D` name; `set_focus_visual`.
|
`NpcAvatar` in group `npc`; neck/hair/eyes/shoes; blue focus circle + `Label3D` name; `set_focus_visual`.
|
||||||
`src/game/ui/action_radial.gd` doughnut (LMB/Space open, A/D/arrows, Space/click confirm, Esc/RMB
|
`src/game/ui/action_radial.gd` doughnut (LMB/Space open, A/D/arrows, Space/click confirm, Esc/RMB
|
||||||
cancel). Crosshair CanvasLayer. Emergency still `R` only. Number keys 1–6 when the wheel is closed.
|
cancel). Crosshair CanvasLayer. Emergency still `R` only. Number keys 1–6 when the wheel is closed.
|
||||||
- Named input actions now exist and are used: `action_menu`, `confirm`, `cancel` (Esc + RMB),
|
- Named input actions now exist and are used: `action_menu`, `confirm`, `cancel` (Esc + RMB),
|
||||||
@@ -59,7 +59,7 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
|
|||||||
(`assets/textures/skyline.png`, regenerated RGBA with a transparent sky) and an
|
(`assets/textures/skyline.png`, regenerated RGBA with a transparent sky) and an
|
||||||
`TRANSPARENCY_ALPHA_SCISSOR` unshaded material (`_skyline_mat`); steps + landing are a
|
`TRANSPARENCY_ALPHA_SCISSOR` unshaded material (`_skyline_mat`); steps + landing are a
|
||||||
`StaticBody3D` with per-tread `BoxShape3D` colliders; marquee `font_size` 160 / outline 24; focus
|
`StaticBody3D` with per-tread `BoxShape3D` colliders; marquee `font_size` 160 / outline 24; focus
|
||||||
torus 0.26–0.34 + name tag 48px; `NpcAvatar.ephemeral`/`lifetime_s` despawns routine traffic
|
circle (blue disc in front of the face) + name tag 48px; `NpcAvatar.ephemeral`/`lifetime_s` despawns routine traffic
|
||||||
(authored events stay). Guard spawn height verified on the landing (guard_y=0.84).
|
(authored events stay). Guard spawn height verified on the landing (guard_y=0.84).
|
||||||
- **PLAN verbs (2026-10-31, uncommitted):** the radial now has 12 slices
|
- **PLAN verbs (2026-10-31, uncommitted):** the radial now has 12 slices
|
||||||
(`Stop, Look, Point, No, Ask, Inspect, Wand, Warn, Block, Reason, Recognize, Radio`).
|
(`Stop, Look, Point, No, Ask, Inspect, Wand, Warn, Block, Reason, Recognize, Radio`).
|
||||||
@@ -95,6 +95,16 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
|
|||||||
`_begin_incident()` now starts one per focused NPC (`has_open_incident()` guard), verbs call
|
`_begin_incident()` now starts one per focused NPC (`has_open_incident()` guard), verbs call
|
||||||
`_ensure_incident()`, and `ShiftCoordinator._finish_shift()` closes leftovers as `unresolved`
|
`_ensure_incident()`, and `ShiftCoordinator._finish_shift()` closes leftovers as `unresolved`
|
||||||
before building the review.
|
before building the review.
|
||||||
|
- **Accessibility (2026-10-31):** escalation text is `"<name> [###--] L3/5"` via
|
||||||
|
`Hud.escalation_meter(level)` (pure, tested) so the cue survives grayscale. HUD font scale uses
|
||||||
|
`add_theme_font_size_override` on the core labels (`set_font_scale`), **not** `Control.scale`,
|
||||||
|
which pushed the right-anchored clock label off-screen. Settings load before `_build_ui()`, so
|
||||||
|
`_ready()` re-applies player settings after the HUD exists.
|
||||||
|
- **Audio (2026-10-31):** `AudioFeedback.start_crowd_bed()` builds a 4 s looping `AudioStreamWAV`
|
||||||
|
(one-pole-filtered noise + 68/103 Hz drone, seeded) and `set_crowd_level(mood)` maps 0..1 to
|
||||||
|
-34..-12 dB. `play_radio_open/close` push short filtered-noise bursts. All procedural; with a
|
||||||
|
dummy (headless) audio server the calls are no-ops. `_free_player()` returns null when `_ready`
|
||||||
|
has not run (tests), and callers handle null.
|
||||||
- **NPC theater (2026-10-31):** `NpcAvatar.theater_pose()` maps `intent` + `arrived` to
|
- **NPC theater (2026-10-31):** `NpcAvatar.theater_pose()` maps `intent` + `arrived` to
|
||||||
idle/sit/photo/film/perform. Pure helpers `crouch_for_pose`, `prop_lift_for_pose`,
|
idle/sit/photo/film/perform. Pure helpers `crouch_for_pose`, `prop_lift_for_pose`,
|
||||||
`sway_for_pose` keep the math testable. Sit lowers the rig by 0.34 and swings the legs forward
|
`sway_for_pose` keep the math testable. Sit lowers the rig by 0.34 and swings the legs forward
|
||||||
@@ -125,7 +135,36 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
|
|||||||
needs `mipmaps/generate=true`.
|
needs `mipmaps/generate=true`.
|
||||||
- **Asset gotcha:** `assets/textures/game_ready/` is *not* imported (no `.import`). Use the
|
- **Asset gotcha:** `assets/textures/game_ready/` is *not* imported (no `.import`). Use the
|
||||||
imported `assets/textures/skyline.png` path. Untracked duplicate folder should not be referenced.
|
imported `assets/textures/skyline.png` path. Untracked duplicate folder should not be referenced.
|
||||||
- Host sign-in follow-up remains deferred. PLAN.md + ADRs 0007–0010 still describe the intended UX.
|
- Host sign-in follow-up remains deferred.
|
||||||
|
- **Release publishing was broken since v0.2.2 (fixed 2026-10-31):** `publish_release.sh`
|
||||||
|
only built `AUTH` in the `GITEA_TOKEN` branch; the `~/.git-credentials` branch set `CRED`
|
||||||
|
and then used unbound `${AUTH[@]}` under `set -u`, so every API call failed and the tag
|
||||||
|
job ended "could not create or find release". The repo also has **no** `GITEA_TOKEN`
|
||||||
|
secret (`/actions/secrets` is empty) and the runner has no git credentials. Fixes: the
|
||||||
|
script sets `AUTH=(-u "$CRED")`; the workflow falls back to `github.token`
|
||||||
|
(`secrets.GITEA_TOKEN || github.token`) — but `github.token` is **not** provided by this
|
||||||
|
Gitea/act runner, so the env dump showed no token and the v0.2.10 tag build failed again.
|
||||||
|
Final fix: `publish_release.sh` falls back to the **local git extraheader** that
|
||||||
|
`actions/checkout` writes (`git config --local --get-regexp '^http\..*\.extraheader$'`),
|
||||||
|
which carries the runner's basic-auth credentials for the same server. Verified locally by
|
||||||
|
adding that extraheader and publishing v0.2.10 (all five artifacts). **v0.2.9 and v0.2.10
|
||||||
|
are published**; v0.2.4–v0.2.8 tags have no artifacts. Verify the CI path on the next tag.
|
||||||
|
- **Host disk resolved (2026-10-31):** the Gitea VM root filesystem was expanded from 7.8G to
|
||||||
|
16G (`/dev/mapper/pve-vm--500--disk--0`, now ~7.8G free). The pruned **v0.2.0** and **v0.2.9**
|
||||||
|
releases were restored from the local `build/` artifacts and verified (4 and 5 assets).
|
||||||
|
`git.allucanget.biz` runs on this host as user `zwitschi`; root@192.168.88.30 is **not**
|
||||||
|
reachable from this workstation (publickey denied; password auth closes the banner), so host
|
||||||
|
maintenance must go through a `zwitschi` login with sudo.
|
||||||
|
- **Host disk full (2026-10-31, historical):** the v0.2.11 tag build created release id 27 and logged the
|
||||||
|
uploads, but they failed with `HTTP 500 Attachments.Save: write … no space left on device`
|
||||||
|
(`/dev/mapper/pve-vm--500--disk--0`, 7.8G, 100%, 0 free). `git push` then failed too
|
||||||
|
("unpacker error"). Unblocked by deleting the superseded **v0.2.0** and **v0.2.9** releases
|
||||||
|
via the API (~565 MB of assets), then publishing v0.2.11 locally with the fixed script
|
||||||
|
(verified 5 assets). Remaining ~150 MB is tight — the next release needs host cleanup on
|
||||||
|
192.168.88.30: `sudo journalctl --vacuum-size=100M` (journal 837 MB), `sudo apt-get clean`
|
||||||
|
(91 MB), clear `/var/lib/gitea/data/attachments/tmp`. SSH works as `zwitschi`; `sudo -n`
|
||||||
|
needs a password. **Releases now:** v0.2.11, v0.2.10, v0.2.1 (5 assets each); v0.2.0 and
|
||||||
|
v0.2.9 entries were pruned. PLAN.md + ADRs 0007–0010 still describe the intended UX.
|
||||||
- **Release v0.2.1 is LIVE** (2026-10-31): CI run 1110 built the NSIS installer + AppImage
|
- **Release v0.2.1 is LIVE** (2026-10-31): CI run 1110 built the NSIS installer + AppImage
|
||||||
and published — installers/AppImage are on the releases page. Releasing = bump version → tag → push.
|
and published — installers/AppImage are on the releases page. Releasing = bump version → tag → push.
|
||||||
- NSIS gotchas (validated in a local ubuntu:24.04 docker repro): makensis uses `-D` defines
|
- NSIS gotchas (validated in a local ubuntu:24.04 docker repro): makensis uses `-D` defines
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ Desktop is the first target: Windows, Linux, and macOS. Web export is a later op
|
|||||||
|
|
||||||
The prototype already walks and looks in first person, but the control scheme fights itself and targeting is a hairline. This pass replaces that with three things that belong together: solid locomotion, a visible focus on a person, and a round action menu for what to do with them.
|
The prototype already walks and looks in first person, but the control scheme fights itself and targeting is a hairline. This pass replaces that with three things that belong together: solid locomotion, a visible focus on a person, and a round action menu for what to do with them.
|
||||||
|
|
||||||
Decisions: [ADR-0007](docs/adr/0007-locomotion-and-input-layers.md) locomotion and input layers, [ADR-0008](docs/adr/0008-cone-focus-and-head-ring.md) cone focus and head ring, [ADR-0009](docs/adr/0009-radial-action-menu.md) radial action menu, [ADR-0010](docs/adr/0010-procedural-npc-presentation.md) procedural NPC presentation.
|
Decisions: [ADR-0007](docs/adr/0007-locomotion-and-input-layers.md) locomotion and input layers, [ADR-0008](docs/adr/0008-cone-focus-and-head-ring.md) cone focus and focus circle, [ADR-0009](docs/adr/0009-radial-action-menu.md) radial action menu, [ADR-0010](docs/adr/0010-procedural-npc-presentation.md) procedural NPC presentation.
|
||||||
|
|
||||||
### What is wrong today
|
### What is wrong today
|
||||||
|
|
||||||
@@ -496,17 +496,17 @@ Replace the hairline ray as the primary picker.
|
|||||||
- `Tab` still cycles people inside 12 m as the aim-free path. Cycling sets the same focused person the cone would.
|
- `Tab` still cycles people inside 12 m as the aim-free path. Cycling sets the same focused person the cone would.
|
||||||
- Clearing: look away until the head leaves the circle for a few frames (small grace so a bob does not drop them), or they walk out of range.
|
- Clearing: look away until the head leaves the circle for a few frames (small grace so a bob does not drop them), or they walk out of range.
|
||||||
|
|
||||||
### Head ring
|
### Focus circle
|
||||||
|
|
||||||
When a person is in focus, draw a thin ring around their head.
|
When a person is in focus, draw a blue, semi-transparent circle in front of their face.
|
||||||
|
|
||||||
- Attach to the avatar `Head` node, sitting just above the skull, billboarded to the camera so it stays a circle on screen.
|
- Attach to the avatar `Head` node, just in front of the face, billboarded to the camera so it stays a circle on screen.
|
||||||
- Slow spin is fine; no ping-pong scale spam.
|
- Slow spin is fine; no ping-pong scale spam.
|
||||||
- Idle focus: pale gold, modest size. Radial open on that person: brighter, slightly larger.
|
- Idle focus: blue, semi-transparent, modest size. Radial open on that person: brighter, slightly larger.
|
||||||
- Optional small name under the ring (`display_name` only, not the archetype cheat `Violent Threat` in the world). The existing HUD target line can keep the archetype for the prototype.
|
- Optional small name under the circle (`display_name` only, not the archetype cheat `Violent Threat` in the world). The existing HUD target line can keep the archetype for the prototype.
|
||||||
- One ring at a time. Everyone else has none.
|
- One circle at a time. Everyone else has none.
|
||||||
|
|
||||||
Implementation sketch: `MeshInstance3D` torus or a thin unshaded ring mesh on the avatar, toggled from `GuardController` / `GameManager` when focus changes. Screen-space fallback (unproject head, draw a `Control` circle) is acceptable if the 3D torus z-fights on hats.
|
Implementation sketch: a thin unshaded `MeshInstance3D` circle (flat disc) in front of the face on the avatar, toggled from `GuardController` / `GameManager` when focus changes. Screen-space fallback (unproject head, draw a `Control` circle) is acceptable if the 3D circle z-fights on hats.
|
||||||
|
|
||||||
### Round action HUD
|
### Round action HUD
|
||||||
|
|
||||||
@@ -545,7 +545,7 @@ A doughnut / pie menu centered on the screen, opened on the focused person.
|
|||||||
**Cancel**
|
**Cancel**
|
||||||
|
|
||||||
- `Esc` or right mouse button: hide the menu, no action, no recorder event, recapture mouse.
|
- `Esc` or right mouse button: hide the menu, no action, no recorder event, recapture mouse.
|
||||||
- Focus and the head ring stay as they were.
|
- Focus and the focus circle stay as they were.
|
||||||
|
|
||||||
Number keys `1`–`6` may remain as shortcuts that skip the wheel so a smoke-test script still works. They must not fire while the wheel is open (the wheel owns `A` / `D` / `Space`). Document both in the README.
|
Number keys `1`–`6` may remain as shortcuts that skip the wheel so a smoke-test script still works. They must not fire while the wheel is open (the wheel owns `A` / `D` / `Space`). Document both in the README.
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ The central design goal is simple:
|
|||||||
|
|
||||||
**All releases:** <https://git.allucanget.biz/zwitschi/security-game/releases>
|
**All releases:** <https://git.allucanget.biz/zwitschi/security-game/releases>
|
||||||
|
|
||||||
> **Latest: v0.2.7** — NPC theater: guests sit on the steps, tourists and influencers raise a
|
> **Latest: v0.2.12** — release pipeline verified end to end: tag builds create the release and
|
||||||
> camera, performers play their sign.
|
> upload all five artifacts without any repo secret.
|
||||||
> Releases are built automatically when a `vX.Y.Z` tag is pushed
|
> Releases are built automatically when a `vX.Y.Z` tag is pushed
|
||||||
> (see [`docs/RELEASING.md`](docs/RELEASING.md)); manual builds use
|
> (see [`docs/RELEASING.md`](docs/RELEASING.md)); manual builds use
|
||||||
> `./tools/build_releases.sh`. Installer/AppImage packaging runs in the same pipeline
|
> `./tools/build_releases.sh`. Installer/AppImage packaging runs in the same pipeline
|
||||||
@@ -236,7 +236,7 @@ godot --headless --path . --script res://src/test/test_runner.gd
|
|||||||
# Save a screenshot to user:// (windowed)
|
# Save a screenshot to user:// (windowed)
|
||||||
godot --path . --script res://src/test/take_screenshot.gd
|
godot --path . --script res://src/test/take_screenshot.gd
|
||||||
|
|
||||||
# Windowed control smoke: focus ring + action wheel, saves PNGs, exits 1 on failure
|
# Windowed control smoke: focus circle + action wheel, saves PNGs, exits 1 on failure
|
||||||
godot --path . --script res://src/test/smoke_focus_radial.gd
|
godot --path . --script res://src/test/smoke_focus_radial.gd
|
||||||
|
|
||||||
# Session-shell smoke: menu → shift → pause → settings → menu (headless or windowed)
|
# Session-shell smoke: menu → shift → pause → settings → menu (headless or windowed)
|
||||||
@@ -253,6 +253,9 @@ godot --headless --path . --script res://src/test/smoke_emergency.gd
|
|||||||
|
|
||||||
# Body-camera timeline smoke: review → timeline → step through → back to review
|
# Body-camera timeline smoke: review → timeline → step through → back to review
|
||||||
godot --headless --path . --script res://src/test/smoke_timeline.gd
|
godot --headless --path . --script res://src/test/smoke_timeline.gd
|
||||||
|
|
||||||
|
# Audio smoke: crowd bed follows mood, radio open/close crackle
|
||||||
|
godot --headless --path . --script res://src/test/smoke_audio.gd
|
||||||
```
|
```
|
||||||
|
|
||||||
The unit test runner is the project's own lightweight harness (no editor plugin required) so CI can run it without the editor.
|
The unit test runner is the project's own lightweight harness (no editor plugin required) so CI can run it without the editor.
|
||||||
@@ -305,12 +308,12 @@ Implemented so far:
|
|||||||
- Godot 4.3 project scaffold, input map, procedural world builder
|
- Godot 4.3 project scaffold, input map, procedural world builder
|
||||||
- Venue-driven simulation core: `ShiftCoordinator`, `VenueScenario`, `EventScheduler`, `NPCController` + FSM, `AccessVerifier`, `EscalationManager`, `RadioSystem`, `IncidentRecorder`, `ReputationEvaluator`, `CrowdSystem`
|
- Venue-driven simulation core: `ShiftCoordinator`, `VenueScenario`, `EventScheduler`, `NPCController` + FSM, `AccessVerifier`, `EscalationManager`, `RadioSystem`, `IncidentRecorder`, `ReputationEvaluator`, `CrowdSystem`
|
||||||
- Three authored scenarios (Hollywood Boulevard building, The Joke Shop, Late Night TV Studio) with access policies, NPC archetypes, and event pools
|
- Three authored scenarios (Hollywood Boulevard building, The Joke Shop, Late Night TV Studio) with access policies, NPC archetypes, and event pools
|
||||||
- Headless unit tests: **127 passing** (access rules and venue-correct access loadout, escalation, radio cooldown/battery, NPC reaction determinism, door lock, flashlight perception, persistence round-trip, settings round-trip, navmesh, step colliders, skyline alpha, scenario data, full-shift simulation, wand screening, responder dispatch, localization strings, focus cone, action wheel, session shell, PLAN verbs and incident recording, crowd presentation, emergency aftermath, body-camera timeline, NPC theater poses)
|
- Headless unit tests: **139 passing** (access rules and venue-correct access loadout, escalation, radio cooldown/battery, NPC reaction determinism, door lock, flashlight perception, persistence round-trip, settings round-trip, navmesh, step colliders, skyline alpha, scenario data, full-shift simulation, wand screening, responder dispatch, localization strings, focus cone, action wheel, session shell, PLAN verbs and incident recording, crowd presentation, emergency aftermath, body-camera timeline, NPC theater poses, audio, accessibility)
|
||||||
- Simulation extras: protester archetype, CALL_SOMEONE reaction, door lock/secure mechanic (visual indicator), flashlight with night perception bonus, LATE shift phase reaching the violent-threat event
|
- Simulation extras: protester archetype, CALL_SOMEONE reaction, door lock/secure mechanic (visual indicator), flashlight with night perception bonus, LATE shift phase reaching the violent-threat event
|
||||||
- First-person prototype with interaction HUD, access inspection, wand screening, radio report form (incl. emergency hold-to-confirm), dispatched responder avatars, aim-free targeting, venue cycling between all three scenarios, color-coded escalation feedback, procedural audio cues, navigation-mesh NPC paths, JSON-backed localized strings, persisted shift history, debug overlay, and shift review
|
- First-person prototype with interaction HUD, access inspection, wand screening, radio report form (incl. emergency hold-to-confirm), dispatched responder avatars, aim-free targeting, venue cycling between all three scenarios, color-coded escalation feedback, procedural audio cues, navigation-mesh NPC paths, JSON-backed localized strings, persisted shift history, debug overlay, and shift review
|
||||||
- Control pass: focus cone on NPC heads with a billboarded gold ring and name, action wheel (LMB/Space) with de-escalation-first slices, mouse-look freeze while a panel is open, acceleration-based walking, and named input actions (`action_menu`, `confirm`, `cancel`, `inspect`, `wand`)
|
- Control pass: focus cone on NPC heads with a billboarded blue circle in front of the face and name, action wheel (LMB/Space) with de-escalation-first slices, mouse-look freeze while a panel is open, acceleration-based walking, and named input actions (`action_menu`, `confirm`, `cancel`, `inspect`, `wand`)
|
||||||
- Session shell: venue start menu (keyboard + mouse), Esc pause overlay (resume / restart / settings / quit to menu), settings panel with mouse-look sensitivity and HUD font scale persisted to `user://settings.json`, and "Run another shift" returning to the venue menu
|
- Session shell: venue start menu (keyboard + mouse), Esc pause overlay (resume / restart / settings / quit to menu), settings panel with mouse-look sensitivity and HUD font scale persisted to `user://settings.json`, and "Run another shift" returning to the venue menu
|
||||||
- World presentation: skyline backdrop rendered with an alpha material, walkable step and landing colliders, larger marquee text, and larger focus ring / name tag
|
- World presentation: skyline backdrop rendered with an alpha material, walkable step and landing colliders, larger marquee text, and larger focus circle / name tag
|
||||||
- Routine traffic despawns after a while at its waypoint so the crowd cap no longer fills with idle standers
|
- Routine traffic despawns after a while at its waypoint so the crowd cap no longer fills with idle standers
|
||||||
- PLAN verbs: eye contact (distinct Level 1 cue), recognizing a person as a player decision recorded as access evidence, a body-camera flag that a formal warning arms (and `B` toggles), blocking that physically stations the guard between the person and the door, and a Level 3 request-reason ask answered from the NPC's `dialogue_lines`
|
- PLAN verbs: eye contact (distinct Level 1 cue), recognizing a person as a player decision recorded as access evidence, a body-camera flag that a formal warning arms (and `B` toggles), blocking that physically stations the guard between the person and the door, and a Level 3 request-reason ask answered from the NPC's `dialogue_lines`
|
||||||
- Incidents are now actually opened on focus and closed at shift end, so player actions, access evidence, escalation levels, and unresolved interactions reach the review (previously every recorded event was dropped)
|
- Incidents are now actually opened on focus and closed at shift end, so player actions, access evidence, escalation levels, and unresolved interactions reach the review (previously every recorded event was dropped)
|
||||||
@@ -320,10 +323,12 @@ Implemented so far:
|
|||||||
- Emergency aftermath: the `evacuation` outcome locks the door and clears the entrance, an emergency call that the situation did not justify opens an investigation and applies the false-report hit, and the shift review names the responder outcome and any investigations
|
- Emergency aftermath: the `evacuation` outcome locks the door and clears the entrance, an emergency call that the situation did not justify opens an investigation and applies the false-report hit, and the shift review names the responder outcome and any investigations
|
||||||
- Body-camera timeline: the shift review opens a text timeline of every recorded incident event (time, person, action/outcome) that you step through with the arrow keys or buttons. No live 3D replay yet
|
- Body-camera timeline: the shift review opens a text timeline of every recorded incident event (time, person, action/outcome) that you step through with the arrow keys or buttons. No live 3D replay yet
|
||||||
- NPC theater: seated guests sit on the steps with bent legs, influencers and tourists raise a camera prop while photographing, performers sway their sign, and filming visitors pan slowly — all once they reach their intent's waypoint
|
- NPC theater: seated guests sit on the steps with bent legs, influencers and tourists raise a camera prop while photographing, performers sway their sign, and filming visitors pan slowly — all once they reach their intent's waypoint
|
||||||
|
- Audio: a looping procedural crowd bed (filtered murmur) whose volume follows `CrowdSystem.mood`, plus radio open/close crackle. All generated at runtime, no audio assets, and safe with a dummy audio server
|
||||||
|
- Accessibility: the escalation cue shows a shape meter plus the numeric level (`Escalation: Blocking [###--] L3/5`) so it reads in grayscale, and the HUD font scale from settings is applied at boot by resizing fonts (not Control.scale, which broke the right-aligned layout)
|
||||||
- Visual polish pass (v0.2.0): phase-based lighting (sun/sky/ambient per shift phase), street lamps with night-mode bulbs and omni lights, glowing marquee signage, crosswalk, planters and low-poly street trees, NPC height/brightness variety, denser routine traffic — day and late-night screenshot sets
|
- Visual polish pass (v0.2.0): phase-based lighting (sun/sky/ambient per shift phase), street lamps with night-mode bulbs and omni lights, glowing marquee signage, crosswalk, planters and low-poly street trees, NPC height/brightness variety, denser routine traffic — day and late-night screenshot sets
|
||||||
- Assets pass: authored textures in `assets/textures/` (brick facade, concrete, asphalt, awning, skyline, vignette, HUD icons, access-card art) generated by `tools/generate_textures.py`, soft sun shadows, humanoid NPC rigs with archetype props + procedural walk bob and attention head-turn, inspection artifact cards, escalation vignette, mode icons, and a body-camera overlay (REC + shift clock)
|
- Assets pass: authored textures in `assets/textures/` (brick facade, concrete, asphalt, awning, skyline, vignette, HUD icons, access-card art) generated by `tools/generate_textures.py`, soft sun shadows, humanoid NPC rigs with archetype props + procedural walk bob and attention head-turn, inspection artifact cards, escalation vignette, mode icons, and a body-camera overlay (REC + shift clock)
|
||||||
|
|
||||||
Not yet implemented: live 3D body-camera replay, ambience audio, editor-based GUT integration, and crowd performance profiling/LOD (see `TODO.md`).
|
Not yet implemented: live 3D body-camera replay, editor-based GUT integration, and crowd performance profiling/LOD (see `TODO.md`).
|
||||||
|
|
||||||
### Smoke Test Checklist
|
### Smoke Test Checklist
|
||||||
|
|
||||||
@@ -335,7 +340,7 @@ Not yet implemented: live 3D body-camera replay, ambience audio, editor-based GU
|
|||||||
6. The skyline backdrop shows silhouettes against the sky, not an opaque black slab.
|
6. The skyline backdrop shows silhouettes against the sky, not an opaque black slab.
|
||||||
7. The `STEP LINE` marquee is readable from the sidewalk.
|
7. The `STEP LINE` marquee is readable from the sidewalk.
|
||||||
8. NPCs spawn and approach the entrance during the first minutes.
|
8. NPCs spawn and approach the entrance during the first minutes.
|
||||||
9. Looking at an NPC inside the focus cone shows a gold head ring, the person's name, and the HUD target line.
|
9. Looking at an NPC inside the focus cone shows a blue focus circle in front of the face, the person's name, and the HUD target line.
|
||||||
10. `Space` or left click opens the action wheel; `A`/`D` highlight a slice, `Space` confirms it, `Esc`/right click cancels without a log entry.
|
10. `Space` or left click opens the action wheel; `A`/`D` highlight a slice, `Space` confirms it, `Esc`/right click cancels without a log entry.
|
||||||
11. `E`/`C` open the inspection/wand panels from the wheel and freeze movement until they close; walking never fires the wand.
|
11. `E`/`C` open the inspection/wand panels from the wheel and freeze movement until they close; walking never fires the wand.
|
||||||
12. Pressing `Q` produces a reaction log entry and reputation feedback.
|
12. Pressing `Q` produces a reaction log entry and reputation feedback.
|
||||||
@@ -357,7 +362,9 @@ Not yet implemented: live 3D body-camera replay, ambience audio, editor-based GU
|
|||||||
28. An unjustified emergency call (calm person, no weapon) logs an investigation and costs reputation.
|
28. An unjustified emergency call (calm person, no weapon) logs an investigation and costs reputation.
|
||||||
29. After an evacuation outcome the door is locked and NPCs are leaving the entrance.
|
29. After an evacuation outcome the door is locked and NPCs are leaving the entrance.
|
||||||
30. The shift review's "Body camera timeline" button steps through the recorded events (Left/Right or the buttons) and Esc returns to the review.
|
30. The shift review's "Body camera timeline" button steps through the recorded events (Left/Right or the buttons) and Esc returns to the review.
|
||||||
31. When the shift timer reaches 0, the shift review screen shows grade, incident summary, responder outcomes, investigations, and persisted shift history; "Run another shift" returns to the venue menu.
|
31. The escalation label shows a `[###--] L3/5` shape meter as well as the level name, and stays readable in grayscale.
|
||||||
|
32. Changing "HUD font scale" in Settings resizes the HUD text and persists across a restart.
|
||||||
|
33. When the shift timer reaches 0, the shift review screen shows grade, incident summary, responder outcomes, investigations, and persisted shift history; "Run another shift" returns to the venue menu.
|
||||||
|
|
||||||
## Development Workflow
|
## Development Workflow
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,10 @@
|
|||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
Godot 4.3 prototype. Release **v0.2.7** is tagged. Headless suite **127/127**, plus the session,
|
Godot 4.3 prototype. Release **v0.2.9** is tagged. Headless suite **139/139**, plus the session,
|
||||||
PLAN-verb, crowd, emergency, timeline, and windowed focus/radial smokes.
|
PLAN-verb, crowd, emergency, timeline, audio, and windowed focus/radial smokes.
|
||||||
|
|
||||||
Host `REQUIRE_SIGNIN_VIEW` stays deferred.
|
Host `REQUIRE_SIGNIN_VIEW` stays deferred.
|
||||||
|
|
||||||
## Audio
|
|
||||||
|
|
||||||
`AudioFeedback` is sine beeps. DONE called that "crowd ambience"; it is not.
|
|
||||||
|
|
||||||
- [ ] Loop a low crowd bed that rises with `CrowdSystem.mood`.
|
|
||||||
- [ ] Radio open/close crackle on the existing radio panel, still headless-safe (no-op without
|
|
||||||
an audio server).
|
|
||||||
|
|
||||||
## Accessibility
|
|
||||||
|
|
||||||
- [ ] Escalation colors that still read in grayscale (shape or label, not hue alone).
|
|
||||||
- [ ] HUD font scale in settings.
|
|
||||||
|
|
||||||
## Scenario content still missing vs PLAN lists
|
## Scenario content still missing vs PLAN lists
|
||||||
|
|
||||||
- [ ] Joke Shop: guest on the reservation list without ID; borrowed/mismatched ID; guest
|
- [ ] Joke Shop: guest on the reservation list without ID; borrowed/mismatched ID; guest
|
||||||
@@ -38,6 +25,24 @@ Verified via API+host credentials (2026-10-31):
|
|||||||
anonymous browsing/downloads redirect to login. Host admin: `REQUIRE_SIGNIN_VIEW = false`
|
anonymous browsing/downloads redirect to login. Host admin: `REQUIRE_SIGNIN_VIEW = false`
|
||||||
under `[service]` in `app.ini`, restart Gitea. Alternative: mirror downloads.
|
under `[service]` in `app.ini`, restart Gitea. Alternative: mirror downloads.
|
||||||
|
|
||||||
|
## Release pipeline follow-up
|
||||||
|
|
||||||
|
- [x] Fix `tools/publish_release.sh`: the `~/.git-credentials` branch never set `AUTH`,
|
||||||
|
so every tag build since v0.2.2 failed to publish.
|
||||||
|
- [x] Add a `github.token` fallback in `.gitea/workflows/build.yml` (the repo has no
|
||||||
|
`GITEA_TOKEN` secret).
|
||||||
|
- [x] Fall back to the checkout's git extraheader when no token/credentials exist (the
|
||||||
|
Gitea runner does not expose `github.token`).
|
||||||
|
- [x] Uploads now fail loudly and the release is verified to carry every artifact
|
||||||
|
(a silent HTTP 4xx used to leave an empty release with a green job).
|
||||||
|
- [x] Host disk expanded to 16G (~7.8G free on `/`); v0.2.0 and v0.2.9 releases restored from
|
||||||
|
the local artifacts and verified. No cleanup needed any more.
|
||||||
|
- [ ] Verify the fallback on the next tag push produces a release automatically (the
|
||||||
|
v0.2.11 tag build reached the publish step and created the release; only the
|
||||||
|
upload failed on disk space).
|
||||||
|
- [ ] Optionally backfill releases for v0.2.4–v0.2.8 (their CI artifacts were not
|
||||||
|
retained; would need local rebuilds) or leave them superseded by the latest.
|
||||||
|
|
||||||
## Open Polish
|
## Open Polish
|
||||||
|
|
||||||
- [ ] Keep `%` placeholders stable in `Strings.fmt` when adding keys (positional formatting).
|
- [ ] Keep `%` placeholders stable in `Strings.fmt` when adding keys (positional formatting).
|
||||||
|
|||||||
@@ -37,8 +37,30 @@ The repository ships a Gitea Actions workflow (`.gitea/workflows/build.yml`):
|
|||||||
Linux/Windows/macOS, artifact upload, and — on tags — release publication via
|
Linux/Windows/macOS, artifact upload, and — on tags — release publication via
|
||||||
`tools/publish_release.sh`.
|
`tools/publish_release.sh`.
|
||||||
|
|
||||||
For tag builds, set a repo secret named **`GITEA_TOKEN`** (write:repository scope).
|
`tools/publish_release.sh` picks the first available credential, in order:
|
||||||
Without it the workflow still builds and tests, but the release publish step fails.
|
|
||||||
|
1. `GITEA_TOKEN` (repo secret, write:repository scope),
|
||||||
|
2. `GITEA_AUTH_HEADER` (a ready-made `Authorization: ...` header),
|
||||||
|
3. `~/.git-credentials` for the host,
|
||||||
|
4. the **local git extraheader** that `actions/checkout` configures on the CI job.
|
||||||
|
|
||||||
|
Option 4 is what makes tag builds publish without any repo secret: the runner
|
||||||
|
already injects basic-auth credentials for the checkout, and the script reuses that
|
||||||
|
header for the API (same server). `github.token` is *not* available in this Gitea
|
||||||
|
setup, so do not rely on it.
|
||||||
|
|
||||||
|
> **Disk space:** Gitea stores release assets under `/var/lib/gitea/data/attachments` on
|
||||||
|
> the host root filesystem (7.8 GB here). When it is full, asset uploads fail with
|
||||||
|
> `HTTP 500 … no space left on device` and even `git push` can fail with "unpacker error".
|
||||||
|
> `publish_release.sh` now verifies the asset count and exits non-zero, so this is visible.
|
||||||
|
>
|
||||||
|
> **Incident (2026-10-31):** `tools/publish_release.sh` never set `AUTH` in its
|
||||||
|
> `~/.git-credentials` branch, so every API call failed silently (`AUTH[@]` was
|
||||||
|
> unbound under `set -u`). Combined with no `GITEA_TOKEN` secret on the repo, tag
|
||||||
|
> builds from v0.2.2 to v0.2.8 produced installers but published nothing. The script
|
||||||
|
> is fixed (`AUTH=(-u "$CRED")`) and v0.2.9 was published locally with all five
|
||||||
|
> artifacts. If CI publishing fails again, run
|
||||||
|
> `./tools/publish_release.sh <version>` from a checkout with `~/.git-credentials`.
|
||||||
|
|
||||||
> **No `actions/cache` for now:** the runner has no local actions-cache service, so
|
> **No `actions/cache` for now:** the runner has no local actions-cache service, so
|
||||||
> `actions/cache` times out against GitHub's cache API. We dropped it (Godot import
|
> `actions/cache` times out against GitHub's cache API. We dropped it (Godot import
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# ADR-0008: Cone focus and head ring
|
# ADR-0008: Cone focus and focus circle
|
||||||
|
|
||||||
- **Status:** Accepted
|
- **Status:** Accepted
|
||||||
- **Date:** TBD
|
- **Date:** TBD
|
||||||
@@ -19,7 +19,7 @@ Focus is a **cone**, not a ray.
|
|||||||
- A few frames of grace keep walk-bob from dropping focus.
|
- A few frames of grace keep walk-bob from dropping focus.
|
||||||
- `Tab` still cycles people inside 12 m and sets the same focused person.
|
- `Tab` still cycles people inside 12 m and sets the same focused person.
|
||||||
|
|
||||||
When someone is in focus, draw a **thin ring** around their head, attached to the avatar `Head` node, billboarded so it stays a circle on screen. Pale gold while idle; brighter and slightly larger while the action menu is open on that person. Optional `display_name` under the ring. One ring at a time.
|
When someone is in focus, draw a **blue, semi-transparent circle in front of the face**, attached to the avatar `Head` node, billboarded so it stays a circle on screen. Blue while idle; brighter and slightly larger while the action menu is open on that person. Optional `display_name` under the circle. One circle at a time.
|
||||||
|
|
||||||
The world must not show the internal type name (`Trespasser`, `Violent Threat`). The debug overlay (`F`) can still print it.
|
The world must not show the internal type name (`Trespasser`, `Violent Threat`). The debug overlay (`F`) can still print it.
|
||||||
|
|
||||||
@@ -28,19 +28,19 @@ The world must not show the internal type name (`Trespasser`, `Violent Threat`).
|
|||||||
### Positive
|
### Positive
|
||||||
|
|
||||||
- Looking near a person is enough; the player does not have to pin a capsule.
|
- Looking near a person is enough; the player does not have to pin a capsule.
|
||||||
- The ring is visible in the scene, so the HUD is not the only focus cue.
|
- The circle is visible in the scene, so the HUD is not the only focus cue.
|
||||||
- `Tab` remains the accessibility path and shares the same focused person.
|
- `Tab` remains the accessibility path and shares the same focused person.
|
||||||
- The action menu (ADR-0009) has a clear subject.
|
- The action menu (ADR-0009) has a clear subject.
|
||||||
|
|
||||||
### Negative
|
### Negative
|
||||||
|
|
||||||
- Two heads in the same circle can steal focus; center-distance is a heuristic, not a lock-on.
|
- Two heads in the same circle can steal focus; center-distance is a heuristic, not a lock-on.
|
||||||
- Hats and protester signs can z-fight a 3D torus. A screen-space circle unprojected from the head is an allowed fallback.
|
- Hats and protester signs can z-fight a 3D circle. A screen-space circle unprojected from the head is an allowed fallback.
|
||||||
- Occlusion rays can fail on unusual geometry; grace frames hide some of that.
|
- Occlusion rays can fail on unusual geometry; grace frames hide some of that.
|
||||||
|
|
||||||
## Alternatives considered
|
## Alternatives considered
|
||||||
|
|
||||||
- **Keep the hairline ray:** Rejected because it drops people too easily and has no world mark.
|
- **Keep the hairline ray:** Rejected because it drops people too easily and has no world mark.
|
||||||
- **Sticky lock-on until cancelled:** Rejected because the job is to watch a crowd, not duel one person.
|
- **Sticky lock-on until cancelled:** Rejected because the job is to watch a crowd, not duel one person.
|
||||||
- **Screen reticle only, no world ring:** Rejected; in a crowd the player needs a mark on the head, not only a HUD line.
|
- **Screen reticle only, no world circle:** Rejected; in a crowd the player needs a mark on the face, not only a HUD line.
|
||||||
- **Click a person to select, then act:** Rejected for default play. The mouse is captured for look (ADR-0007). Click opens the action menu on whoever is already in the cone.
|
- **Click a person to select, then act:** Rejected for default play. The mouse is captured for look (ADR-0007). Click opens the action menu on whoever is already in the cone.
|
||||||
@@ -31,7 +31,7 @@ While the menu is open, walk and look freeze (ADR-0007) and the cursor is visibl
|
|||||||
|
|
||||||
**Confirm:** click a slice, or `Space` on the highlighted slice. The menu closes, the mouse is recaptured, and that action runs. Inspect, wand, and radio assist close the wheel and then open the existing panels. Walk and look stay frozen until that panel closes.
|
**Confirm:** click a slice, or `Space` on the highlighted slice. The menu closes, the mouse is recaptured, and that action runs. Inspect, wand, and radio assist close the wheel and then open the existing panels. Walk and look stay frozen until that panel closes.
|
||||||
|
|
||||||
**Cancel:** `Esc` or right mouse button. The menu hides. No action runs. No recorder event. Focus and the head ring stay. The mouse is recaptured.
|
**Cancel:** `Esc` or right mouse button. The menu hides. No action runs. No recorder event. Focus and the focus circle stay. The mouse is recaptured.
|
||||||
|
|
||||||
Number keys `1`–`6` may remain as shortcuts when the wheel is closed, so existing smoke tests still work. They must not fire while the wheel is open.
|
Number keys `1`–`6` may remain as shortcuts when the wheel is closed, so existing smoke tests still work. They must not fire while the wheel is open.
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ Number keys `1`–`6` may remain as shortcuts when the wheel is closed, so exist
|
|||||||
## Alternatives considered
|
## Alternatives considered
|
||||||
|
|
||||||
- **Hold-to-open, release-to-confirm (GTA / Destiny):** Rejected. The requested input is click or Space to open, then click or Space to confirm, with Esc / RMB to abort. That is a toggle, not a hold.
|
- **Hold-to-open, release-to-confirm (GTA / Destiny):** Rejected. The requested input is click or Space to open, then click or Space to confirm, with Esc / RMB to abort. That is a toggle, not a hold.
|
||||||
- **Vertical list / command menu:** Rejected because a round layout around a focused person matches the head ring and reads faster in a crowd.
|
- **Vertical list / command menu:** Rejected because a round layout around a focused person matches the focus circle and reads faster in a crowd.
|
||||||
- **One context-sensitive Use key:** Rejected; the game is about choosing among levels, not a single default verb.
|
- **One context-sensitive Use key:** Rejected; the game is about choosing among levels, not a single default verb.
|
||||||
- **Emergency on the wheel:** Rejected because a misclick would dispatch armed response. ADR-0002 already keeps that path rare and confirmed.
|
- **Emergency on the wheel:** Rejected because a misclick would dispatch armed response. ADR-0002 already keeps that path rare and confirmed.
|
||||||
- **Drop number-key shortcuts immediately:** Deferred. They remain as a closed-menu fallback until the wheel is proven in play.
|
- **Drop number-key shortcuts immediately:** Deferred. They remain as a closed-menu fallback until the wheel is proven in play.
|
||||||
@@ -21,7 +21,7 @@ Make the body read as a person at conversation distance:
|
|||||||
- Shoes.
|
- Shoes.
|
||||||
- Hair cap whose color comes from the visual seed.
|
- Hair cap whose color comes from the visual seed.
|
||||||
- Two dark eye spheres so the head has a front.
|
- Two dark eye spheres so the head has a front.
|
||||||
- Named `Head` node (`Rig/Head`) as the attach point for the focus ring (ADR-0008) and the focus cone.
|
- Named `Head` node (`Rig/Head`) as the attach point for the focus circle (ADR-0008) and the focus cone.
|
||||||
- Collision capsule scaled to the visible height so the cone hits the body the player sees.
|
- Collision capsule scaled to the visible height so the cone hits the body the player sees.
|
||||||
|
|
||||||
Keep archetype props, height / brightness variation, walk bob, and the notice head-turn.
|
Keep archetype props, height / brightness variation, walk bob, and the notice head-turn.
|
||||||
@@ -49,5 +49,5 @@ AI clothing textures stay out unless a map is already the right size and is wire
|
|||||||
|
|
||||||
- **Skinned Mixamo / GLB characters now:** Rejected. Cost and pipeline exceed this pass; the sim only needs a readable body and a head node.
|
- **Skinned Mixamo / GLB characters now:** Rejected. Cost and pipeline exceed this pass; the sim only needs a readable body and a head node.
|
||||||
- **Billboard sprites:** Rejected; first-person movement walks around people, and sprites fail at profile views.
|
- **Billboard sprites:** Rejected; first-person movement walks around people, and sprites fail at profile views.
|
||||||
- **Keep colored capsules as-is:** Rejected; the head ring and cone need a real head, and capsules do not read as people at two metres.
|
- **Keep colored capsules as-is:** Rejected; the focus circle and cone need a real head, and capsules do not read as people at two metres.
|
||||||
- **World labels with archetype names:** Rejected because they leak sim truth and skip observation.
|
- **World labels with archetype names:** Rejected because they leak sim truth and skip observation.
|
||||||
@@ -153,7 +153,7 @@ Architecture decisions are recorded as ADRs:
|
|||||||
- [ADR-0005: Event-based incident recording](adr/0005-event-based-incident-recording.md)
|
- [ADR-0005: Event-based incident recording](adr/0005-event-based-incident-recording.md)
|
||||||
- [ADR-0006: Godot 4 with GDScript](adr/0006-godot-4-gdscript.md)
|
- [ADR-0006: Godot 4 with GDScript](adr/0006-godot-4-gdscript.md)
|
||||||
- [ADR-0007: Locomotion and input layers](adr/0007-locomotion-and-input-layers.md)
|
- [ADR-0007: Locomotion and input layers](adr/0007-locomotion-and-input-layers.md)
|
||||||
- [ADR-0008: Cone focus and head ring](adr/0008-cone-focus-and-head-ring.md)
|
- [ADR-0008: Cone focus and focus circle](adr/0008-cone-focus-and-head-ring.md)
|
||||||
- [ADR-0009: Radial action menu](adr/0009-radial-action-menu.md)
|
- [ADR-0009: Radial action menu](adr/0009-radial-action-menu.md)
|
||||||
- [ADR-0010: Procedural NPC presentation](adr/0010-procedural-npc-presentation.md)
|
- [ADR-0010: Procedural NPC presentation](adr/0010-procedural-npc-presentation.md)
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 1004 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 1000 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 954 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 910 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 971 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 1.2 MiB |
@@ -8,7 +8,7 @@ config_version=5
|
|||||||
|
|
||||||
config/name="Step Line"
|
config/name="Step Line"
|
||||||
config/description="Workplace security simulation about observation, access verification, and proportionate escalation."
|
config/description="Workplace security simulation about observation, access verification, and proportionate escalation."
|
||||||
config/version="0.2.7"
|
config/version="0.2.12"
|
||||||
run/main_scene="res://scenes/main.tscn"
|
run/main_scene="res://scenes/main.tscn"
|
||||||
config/features=PackedStringArray("4.3", "GL Compatibility")
|
config/features=PackedStringArray("4.3", "GL Compatibility")
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ extends Node
|
|||||||
const SAMPLE_RATE := 22050.0
|
const SAMPLE_RATE := 22050.0
|
||||||
|
|
||||||
var _players: Array[AudioStreamPlayer] = []
|
var _players: Array[AudioStreamPlayer] = []
|
||||||
|
var _bed_player: AudioStreamPlayer = null
|
||||||
|
## Observable state so headless tests and the HUD can see what was requested.
|
||||||
|
var crowd_level: float = 0.0
|
||||||
|
var bed_playing := false
|
||||||
|
var radio_crackles := 0
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
# Pre-create a few players so overlapping cues don't cut each other off.
|
# Pre-create a few players so overlapping cues don't cut each other off.
|
||||||
@@ -30,6 +35,43 @@ func play_escalation(level: int) -> void:
|
|||||||
var freq := 440.0 - float(level) * 40.0
|
var freq := 440.0 - float(level) * 40.0
|
||||||
_play_tone(maxf(freq, 180.0), 0.18, 0.6)
|
_play_tone(maxf(freq, 180.0), 0.18, 0.6)
|
||||||
|
|
||||||
|
## Start the looping crowd bed (low murmur). Called once per shift; safe to call
|
||||||
|
## again. Volume then follows `set_crowd_level`.
|
||||||
|
func start_crowd_bed() -> void:
|
||||||
|
if _bed_player == null:
|
||||||
|
_bed_player = AudioStreamPlayer.new()
|
||||||
|
_bed_player.name = "CrowdBed"
|
||||||
|
add_child(_bed_player)
|
||||||
|
_bed_player.stream = _build_crowd_stream()
|
||||||
|
_bed_player.volume_db = _level_to_db(crowd_level)
|
||||||
|
_bed_player.play()
|
||||||
|
bed_playing = true
|
||||||
|
|
||||||
|
func stop_crowd_bed() -> void:
|
||||||
|
if _bed_player:
|
||||||
|
_bed_player.stop()
|
||||||
|
bed_playing = false
|
||||||
|
|
||||||
|
## Crowd mood (0..1) drives the bed volume: quiet when calm, louder when the
|
||||||
|
## street is agitated or panicking.
|
||||||
|
func set_crowd_level(mood: float) -> void:
|
||||||
|
crowd_level = clampf(mood, 0.0, 1.0)
|
||||||
|
if _bed_player:
|
||||||
|
_bed_player.volume_db = _level_to_db(crowd_level)
|
||||||
|
|
||||||
|
static func _level_to_db(mood: float) -> float:
|
||||||
|
return lerpf(-34.0, -12.0, clampf(mood, 0.0, 1.0))
|
||||||
|
|
||||||
|
## Radio open cue: a short burst of filtered crackle.
|
||||||
|
func play_radio_open() -> void:
|
||||||
|
radio_crackles += 1
|
||||||
|
_play_noise(0.09, 0.35)
|
||||||
|
|
||||||
|
## Radio close cue: a lower, shorter click.
|
||||||
|
func play_radio_close() -> void:
|
||||||
|
radio_crackles += 1
|
||||||
|
_play_noise(0.06, 0.25, 1400.0)
|
||||||
|
|
||||||
## Play a denial/error cue (low buzz).
|
## Play a denial/error cue (low buzz).
|
||||||
func play_deny() -> void:
|
func play_deny() -> void:
|
||||||
_play_tone(220.0, 0.20, 0.5)
|
_play_tone(220.0, 0.20, 0.5)
|
||||||
@@ -53,7 +95,64 @@ func _play_tone(freq: float, duration: float, volume: float, delay: float = 0.0)
|
|||||||
var sample := sin(TAU * freq * t) * 0.6
|
var sample := sin(TAU * freq * t) * 0.6
|
||||||
playback.push_frame(Vector2(sample, sample))
|
playback.push_frame(Vector2(sample, sample))
|
||||||
|
|
||||||
|
## Deterministic low murmur for the crowd bed: filtered noise plus a low drone.
|
||||||
|
func _build_crowd_stream() -> AudioStreamWAV:
|
||||||
|
const SECONDS := 4.0
|
||||||
|
var frames := int(SAMPLE_RATE * SECONDS)
|
||||||
|
var data := PackedByteArray()
|
||||||
|
data.resize(frames * 2)
|
||||||
|
var rng := RandomNumberGenerator.new()
|
||||||
|
rng.seed = 20261031
|
||||||
|
var smooth := 0.0
|
||||||
|
for i in frames:
|
||||||
|
var t := float(i) / SAMPLE_RATE
|
||||||
|
# Low-passed noise (a simple one-pole filter) sounds like distant talking.
|
||||||
|
smooth = lerpf(smooth, rng.randf_range(-1.0, 1.0), 0.02)
|
||||||
|
var drone := sin(TAU * 68.0 * t) * 0.25 + sin(TAU * 103.0 * t) * 0.12
|
||||||
|
var sample := (smooth * 2.2 + drone) * 0.35
|
||||||
|
var v := int(clampf(sample, -1.0, 1.0) * 32767.0)
|
||||||
|
data[i * 2] = v & 0xFF
|
||||||
|
data[i * 2 + 1] = (v >> 8) & 0xFF
|
||||||
|
var stream := AudioStreamWAV.new()
|
||||||
|
stream.format = AudioStreamWAV.FORMAT_16_BITS
|
||||||
|
stream.mix_rate = int(SAMPLE_RATE)
|
||||||
|
stream.stereo = false
|
||||||
|
stream.data = data
|
||||||
|
stream.loop_mode = AudioStreamWAV.LOOP_FORWARD
|
||||||
|
stream.loop_begin = 0
|
||||||
|
stream.loop_end = frames
|
||||||
|
return stream
|
||||||
|
|
||||||
|
## Short filtered noise burst used for the radio crackle.
|
||||||
|
func _play_noise(duration: float, volume: float, cutoff_hz: float = 3200.0) -> void:
|
||||||
|
var player := _free_player()
|
||||||
|
if player == null:
|
||||||
|
return
|
||||||
|
var frames := int(SAMPLE_RATE * duration)
|
||||||
|
var data := PackedByteArray()
|
||||||
|
data.resize(frames * 2)
|
||||||
|
var rng := RandomNumberGenerator.new()
|
||||||
|
rng.seed = 7
|
||||||
|
var smooth := 0.0
|
||||||
|
var alpha := clampf(cutoff_hz / SAMPLE_RATE, 0.01, 0.9)
|
||||||
|
for i in frames:
|
||||||
|
smooth = lerpf(smooth, rng.randf_range(-1.0, 1.0), alpha)
|
||||||
|
var env := 1.0 - float(i) / float(maxi(frames, 1))
|
||||||
|
var v := int(clampf(smooth * env, -1.0, 1.0) * 32767.0)
|
||||||
|
data[i * 2] = v & 0xFF
|
||||||
|
data[i * 2 + 1] = (v >> 8) & 0xFF
|
||||||
|
var stream := AudioStreamWAV.new()
|
||||||
|
stream.format = AudioStreamWAV.FORMAT_16_BITS
|
||||||
|
stream.mix_rate = int(SAMPLE_RATE)
|
||||||
|
stream.stereo = false
|
||||||
|
stream.data = data
|
||||||
|
player.stream = stream
|
||||||
|
player.volume_db = linear_to_db(volume)
|
||||||
|
player.play()
|
||||||
|
|
||||||
func _free_player() -> AudioStreamPlayer:
|
func _free_player() -> AudioStreamPlayer:
|
||||||
|
if _players.is_empty():
|
||||||
|
return null
|
||||||
for player in _players:
|
for player in _players:
|
||||||
if not player.playing:
|
if not player.playing:
|
||||||
return player
|
return player
|
||||||
|
|||||||
@@ -141,6 +141,9 @@ func _ready() -> void:
|
|||||||
_connect_crowd()
|
_connect_crowd()
|
||||||
|
|
||||||
_build_ui()
|
_build_ui()
|
||||||
|
# The HUD does not exist yet when settings are loaded, so push them again now
|
||||||
|
# that it does (otherwise the saved font scale is ignored until the next apply).
|
||||||
|
_apply_settings(player_settings)
|
||||||
_last_phase = -1
|
_last_phase = -1
|
||||||
_apply_phase_lighting()
|
_apply_phase_lighting()
|
||||||
# Boot into the venue menu; the shift starts when the player picks a venue.
|
# Boot into the venue menu; the shift starts when the player picks a venue.
|
||||||
@@ -233,6 +236,9 @@ func _reset_shift_state() -> void:
|
|||||||
## Begin (or resume) the shift clock and recapture the mouse.
|
## Begin (or resume) the shift clock and recapture the mouse.
|
||||||
func _start_shift() -> void:
|
func _start_shift() -> void:
|
||||||
_shift_running = true
|
_shift_running = true
|
||||||
|
if audio:
|
||||||
|
audio.start_crowd_bed()
|
||||||
|
audio.set_crowd_level(coordinator.crowd.mood)
|
||||||
coordinator.start()
|
coordinator.start()
|
||||||
if hud:
|
if hud:
|
||||||
hud.set_shift_state(coordinator, selected_scenario)
|
hud.set_shift_state(coordinator, selected_scenario)
|
||||||
@@ -322,6 +328,8 @@ func _build_ui() -> void:
|
|||||||
radio_panel.submitted.connect(_on_radio_submitted)
|
radio_panel.submitted.connect(_on_radio_submitted)
|
||||||
radio_panel.cancelled.connect(func():
|
radio_panel.cancelled.connect(func():
|
||||||
radio_panel.hide()
|
radio_panel.hide()
|
||||||
|
if audio:
|
||||||
|
audio.play_radio_close()
|
||||||
hud.set_action_hint("")
|
hud.set_action_hint("")
|
||||||
_refresh_freeze())
|
_refresh_freeze())
|
||||||
shift_review_panel = ShiftReview.new()
|
shift_review_panel = ShiftReview.new()
|
||||||
@@ -566,6 +574,8 @@ func _connect_crowd() -> void:
|
|||||||
func _on_crowd_changed(payload: Dictionary) -> void:
|
func _on_crowd_changed(payload: Dictionary) -> void:
|
||||||
var event_type := str(payload.get("event", ""))
|
var event_type := str(payload.get("event", ""))
|
||||||
var panic := bool(payload.get("panic", false))
|
var panic := bool(payload.get("panic", false))
|
||||||
|
if audio:
|
||||||
|
audio.set_crowd_level(float(payload.get("mood", 0.0)))
|
||||||
# Panic wins: people clear away from the entrance.
|
# Panic wins: people clear away from the entrance.
|
||||||
if panic or event_type == "crowd_panic":
|
if panic or event_type == "crowd_panic":
|
||||||
_flee_crowd()
|
_flee_crowd()
|
||||||
@@ -609,6 +619,8 @@ func _responder_profile() -> NpcProfile:
|
|||||||
|
|
||||||
func _on_shift_ended(review: Dictionary) -> void:
|
func _on_shift_ended(review: Dictionary) -> void:
|
||||||
_shift_running = false
|
_shift_running = false
|
||||||
|
if audio:
|
||||||
|
audio.stop_crowd_bed()
|
||||||
# Persist the finished shift locally (Save autoload, user:// JSON).
|
# Persist the finished shift locally (Save autoload, user:// JSON).
|
||||||
if Save:
|
if Save:
|
||||||
Save.save_shift_result(review)
|
Save.save_shift_result(review)
|
||||||
@@ -801,6 +813,8 @@ func _close_top_modal() -> bool:
|
|||||||
return true
|
return true
|
||||||
if radio_panel and radio_panel.visible:
|
if radio_panel and radio_panel.visible:
|
||||||
radio_panel.hide()
|
radio_panel.hide()
|
||||||
|
if audio:
|
||||||
|
audio.play_radio_close()
|
||||||
hud.set_action_hint("")
|
hud.set_action_hint("")
|
||||||
_refresh_freeze()
|
_refresh_freeze()
|
||||||
return true
|
return true
|
||||||
@@ -1126,9 +1140,13 @@ func _open_radio(emergency: bool) -> void:
|
|||||||
return
|
return
|
||||||
radio_panel.open(controller, emergency, current_npc_truth)
|
radio_panel.open(controller, emergency, current_npc_truth)
|
||||||
hud.set_action_hint("Fill in the radio report on screen.")
|
hud.set_action_hint("Fill in the radio report on screen.")
|
||||||
|
if audio:
|
||||||
|
audio.play_radio_open()
|
||||||
_refresh_freeze()
|
_refresh_freeze()
|
||||||
|
|
||||||
func _on_radio_submitted(report: Dictionary, emergency: bool) -> void:
|
func _on_radio_submitted(report: Dictionary, emergency: bool) -> void:
|
||||||
|
if audio:
|
||||||
|
audio.play_radio_close()
|
||||||
hud.set_action_hint("")
|
hud.set_action_hint("")
|
||||||
_refresh_freeze()
|
_refresh_freeze()
|
||||||
var result: Dictionary = coordinator.radio.request_emergency(report) if emergency else coordinator.radio.request_assistance(report)
|
var result: Dictionary = coordinator.radio.request_emergency(report) if emergency else coordinator.radio.request_assistance(report)
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ var _rig: Node3D = null
|
|||||||
var _head: Node3D = null
|
var _head: Node3D = null
|
||||||
var _bob_phase := 0.0
|
var _bob_phase := 0.0
|
||||||
var _guard_ref: Node3D = null
|
var _guard_ref: Node3D = null
|
||||||
var _ring: MeshInstance3D = null
|
var _focus_circle: MeshInstance3D = null
|
||||||
var _name_tag: Label3D = null
|
var _name_tag: Label3D = null
|
||||||
## Theater props and limbs for the idle poses (ADR-0010 rig).
|
## Theater props and limbs for the idle poses (ADR-0010 rig).
|
||||||
var _photo_prop: MeshInstance3D = null
|
var _photo_prop: MeshInstance3D = null
|
||||||
@@ -136,26 +136,29 @@ func _build_body(npc_type: int) -> void:
|
|||||||
_rig.add_child(_head)
|
_rig.add_child(_head)
|
||||||
_add_box_prop(_rig, Vector3(0.16, 0.08, 0.28), Vector3(-0.16, 0.05, 0.02), Color(0.12, 0.12, 0.14))
|
_add_box_prop(_rig, Vector3(0.16, 0.08, 0.28), Vector3(-0.16, 0.05, 0.02), Color(0.12, 0.12, 0.14))
|
||||||
_add_box_prop(_rig, Vector3(0.16, 0.08, 0.28), Vector3(0.16, 0.05, 0.02), Color(0.12, 0.12, 0.14))
|
_add_box_prop(_rig, Vector3(0.16, 0.08, 0.28), Vector3(0.16, 0.05, 0.02), Color(0.12, 0.12, 0.14))
|
||||||
_build_focus_ring()
|
_build_focus_circle()
|
||||||
_add_props(npc_type)
|
_add_props(npc_type)
|
||||||
|
|
||||||
func _build_focus_ring() -> void:
|
func _build_focus_circle() -> void:
|
||||||
_ring = MeshInstance3D.new()
|
_focus_circle = MeshInstance3D.new()
|
||||||
_ring.name = "FocusRing"
|
_focus_circle.name = "FocusCircle"
|
||||||
var torus := TorusMesh.new()
|
# Blue, semi-transparent disc floating in front of the face (ADR-0008).
|
||||||
torus.inner_radius = 0.26
|
# Billboarded so it always reads as a circle on screen.
|
||||||
torus.outer_radius = 0.34
|
var disc := CylinderMesh.new()
|
||||||
torus.rings = 12
|
disc.top_radius = 0.15
|
||||||
torus.ring_segments = 16
|
disc.bottom_radius = 0.15
|
||||||
_ring.mesh = torus
|
disc.height = 0.001
|
||||||
|
disc.radial_segments = 24
|
||||||
|
_focus_circle.mesh = disc
|
||||||
var mat := StandardMaterial3D.new()
|
var mat := StandardMaterial3D.new()
|
||||||
mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
|
mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
|
||||||
mat.albedo_color = Color(0.95, 0.82, 0.28, 0.9)
|
mat.albedo_color = Color(0.25, 0.55, 1.0, 0.45)
|
||||||
mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
|
mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
|
||||||
_ring.material_override = mat
|
mat.billboard_mode = BaseMaterial3D.BILLBOARD_ENABLED
|
||||||
_ring.position = Vector3(0, 0.28, 0)
|
_focus_circle.material_override = mat
|
||||||
_ring.visible = false
|
_focus_circle.position = Vector3(0, 0, 0.30)
|
||||||
_head.add_child(_ring)
|
_focus_circle.visible = false
|
||||||
|
_head.add_child(_focus_circle)
|
||||||
_name_tag = Label3D.new()
|
_name_tag = Label3D.new()
|
||||||
_name_tag.name = "NameTag"
|
_name_tag.name = "NameTag"
|
||||||
_name_tag.text = npc.profile.display_name if npc and npc.profile else ""
|
_name_tag.text = npc.profile.display_name if npc and npc.profile else ""
|
||||||
@@ -168,12 +171,12 @@ func _build_focus_ring() -> void:
|
|||||||
_head.add_child(_name_tag)
|
_head.add_child(_name_tag)
|
||||||
|
|
||||||
func set_focus_visual(focused: bool, menu_open: bool = false) -> void:
|
func set_focus_visual(focused: bool, menu_open: bool = false) -> void:
|
||||||
if _ring:
|
if _focus_circle:
|
||||||
_ring.visible = focused
|
_focus_circle.visible = focused
|
||||||
var mat := _ring.material_override as StandardMaterial3D
|
var mat := _focus_circle.material_override as StandardMaterial3D
|
||||||
if mat:
|
if mat:
|
||||||
mat.albedo_color = Color(1.0, 0.92, 0.35, 1.0) if menu_open else Color(0.95, 0.82, 0.28, 0.85)
|
mat.albedo_color = Color(0.35, 0.65, 1.0, 0.7) if menu_open else Color(0.25, 0.55, 1.0, 0.45)
|
||||||
_ring.scale = Vector3.ONE * (1.15 if menu_open else 1.0)
|
_focus_circle.scale = Vector3.ONE * (1.15 if menu_open else 1.0)
|
||||||
if _name_tag:
|
if _name_tag:
|
||||||
_name_tag.visible = focused
|
_name_tag.visible = focused
|
||||||
|
|
||||||
@@ -394,10 +397,7 @@ func _animate(delta: float) -> void:
|
|||||||
_bob_phase = 0.0
|
_bob_phase = 0.0
|
||||||
_rig.position.y = lerpf(_rig.position.y, 0.0, 0.2)
|
_rig.position.y = lerpf(_rig.position.y, 0.0, 0.2)
|
||||||
_rig.rotation.x = lerpf(_rig.rotation.x, 0.0, 0.2)
|
_rig.rotation.x = lerpf(_rig.rotation.x, 0.0, 0.2)
|
||||||
if _ring and _ring.visible:
|
# The focus circle billboards via its material; no per-frame look_at needed.
|
||||||
var cam := get_viewport().get_camera_3d() if get_viewport() else null
|
|
||||||
if cam:
|
|
||||||
_ring.look_at(cam.global_position, Vector3.UP)
|
|
||||||
# Attention cue: head turns toward the guard when awareness was raised.
|
# Attention cue: head turns toward the guard when awareness was raised.
|
||||||
if _head != null and npc.guard_noticed:
|
if _head != null and npc.guard_noticed:
|
||||||
if _guard_ref == null or not is_instance_valid(_guard_ref):
|
if _guard_ref == null or not is_instance_valid(_guard_ref):
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ var _debug_enabled := false
|
|||||||
var _log_lines: Array[String] = []
|
var _log_lines: Array[String] = []
|
||||||
var _cam_overlay: Control = null
|
var _cam_overlay: Control = null
|
||||||
var _body_camera_on := false
|
var _body_camera_on := false
|
||||||
|
var _font_scale := 1.0
|
||||||
|
var _base_font_sizes: Dictionary = {}
|
||||||
|
|
||||||
func _init() -> void:
|
func _init() -> void:
|
||||||
name = "HUD"
|
name = "HUD"
|
||||||
@@ -300,16 +302,20 @@ func is_body_camera_on() -> bool:
|
|||||||
return _body_camera_on
|
return _body_camera_on
|
||||||
|
|
||||||
## Scale the whole HUD text block (accessibility settings).
|
## Scale the whole HUD text block (accessibility settings).
|
||||||
|
## Resize HUD text by changing font sizes (not Control.scale, which overflows
|
||||||
|
## anchored labels and breaks the right-aligned layout).
|
||||||
func set_font_scale(scale: float) -> void:
|
func set_font_scale(scale: float) -> void:
|
||||||
var clamped := clampf(scale, 0.75, 1.75)
|
var clamped := clampf(scale, 0.75, 1.75)
|
||||||
if top_label:
|
_font_scale = clamped
|
||||||
top_label.scale = Vector2(clamped, clamped)
|
var scaled: Array[Label] = [top_label, log_label, target_label, hint_label,
|
||||||
if log_label:
|
time_label, mode_label, escalation_label, radio_cooldown_label, debug_label]
|
||||||
log_label.scale = Vector2(clamped, clamped)
|
for label in scaled:
|
||||||
if target_label:
|
if label == null:
|
||||||
target_label.scale = Vector2(clamped, clamped)
|
continue
|
||||||
if hint_label:
|
if not _base_font_sizes.has(label):
|
||||||
hint_label.scale = Vector2(clamped, clamped)
|
_base_font_sizes[label] = label.get_theme_font_size("font_size")
|
||||||
|
var base: int = int(_base_font_sizes[label])
|
||||||
|
label.add_theme_font_size_override("font_size", maxi(8, int(round(float(base) * clamped))))
|
||||||
|
|
||||||
func _make_icon(texture: Texture2D) -> TextureRect:
|
func _make_icon(texture: Texture2D) -> TextureRect:
|
||||||
var tr := TextureRect.new()
|
var tr := TextureRect.new()
|
||||||
@@ -353,9 +359,18 @@ func set_action_hint(text: String) -> void:
|
|||||||
|
|
||||||
## Color-coded escalation feedback (PLAN.md: Polish and Accessibility).
|
## Color-coded escalation feedback (PLAN.md: Polish and Accessibility).
|
||||||
## Green → yellow → orange → red as the escalation level rises.
|
## Green → yellow → orange → red as the escalation level rises.
|
||||||
|
## Grayscale-safe escalation meter: filled/empty blocks plus the level number, so
|
||||||
|
## the cue does not rely on hue alone (accessibility).
|
||||||
|
static func escalation_meter(level: int) -> String:
|
||||||
|
var clamped := clampi(level, 0, 5)
|
||||||
|
var filled := ""
|
||||||
|
for i in 5:
|
||||||
|
filled += "#" if i < clamped else "-"
|
||||||
|
return "[%s] L%d/5" % [filled, clamped]
|
||||||
|
|
||||||
func set_escalation(level: int) -> void:
|
func set_escalation(level: int) -> void:
|
||||||
var name: String = Rules.LEVEL_NAMES.get(level, "Observation")
|
var name: String = Rules.LEVEL_NAMES.get(level, "Observation")
|
||||||
escalation_label.text = Strings.fmt("hud.escalation_prefix", [name])
|
escalation_label.text = "%s %s" % [Strings.fmt("hud.escalation_prefix", [name]), escalation_meter(level)]
|
||||||
var tint := Color(0.6, 0.9, 0.6)
|
var tint := Color(0.6, 0.9, 0.6)
|
||||||
match level:
|
match level:
|
||||||
Rules.Level.OBSERVATION, Rules.Level.SIMPLE_DETERRENCE:
|
Rules.Level.OBSERVATION, Rules.Level.SIMPLE_DETERRENCE:
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
extends SceneTree
|
||||||
|
## Audio smoke: starts a shift, verifies the crowd bed is playing and follows mood
|
||||||
|
## events, and that opening/closing the radio triggers crackle cues.
|
||||||
|
##
|
||||||
|
## Usage:
|
||||||
|
## godot --headless --path . --script res://src/test/smoke_audio.gd
|
||||||
|
## (Headless uses a dummy audio server; the calls must still be safe.)
|
||||||
|
|
||||||
|
const MAX_FRAMES := 900
|
||||||
|
|
||||||
|
var frame := 0
|
||||||
|
var gm: Node = null
|
||||||
|
var started := false
|
||||||
|
var step := 0
|
||||||
|
var failures: Array[String] = []
|
||||||
|
|
||||||
|
func _initialize() -> void:
|
||||||
|
root.size = Vector2i(1280, 720)
|
||||||
|
root.add_child(load("res://scenes/main.tscn").instantiate())
|
||||||
|
|
||||||
|
func _process(_delta: float) -> bool:
|
||||||
|
frame += 1
|
||||||
|
if gm == null:
|
||||||
|
gm = root.find_child("GameManager", true, false)
|
||||||
|
return false
|
||||||
|
if not started:
|
||||||
|
gm.call("_on_venue_selected", "hollywood_building")
|
||||||
|
started = true
|
||||||
|
return false
|
||||||
|
if frame > MAX_FRAMES:
|
||||||
|
_fail("timeout")
|
||||||
|
return true
|
||||||
|
if frame < 120:
|
||||||
|
return false
|
||||||
|
match step:
|
||||||
|
0:
|
||||||
|
_check(gm.audio.bed_playing, "the crowd bed is playing during the shift")
|
||||||
|
var before: float = gm.audio.crowd_level
|
||||||
|
gm.coordinator.crowd.apply_event("aggressive_behavior")
|
||||||
|
_check(gm.audio.crowd_level > before, "an aggressive event raises the bed level")
|
||||||
|
gm.coordinator.crowd.apply_event("emergency_responder")
|
||||||
|
_check(gm.audio.crowd_level > before, "the responder keeps it up")
|
||||||
|
step = 1
|
||||||
|
1:
|
||||||
|
if gm.npcs.is_empty():
|
||||||
|
return false
|
||||||
|
gm.call("_on_guard_target", gm.npcs[0])
|
||||||
|
var crackles: int = gm.audio.radio_crackles
|
||||||
|
gm.call("_open_radio", false)
|
||||||
|
_check(gm.audio.radio_crackles == crackles + 1, "opening the radio crackles once")
|
||||||
|
gm.call("_on_radio_submitted", {
|
||||||
|
"npc_id": gm.current_incident_npc_id,
|
||||||
|
"location": "entrance",
|
||||||
|
"description": "tourist",
|
||||||
|
"behavior": "standing",
|
||||||
|
"weapons_seen": false,
|
||||||
|
"danger_level": 1,
|
||||||
|
}, false)
|
||||||
|
_check(gm.audio.radio_crackles == crackles + 2, "closing the radio crackles once")
|
||||||
|
gm.coordinator.call("_finish_shift")
|
||||||
|
_check(not gm.audio.bed_playing, "the bed stops when the shift ends")
|
||||||
|
step = 2
|
||||||
|
2:
|
||||||
|
_finish()
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
|
||||||
|
func _check(condition: bool, message: String) -> void:
|
||||||
|
if condition:
|
||||||
|
print("ok: " + message)
|
||||||
|
else:
|
||||||
|
_fail(message)
|
||||||
|
|
||||||
|
func _fail(message: String) -> void:
|
||||||
|
failures.append(message)
|
||||||
|
_finish()
|
||||||
|
|
||||||
|
func _finish() -> void:
|
||||||
|
if failures.is_empty():
|
||||||
|
print("SMOKE OK: crowd bed and radio crackle")
|
||||||
|
quit(0)
|
||||||
|
else:
|
||||||
|
for message in failures:
|
||||||
|
printerr("SMOKE FAIL: " + message)
|
||||||
|
quit(1)
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
extends SceneTree
|
extends SceneTree
|
||||||
## Windowed smoke helper for the ADR-0007–0010 control pass (focus ring + action
|
## Windowed smoke helper for the ADR-0007–0010 control pass (focus circle + action
|
||||||
## wheel). Boots the real main scene, stages one NPC in front of the guard, opens
|
## wheel). Boots the real main scene, stages one NPC in front of the guard, opens
|
||||||
## the wheel, and saves two PNGs to user://screenshots/. Exits 1 if the focus or
|
## the wheel, and saves two PNGs to user://screenshots/. Exits 1 if the focus or
|
||||||
## radial state did not come up, so it can be used as a smoke check.
|
## radial state did not come up, so it can be used as a smoke check.
|
||||||
@@ -76,7 +76,7 @@ func _advance() -> void:
|
|||||||
(gm.guard.global_position as Vector3).y,
|
(gm.guard.global_position as Vector3).y,
|
||||||
(gm.targeted_npc.global_position as Vector3).y,
|
(gm.targeted_npc.global_position as Vector3).y,
|
||||||
])
|
])
|
||||||
_shoot("smoke-01-focus-ring.png")
|
_shoot("smoke-01-focus-circle.png")
|
||||||
gm.call("_open_radial")
|
gm.call("_open_radial")
|
||||||
state = 2
|
state = 2
|
||||||
state_frames = 0
|
state_frames = 0
|
||||||
@@ -127,7 +127,7 @@ func _fail(message: String) -> void:
|
|||||||
|
|
||||||
func _finish() -> void:
|
func _finish() -> void:
|
||||||
if failures.is_empty():
|
if failures.is_empty():
|
||||||
print("SMOKE OK: focus ring + action wheel opened and cancelled")
|
print("SMOKE OK: focus circle + action wheel opened and cancelled")
|
||||||
quit(0)
|
quit(0)
|
||||||
else:
|
else:
|
||||||
for message in failures:
|
for message in failures:
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
extends RefCounted
|
||||||
|
## Accessibility: escalation cues that survive grayscale (shape + level, not hue
|
||||||
|
## alone) and the HUD font scale from settings.
|
||||||
|
|
||||||
|
const Hud := preload("res://src/game/ui/hud.gd")
|
||||||
|
const Rules := preload("res://src/core/rules.gd")
|
||||||
|
|
||||||
|
func test_meter_shape_and_level() -> bool:
|
||||||
|
var a := TestUtils.check_eq(Hud.escalation_meter(0), "[-----] L0/5", "calm shows an empty meter")
|
||||||
|
var b := TestUtils.check_eq(Hud.escalation_meter(3), "[###--] L3/5", "three filled blocks at blocking")
|
||||||
|
var c := TestUtils.check_eq(Hud.escalation_meter(5), "[#####] L5/5", "emergency fills the meter")
|
||||||
|
var d := TestUtils.check_eq(Hud.escalation_meter(99), "[#####] L5/5", "levels clamp at 5")
|
||||||
|
var e := TestUtils.check_eq(Hud.escalation_meter(-2), "[-----] L0/5", "levels clamp at 0")
|
||||||
|
return a and b and c and d and e
|
||||||
|
|
||||||
|
func test_meter_is_not_hue_only() -> bool:
|
||||||
|
## Every level must differ in shape/text, independent of colour.
|
||||||
|
var seen: Array[String] = []
|
||||||
|
for level in 6:
|
||||||
|
var meter: String = Hud.escalation_meter(level)
|
||||||
|
if seen.has(meter):
|
||||||
|
return TestUtils.fail("levels %d and %d share a meter" % [level, seen.find(meter)])
|
||||||
|
seen.append(meter)
|
||||||
|
return TestUtils.check(seen.size() == 6, "all six levels have distinct meters")
|
||||||
|
|
||||||
|
func test_escalation_label_includes_meter_and_name() -> bool:
|
||||||
|
var hud: Node = Hud.new()
|
||||||
|
hud.set_escalation(Rules.Level.FORMAL_WARNING)
|
||||||
|
var text: String = hud.escalation_label.text
|
||||||
|
var a := TestUtils.check(text.contains("Formal Warning"), "label names the level")
|
||||||
|
var b := TestUtils.check(text.contains("[##---]"), "label shows the shape meter")
|
||||||
|
var c := TestUtils.check(text.contains("L2/5"), "label shows the numeric level")
|
||||||
|
hud.free()
|
||||||
|
return a and b and c
|
||||||
|
|
||||||
|
func test_font_scale_applies_to_core_labels() -> bool:
|
||||||
|
var hud: Node = Hud.new()
|
||||||
|
var base_top: int = hud.top_label.get_theme_font_size("font_size")
|
||||||
|
var base_log: int = hud.log_label.get_theme_font_size("font_size")
|
||||||
|
var base_esc: int = hud.escalation_label.get_theme_font_size("font_size")
|
||||||
|
var base_mode: int = hud.mode_label.get_theme_font_size("font_size")
|
||||||
|
hud.set_font_scale(1.4)
|
||||||
|
var a := TestUtils.check(hud.top_label.get_theme_font_size("font_size") > base_top, "top label grows")
|
||||||
|
var b := TestUtils.check(hud.log_label.get_theme_font_size("font_size") > base_log, "log grows")
|
||||||
|
var c := TestUtils.check(hud.escalation_label.get_theme_font_size("font_size") > base_esc, "escalation label grows")
|
||||||
|
var d := TestUtils.check(hud.mode_label.get_theme_font_size("font_size") > base_mode, "mode label grows")
|
||||||
|
# Scaling is by font size, not Control.scale, so anchored labels keep layout.
|
||||||
|
var e := TestUtils.check(is_equal_approx(hud.top_label.scale.x, 1.0), "labels are not Control-scaled")
|
||||||
|
hud.set_font_scale(9.0)
|
||||||
|
var capped: int = hud.top_label.get_theme_font_size("font_size")
|
||||||
|
var f := TestUtils.check(capped <= int(round(float(base_top) * 1.75)) + 1, "scale clamps at 1.75")
|
||||||
|
hud.free()
|
||||||
|
return a and b and c and d and e and f
|
||||||
|
|
||||||
|
func test_settings_font_scale_is_applied_after_ui_exists() -> bool:
|
||||||
|
## The HUD is created after settings load, so the manager must re-apply.
|
||||||
|
var src := FileAccess.get_file_as_string("res://src/game/game_manager.gd")
|
||||||
|
var a := TestUtils.check(src.contains("_apply_settings(player_settings)"), "settings are applied on boot")
|
||||||
|
var build_idx := src.find("_build_ui()")
|
||||||
|
var apply_idx := src.find("_apply_settings(player_settings)", build_idx)
|
||||||
|
var b := TestUtils.check(apply_idx > build_idx, "the second apply happens after the HUD is built")
|
||||||
|
var c := TestUtils.check(src.contains("hud.set_font_scale(float(settings.get("),
|
||||||
|
"settings drive the HUD font scale")
|
||||||
|
return a and b and c
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
extends RefCounted
|
||||||
|
## Audio feedback: a looping crowd bed that follows the crowd mood, and radio
|
||||||
|
## crackle on open/close. All procedural, no audio assets, headless-safe.
|
||||||
|
|
||||||
|
const AudioFeedback := preload("res://src/game/audio_feedback.gd")
|
||||||
|
const CrowdSystem := preload("res://src/core/crowd_system.gd")
|
||||||
|
|
||||||
|
func test_bed_volume_follows_mood() -> bool:
|
||||||
|
var quiet: float = AudioFeedback._level_to_db(0.0)
|
||||||
|
var loud: float = AudioFeedback._level_to_db(1.0)
|
||||||
|
var mid: float = AudioFeedback._level_to_db(0.5)
|
||||||
|
var a := TestUtils.check(quiet < -30.0, "a calm street keeps the bed quiet")
|
||||||
|
var b := TestUtils.check(loud > quiet, "panic raises the bed")
|
||||||
|
var c := TestUtils.check(mid > quiet and mid < loud, "the rise is gradual")
|
||||||
|
return a and b and c
|
||||||
|
|
||||||
|
func test_crowd_level_is_clamped() -> bool:
|
||||||
|
var audio: Node = AudioFeedback.new()
|
||||||
|
audio.set_crowd_level(-1.0)
|
||||||
|
var a := TestUtils.check_eq(audio.crowd_level, 0.0, "negative mood clamps to 0")
|
||||||
|
audio.set_crowd_level(3.0)
|
||||||
|
var b := TestUtils.check_eq(audio.crowd_level, 1.0, "over-unity mood clamps to 1")
|
||||||
|
audio.free()
|
||||||
|
return a and b
|
||||||
|
|
||||||
|
func test_crowd_stream_loops() -> bool:
|
||||||
|
var audio: Node = AudioFeedback.new()
|
||||||
|
var stream: AudioStreamWAV = audio._build_crowd_stream()
|
||||||
|
var a := TestUtils.check(stream != null, "a crowd stream is generated")
|
||||||
|
var b := TestUtils.check_eq(stream.loop_mode, AudioStreamWAV.LOOP_FORWARD, "the bed loops")
|
||||||
|
var c := TestUtils.check(stream.data.size() > 1000, "the bed has audio data")
|
||||||
|
var d := TestUtils.check(stream.data.size() == stream.loop_end * 2, "loop covers the whole buffer")
|
||||||
|
audio.free()
|
||||||
|
return a and b and c and d
|
||||||
|
|
||||||
|
func test_crowd_bed_is_headless_safe() -> bool:
|
||||||
|
# No tree, no audio server: none of these may crash.
|
||||||
|
var audio: Node = AudioFeedback.new()
|
||||||
|
audio.start_crowd_bed()
|
||||||
|
var a := TestUtils.check(audio.bed_playing, "start marks the bed as playing")
|
||||||
|
audio.set_crowd_level(0.78)
|
||||||
|
var b := TestUtils.check(is_equal_approx(audio.crowd_level, 0.78), "level is stored")
|
||||||
|
audio.stop_crowd_bed()
|
||||||
|
var c := TestUtils.check(not audio.bed_playing, "stop clears the playing flag")
|
||||||
|
audio.free()
|
||||||
|
return a and b and c
|
||||||
|
|
||||||
|
func test_radio_crackle_methods() -> bool:
|
||||||
|
var audio: Node = AudioFeedback.new()
|
||||||
|
audio.play_radio_open()
|
||||||
|
audio.play_radio_close()
|
||||||
|
var a := TestUtils.check_eq(audio.radio_crackles, 2, "open and close each count a crackle")
|
||||||
|
var b := TestUtils.check(audio._free_player() == null, "no players exist before _ready, and that is safe")
|
||||||
|
audio.free()
|
||||||
|
return a and b
|
||||||
|
|
||||||
|
func test_game_manager_wires_audio() -> bool:
|
||||||
|
var src := FileAccess.get_file_as_string("res://src/game/game_manager.gd")
|
||||||
|
var a := TestUtils.check(src.contains("audio.start_crowd_bed()"), "the bed starts with the shift")
|
||||||
|
var b := TestUtils.check(src.contains("audio.set_crowd_level(float(payload.get("),
|
||||||
|
"crowd events drive the bed")
|
||||||
|
var c := TestUtils.check(src.contains("audio.stop_crowd_bed()"), "the bed stops at shift end")
|
||||||
|
var d := TestUtils.check(src.contains("audio.play_radio_open()"), "opening the radio crackles")
|
||||||
|
var e := TestUtils.check(src.contains("audio.play_radio_close()"), "closing the radio crackles")
|
||||||
|
return a and b and c and d and e
|
||||||
|
|
||||||
|
func test_mood_events_reach_the_bed() -> bool:
|
||||||
|
## The bed level is fed from the same payload the crowd reactions use.
|
||||||
|
var crowd := CrowdSystem.new()
|
||||||
|
var seen: Array = []
|
||||||
|
crowd.changed.connect(func(_p): pass)
|
||||||
|
crowd.apply_event("aggressive_behavior")
|
||||||
|
seen.append(crowd.mood)
|
||||||
|
crowd.apply_event("emergency_responder")
|
||||||
|
seen.append(crowd.mood)
|
||||||
|
var a := TestUtils.check(seen[1] > seen[0], "mood rises with a responder arrival")
|
||||||
|
crowd = null
|
||||||
|
return a
|
||||||
@@ -16,8 +16,17 @@ HOST="${HOST:-https://git.allucanget.biz}"
|
|||||||
VERSION="${1:-$(grep -oP 'config/version="\K[^"]+' project.godot)}"
|
VERSION="${1:-$(grep -oP 'config/version="\K[^"]+' project.godot)}"
|
||||||
TAG="v$VERSION"
|
TAG="v$VERSION"
|
||||||
|
|
||||||
|
# AUTH is a curl argument list. Populated by the first available method:
|
||||||
|
# 1. GITEA_TOKEN explicit token (repo secret in CI)
|
||||||
|
# 2. GITEA_AUTH_HEADER a ready-made "Authorization: ..." header
|
||||||
|
# 3. ~/.git-credentials basic auth for HOST
|
||||||
|
# 4. the checkout's git extraheader (Gitea Actions runners inject one for the
|
||||||
|
# job; this is what makes tag builds publish without any repo secret)
|
||||||
|
AUTH=()
|
||||||
if [[ -n "${GITEA_TOKEN:-}" ]]; then
|
if [[ -n "${GITEA_TOKEN:-}" ]]; then
|
||||||
AUTH=("Authorization: token $GITEA_TOKEN")
|
AUTH=(-H "Authorization: token $GITEA_TOKEN")
|
||||||
|
elif [[ -n "${GITEA_AUTH_HEADER:-}" ]]; then
|
||||||
|
AUTH=(-H "$GITEA_AUTH_HEADER")
|
||||||
elif [[ -f "$HOME/.git-credentials" ]]; then
|
elif [[ -f "$HOME/.git-credentials" ]]; then
|
||||||
CRED="$(python3 -c "
|
CRED="$(python3 -c "
|
||||||
import os
|
import os
|
||||||
@@ -28,8 +37,23 @@ for l in open(os.path.expanduser('~/.git-credentials')):
|
|||||||
echo "error: no credentials for $HOST in ~/.git-credentials" >&2
|
echo "error: no credentials for $HOST in ~/.git-credentials" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
# curl basic auth. (Previously only CRED was set, so ${AUTH[@]} was unbound
|
||||||
echo "error: set GITEA_TOKEN or provide ~/.git-credentials" >&2
|
# under `set -u` and every API call failed silently.)
|
||||||
|
AUTH=(-u "$CRED")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${#AUTH[@]} -eq 0 ]]; then
|
||||||
|
# Gitea Actions: actions/checkout configures a local extraheader with the
|
||||||
|
# runner's credentials. Reuse it for the API (the same server, so the header is
|
||||||
|
# valid for $HOST too).
|
||||||
|
GIT_HEADER="$(git config --local --get-regexp '^http\..*\.extraheader$' 2>/dev/null | head -n1 | cut -d' ' -f2- || true)"
|
||||||
|
if [[ -n "${GIT_HEADER:-}" ]]; then
|
||||||
|
AUTH=(-H "$GIT_HEADER")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${#AUTH[@]} -eq 0 ]]; then
|
||||||
|
echo "error: no credentials. Set GITEA_TOKEN, GITEA_AUTH_HEADER, or provide ~/.git-credentials." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -75,8 +99,31 @@ for f in "${all_artifacts[@]}"; do
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "==> Uploading $(basename "$f")"
|
echo "==> Uploading $(basename "$f")"
|
||||||
curl -s -X POST "$API/$RELEASE_ID/assets" "${AUTH[@]}" -F "attachment=@$f" >/dev/null
|
# Fail loudly: a silent 4xx here used to leave a release with no artifacts while
|
||||||
|
# the job still reported success.
|
||||||
|
code="$(curl -sS -o /tmp/release-upload.json -w '%{http_code}' --retry 2 \
|
||||||
|
-X POST "$API/$RELEASE_ID/assets" "${AUTH[@]}" -F "attachment=@$f" || true)"
|
||||||
|
if [[ "$code" != "201" && "$code" != "200" ]]; then
|
||||||
|
echo "error: upload of $(basename "$f") failed with HTTP $code" >&2
|
||||||
|
cat /tmp/release-upload.json >&2 || true
|
||||||
|
echo "" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Verify the release actually carries the artifacts we just sent.
|
||||||
|
have="$(curl -sS "${AUTH[@]}" "$API/$RELEASE_ID" | python3 -c "
|
||||||
|
import sys, json
|
||||||
|
try:
|
||||||
|
d = json.load(sys.stdin)
|
||||||
|
except Exception:
|
||||||
|
print(0); raise SystemExit
|
||||||
|
print(len(d.get('assets', [])))" 2>/dev/null || echo 0)"
|
||||||
|
if [[ "${have:-0}" -lt "${#all_artifacts[@]}" ]]; then
|
||||||
|
echo "error: release has $have assets, expected ${#all_artifacts[@]}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Verified $have artifacts on the release"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Release live: $HOST/$REPO/releases/tag/$TAG"
|
echo "Release live: $HOST/$REPO/releases/tag/$TAG"
|
||||||
@@ -105,20 +105,20 @@ SCREENS = [
|
|||||||
"name": "targeting_npc",
|
"name": "targeting_npc",
|
||||||
"kind": "scene",
|
"kind": "scene",
|
||||||
"title": "Targeting an NPC",
|
"title": "Targeting an NPC",
|
||||||
"source": "README screenshot 02 · ADR-0008 cone focus + head ring",
|
"source": "README screenshot 02 · ADR-0008 cone focus + focus circle",
|
||||||
"ref": "02-targeting-npc.png",
|
"ref": "02-targeting-npc.png",
|
||||||
"description": "An approaching NPC is in the focus cone: a thin pale-gold "
|
"description": "An approaching NPC is in the focus cone: a blue "
|
||||||
"ring billboards around their head, a display name under "
|
"semi-transparent circle in front of their face, a display "
|
||||||
"the ring, and the HUD shows a target line with the "
|
"name under the circle, and the HUD shows a target line "
|
||||||
"interaction hint.",
|
"with the interaction hint.",
|
||||||
"prompt": (
|
"prompt": (
|
||||||
"Realistic 3D first-person game scene: a friendly pedestrian "
|
"Realistic 3D first-person game scene: a friendly pedestrian "
|
||||||
"standing on a city sidewalk, a thin pale-gold ring floating around "
|
"standing on a city sidewalk, a blue semi-transparent circle in front "
|
||||||
"their head as a game selection marker, a small name label under the "
|
"of their face as a game selection marker, a small name label under "
|
||||||
"ring, minimal HUD target text at the bottom, daytime"),
|
"the circle, minimal HUD target text at the bottom, daytime"),
|
||||||
"regions": [
|
"regions": [
|
||||||
(0.35, 0.15, 0.65, 0.60, "NPC in focus"),
|
(0.35, 0.15, 0.65, 0.60, "NPC in focus"),
|
||||||
(0.44, 0.10, 0.56, 0.16, "head ring"),
|
(0.44, 0.10, 0.56, 0.16, "face circle"),
|
||||||
(0.05, 0.85, 0.95, 0.95, "HUD: name + hint"),
|
(0.05, 0.85, 0.95, 0.95, "HUD: name + hint"),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||