Compare commits

..
1 Commits
Author SHA1 Message Date
zwitschi 6684d36739 Fix release publishing and add a CI token fallback
Full build / Import + headless tests (push) Successful in 26s
Full build / Full desktop build + optional release (push) Failing after 3m58s
Tag builds since v0.2.2 built all artifacts but never published a release:
- tools/publish_release.sh only assembled AUTH in the GITEA_TOKEN branch; the
  ~/.git-credentials branch set CRED and then used an unbound ${AUTH[@]} under
  `set -u`, so every API call failed and the job ended "could not create or find
  release". It now sets AUTH=(-u "$CRED").
- The repo has no GITEA_TOKEN secret and the runner has no git credentials, so the
  workflow now falls back to the built-in workflow token:
  GITEA_TOKEN: ${{ secrets.GITEA_TOKEN || github.token }}.

v0.2.9 was then built and published locally with all five artifacts (portable
Linux/Windows/macOS, NSIS installer, AppImage) and the release page verified via
the API. v0.2.4-v0.2.8 remain unpublished; they are superseded by the latest.

Docs
- docs/RELEASING.md records the incident and the local-publish fallback.
- TODO gains a release-pipeline follow-up (verify CI on the next tag).
- MEMORY notes the root cause, the missing secret, and which releases exist.
- Version 0.2.10.
2026-10-31 21:23:09 +01:00
16 changed files with 110 additions and 85 deletions

No files matched your search

+5 -1
View File
@@ -113,7 +113,11 @@ jobs:
- name: Publish Gitea release (tags only)
if: startsWith(github.ref, 'refs/tags/')
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
# Prefer an explicit repo secret; otherwise fall back to the workflow's
# built-in token (Gitea provides `github.token`), which has write access
# to this repository. Without either, publish_release.sh has no
# credentials inside the runner and the step fails.
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN || github.token }}
VERSION: ${{ github.ref_name }}
run: |
chmod +x tools/publish_release.sh
+6 -16
View File
@@ -319,7 +319,7 @@ Completed in the working tree (uncommitted with the control pass). Headless **74
to the entrance.
- [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
(`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
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
ray skips building hits. `Tab` still cycles 12 m.
- [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`
`display_name`. HUD target line uses the display name, not the node name.
- [x] Billboarded blue circle in front of the face on `Rig/Head`; brighter while the radial is
open; `Label3D` `display_name`. HUD target line uses the display name, not the node name.
- [x] Screen-center crosshair.
### 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`
(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).
- [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.
- [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
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
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] 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.
- [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.
@@ -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.
The game boots into a live 900 s shift. `Save` declares `settings.json` and never uses it.
`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).
- [x] README controls table, smoke checklist, test count, and implemented/not-yet lists
refreshed for the control pass (77 tests).
- [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.
- [x] Eye contact as a Level 1 action (PLAN / glossary). Distinct from raise-hand. Add a
radial slice if it ships.
- [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.
`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
@@ -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.
Responder outcomes (`command` / `restraint` / `evacuation` / `arrest`) are log lines. PLAN also
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.
- [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.
@@ -499,7 +492,6 @@ 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.
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.
@@ -510,7 +502,6 @@ is in the working tree. Bodies still idle-stand at those spots.
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`.
@@ -521,6 +512,5 @@ Completed 2026-10-31 (working tree). Headless **134/134**; `src/test/smoke_audio
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.
+12 -3
View File
@@ -36,7 +36,7 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
`hud.controls` / `hud.screen_first` updated.
- 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.
`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
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),
@@ -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
`TRANSPARENCY_ALPHA_SCISSOR` unshaded material (`_skyline_mat`); steps + landing are a
`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).
- **PLAN verbs (2026-10-31, uncommitted):** the radial now has 12 slices
(`Stop, Look, Point, No, Ask, Inspect, Wand, Warn, Block, Reason, Recognize, Radio`).
@@ -135,7 +135,16 @@ Session memory for durable decisions, state, and gotchas. Keep concise, remove o
needs `mipmaps/generate=true`.
- **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.
- 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`). **v0.2.9 is the only release after v0.2.1**
(built and published locally, all five artifacts); v0.2.4–v0.2.8 tags have no release
artifacts. Verify the CI fallback on the next tag push. 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
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
+9 -9
View File
@@ -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.
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
@@ -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.
- 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.
- Idle focus: pale gold, 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.
- One ring at a time. Everyone else has none.
- Idle focus: blue, semi-transparent, modest size. Radial open on that person: brighter, slightly larger.
- 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 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
@@ -545,7 +545,7 @@ A doughnut / pie menu centered on the screen, opened on the focused person.
**Cancel**
- `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.
+5 -6
View File
@@ -28,8 +28,7 @@ The central design goal is simple:
**All releases:** <https://git.allucanget.biz/zwitschi/security-game/releases>
> **Latest: v0.2.9** — accessibility pass: grayscale-safe escalation meter and a working HUD font
> scale.
> **Latest: v0.2.10** — release pipeline fix (tag builds publish automatically again).
> Releases are built automatically when a `vX.Y.Z` tag is pushed
> (see [`docs/RELEASING.md`](docs/RELEASING.md)); manual builds use
> `./tools/build_releases.sh`. Installer/AppImage packaging runs in the same pipeline
@@ -236,7 +235,7 @@ godot --headless --path . --script res://src/test/test_runner.gd
# Save a screenshot to user:// (windowed)
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
# Session-shell smoke: menu → shift → pause → settings → menu (headless or windowed)
@@ -311,9 +310,9 @@ Implemented so far:
- 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
- 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
- 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
- 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)
@@ -340,7 +339,7 @@ Not yet implemented: live 3D body-camera replay, editor-based GUT integration, a
6. The skyline backdrop shows silhouettes against the sky, not an opaque black slab.
7. The `STEP LINE` marquee is readable from the sidewalk.
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.
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.
+10
View File
@@ -25,6 +25,16 @@ Verified via API+host credentials (2026-10-31):
anonymous browsing/downloads redirect to login. Host admin: `REQUIRE_SIGNIN_VIEW = false`
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).
- [ ] Verify the fallback on the next tag push produces a release automatically.
- [ ] 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
- [ ] Keep `%` placeholders stable in `Strings.fmt` when adding keys (positional formatting).
+12 -2
View File
@@ -37,8 +37,18 @@ The repository ships a Gitea Actions workflow (`.gitea/workflows/build.yml`):
Linux/Windows/macOS, artifact upload, and — on tags — release publication via
`tools/publish_release.sh`.
For tag builds, set a repo secret named **`GITEA_TOKEN`** (write:repository scope).
Without it the workflow still builds and tests, but the release publish step fails.
For tag builds the workflow uses `GITEA_TOKEN` (write:repository scope) or, when the
secret is absent, falls back to the workflow's built-in `github.token`. Either is
enough for the publish step; with neither, the build succeeds but no release is
created.
> **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
> `actions/cache` times out against GitHub's cache API. We dropped it (Godot import
+5 -5
View File
@@ -1,4 +1,4 @@
# ADR-0008: Cone focus and head ring
# ADR-0008: Cone focus and focus circle
- **Status:** Accepted
- **Date:** TBD
@@ -19,7 +19,7 @@ Focus is a **cone**, not a ray.
- A few frames of grace keep walk-bob from dropping focus.
- `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.
@@ -28,19 +28,19 @@ The world must not show the internal type name (`Trespasser`, `Violent Threat`).
### Positive
- 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.
- The action menu (ADR-0009) has a clear subject.
### Negative
- 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.
## Alternatives considered
- **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.
- **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.
+2 -2
View File
@@ -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.
**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.
@@ -54,7 +54,7 @@ Number keys `1`–`6` may remain as shortcuts when the wheel is closed, so exist
## 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.
- **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.
- **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.
+2 -2
View File
@@ -21,7 +21,7 @@ Make the body read as a person at conversation distance:
- Shoes.
- Hair cap whose color comes from the visual seed.
- 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.
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.
- **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.
+1 -1
View File
@@ -153,7 +153,7 @@ Architecture decisions are recorded as ADRs:
- [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-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-0010: Procedural NPC presentation](adr/0010-procedural-npc-presentation.md)
+1 -1
View File
@@ -8,7 +8,7 @@ config_version=5
config/name="Step Line"
config/description="Workplace security simulation about observation, access verification, and proportionate escalation."
config/version="0.2.9"
config/version="0.2.10"
run/main_scene="res://scenes/main.tscn"
config/features=PackedStringArray("4.3", "GL Compatibility")
+25 -25
View File
@@ -89,7 +89,7 @@ var _rig: Node3D = null
var _head: Node3D = null
var _bob_phase := 0.0
var _guard_ref: Node3D = null
var _ring: MeshInstance3D = null
var _focus_circle: MeshInstance3D = null
var _name_tag: Label3D = null
## Theater props and limbs for the idle poses (ADR-0010 rig).
var _photo_prop: MeshInstance3D = null
@@ -136,26 +136,29 @@ func _build_body(npc_type: int) -> void:
_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))
_build_focus_ring()
_build_focus_circle()
_add_props(npc_type)
func _build_focus_ring() -> void:
_ring = MeshInstance3D.new()
_ring.name = "FocusRing"
var torus := TorusMesh.new()
torus.inner_radius = 0.26
torus.outer_radius = 0.34
torus.rings = 12
torus.ring_segments = 16
_ring.mesh = torus
func _build_focus_circle() -> void:
_focus_circle = MeshInstance3D.new()
_focus_circle.name = "FocusCircle"
# Blue, semi-transparent disc floating in front of the face (ADR-0008).
# Billboarded so it always reads as a circle on screen.
var disc := CylinderMesh.new()
disc.top_radius = 0.15
disc.bottom_radius = 0.15
disc.height = 0.001
disc.radial_segments = 24
_focus_circle.mesh = disc
var mat := StandardMaterial3D.new()
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
_ring.material_override = mat
_ring.position = Vector3(0, 0.28, 0)
_ring.visible = false
_head.add_child(_ring)
mat.billboard_mode = BaseMaterial3D.BILLBOARD_ENABLED
_focus_circle.material_override = mat
_focus_circle.position = Vector3(0, 0, 0.30)
_focus_circle.visible = false
_head.add_child(_focus_circle)
_name_tag = Label3D.new()
_name_tag.name = "NameTag"
_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)
func set_focus_visual(focused: bool, menu_open: bool = false) -> void:
if _ring:
_ring.visible = focused
var mat := _ring.material_override as StandardMaterial3D
if _focus_circle:
_focus_circle.visible = focused
var mat := _focus_circle.material_override as StandardMaterial3D
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)
_ring.scale = Vector3.ONE * (1.15 if menu_open else 1.0)
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)
_focus_circle.scale = Vector3.ONE * (1.15 if menu_open else 1.0)
if _name_tag:
_name_tag.visible = focused
@@ -394,10 +397,7 @@ func _animate(delta: float) -> void:
_bob_phase = 0.0
_rig.position.y = lerpf(_rig.position.y, 0.0, 0.2)
_rig.rotation.x = lerpf(_rig.rotation.x, 0.0, 0.2)
if _ring and _ring.visible:
var cam := get_viewport().get_camera_3d() if get_viewport() else null
if cam:
_ring.look_at(cam.global_position, Vector3.UP)
# The focus circle billboards via its material; no per-frame look_at needed.
# Attention cue: head turns toward the guard when awareness was raised.
if _head != null and npc.guard_noticed:
if _guard_ref == null or not is_instance_valid(_guard_ref):
+3 -3
View File
@@ -1,5 +1,5 @@
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
## 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.
@@ -76,7 +76,7 @@ func _advance() -> void:
(gm.guard.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")
state = 2
state_frames = 0
@@ -127,7 +127,7 @@ func _fail(message: String) -> void:
func _finish() -> void:
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)
else:
for message in failures:
+3
View File
@@ -28,6 +28,9 @@ for l in open(os.path.expanduser('~/.git-credentials')):
echo "error: no credentials for $HOST in ~/.git-credentials" >&2
exit 1
fi
# curl basic auth. (Previously only CRED was set, so ${AUTH[@]} was unbound
# under `set -u` and every API call failed silently.)
AUTH=(-u "$CRED")
else
echo "error: set GITEA_TOKEN or provide ~/.git-credentials" >&2
exit 1
+9 -9
View File
@@ -105,20 +105,20 @@ SCREENS = [
"name": "targeting_npc",
"kind": "scene",
"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",
"description": "An approaching NPC is in the focus cone: a thin pale-gold "
"ring billboards around their head, a display name under "
"the ring, and the HUD shows a target line with the "
"interaction hint.",
"description": "An approaching NPC is in the focus cone: a blue "
"semi-transparent circle in front of their face, a display "
"name under the circle, and the HUD shows a target line "
"with the interaction hint.",
"prompt": (
"Realistic 3D first-person game scene: a friendly pedestrian "
"standing on a city sidewalk, a thin pale-gold ring floating around "
"their head as a game selection marker, a small name label under the "
"ring, minimal HUD target text at the bottom, daytime"),
"standing on a city sidewalk, a blue semi-transparent circle in front "
"of their face as a game selection marker, a small name label under "
"the circle, minimal HUD target text at the bottom, daytime"),
"regions": [
(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"),
],
},