diff --git a/Docs/controls.md b/Docs/controls.md new file mode 100644 index 0000000..62c5a5e --- /dev/null +++ b/Docs/controls.md @@ -0,0 +1,36 @@ +# Controls (`0.1.0` walkable demo) + +Keyboard and mouse. The same list is shown in-game, bottom-right of the frame +(`AGigLineHUD`), and the packaged Linux build ships with these bindings. + +| Action | Key | Notes | +| --- | --- | --- | +| Move forward | `W` | 4 m/s walk | +| Move back | `S` | | +| Strafe right | `D` | | +| Strafe left | `A` | | +| Look | Mouse | Captured on launch; `Escape` releases it | +| Jump | `Space` | | +| Reset to start | `R` | Returns to the grounded spawn point | +| Pause / release mouse | `Escape` | Second press resumes and recaptures the mouse | + +## Notes + +- Movement is relative to where you are looking (controller yaw), so the capsule + stays upright on the sloped street. +- The mouse is captured on launch, so looking works without clicking first. + `Escape` toggles the capture as part of pause. +- Bindings are Enhanced Input actions in `/Game/Input` built by + `Tools/ue_create_input_assets.py`; the mapping context is `IMC_Default`. + +## Testing input without a physical keyboard + +`Tools/input_test.py` injects OS-level keyboard/mouse events through a virtual +`/dev/uinput` device (see `Tools/input_emulation.py`), e.g.: + +```bash +python3 Tools/input_test.py --sequence move:2,look:3 +``` + +It drives the focused game window exactly like real hardware, which is how the +controls were regression-tested on the packaged build. diff --git a/Docs/perf/0.1.0-packaged-hud-controls.png b/Docs/perf/0.1.0-packaged-hud-controls.png new file mode 100644 index 0000000..924b204 --- /dev/null +++ b/Docs/perf/0.1.0-packaged-hud-controls.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90d92165a956c0c6ce0b270ca9a5ec8182a701bc6917c18464b4fde3723491cc +size 1758723 diff --git a/Docs/release-checks.md b/Docs/release-checks.md index b590a02..813788a 100644 --- a/Docs/release-checks.md +++ b/Docs/release-checks.md @@ -41,7 +41,7 @@ Measured at 1440p on the development workstation: Bazzite, Ryzen 7 7700X, 64 GB | `0.1.0` | Collision and packaging | PASS — no blocking collision, no invisible walls, no seam gaps (see audit note) | `-qaselftest` on the packaged build, 2026-11-08 | 2026-11-08 | | `0.1.0` | 60 FPS at 1440p | PASS — 2.42 ms avg (414 fps), p99 3.01 ms at 2560×1440, TSR on, VSync off, no FG | `-qaselftest` perf capture, `Docs/perf/0.1.0-walk-frametimes.csv` | 2026-11-08 | | `0.1.0` | Fresh checkout build | PASS — clean clone of `main` (`4bc41e9`), `git lfs pull` + `check-lfs.sh` OK (130 LFS files), both `GigLineEditor` and `GigLine` targets built with the documented engine | `/tmp/fresh-check`, 2026-11-08 | 2026-11-08 | -| `0.1.0` | Packaged Linux build | — | — | — | +| `0.1.0` | Packaged Linux build | PASS — packaged Development build launches straight into DemoMap, no missing-asset/linker errors; controls shown in-game and in `Docs/controls.md` | `Docs/perf/0.1.0-packaged-hud-controls.png`, 2026-11-08 | 2026-11-08 | ## `0.1.0` — Placement vs references — record (2026-11-08) @@ -180,3 +180,25 @@ Engine/Build/BatchFiles/Linux/Build.sh GigLine Linux Development \ `-project=` argument. **Verdict: PASS.** + +## `0.1.0` — Packaged Linux build + documented controls — record (2026-11-08) + +**Package:** `RunUAT BuildCookRun … -platform=Linux -clientconfig=Development +-cook -build -stage -pak -archive -archivedirectory=/run/media/system/DATA/Builds/GigLineQA` +→ `EXIT=0` (Success). + +**Launch:** `./GigLine.sh -windowed` (plain, no map argument) → +`LogLoad: LoadMap: /Game/Hollywood/DemoMap?Name=Player` — the packaged game opens +the walkable demo directly (the default-map fix holds in a package, not just the +editor). No `LogLinker`/missing-asset/failed-to-find errors in the run. + +**Controls documented and shown in-game:** +- `Docs/controls.md` — full binding table (WASD, mouse look, Space, R, Esc) plus + how to test input headlessly. +- `AGigLineHUD` now draws a control legend bottom-right every frame: + "WASD move · Mouse look · Space jump · R reset · Esc pause". +- Verified in the packaged capture: the bottom-right text bbox is 426×12 px + (a single right-aligned line), attributed text bottom-left. Screenshot: + `Docs/perf/0.1.0-packaged-hud-controls.png`. + +**Verdict: PASS.** diff --git a/Game/GigLine/Source/GigLine/GigLineHUD.cpp b/Game/GigLine/Source/GigLine/GigLineHUD.cpp index 5dfcd64..f1c7593 100644 --- a/Game/GigLine/Source/GigLine/GigLineHUD.cpp +++ b/Game/GigLine/Source/GigLine/GigLineHUD.cpp @@ -26,4 +26,15 @@ void AGigLineHUD::DrawHUD() DrawText(AttributionLine, Ink, X, Y, nullptr, TextScale); DrawText(LicenceLine, Ink, X, Y + LineHeight, nullptr, TextScale * 0.82f); + + // Control legend, bottom-right (0.1.0 release check: controls shown in-game). + if (!ControlsLine.IsEmpty()) + { + float IgnoredW = 0.0f, ControlsH = 0.0f; + GetTextSize(ControlsLine, IgnoredW, ControlsH, nullptr, TextScale * 0.82f); + const float CX = Canvas->ClipX - MarginPx - IgnoredW; + const float CY = Canvas->ClipY - MarginPx - ControlsH; + DrawText(ControlsLine, Shadow, CX + 1.0f, CY + 1.0f, nullptr, TextScale * 0.82f); + DrawText(ControlsLine, Ink, CX, CY, nullptr, TextScale * 0.82f); + } } diff --git a/Game/GigLine/Source/GigLine/GigLineHUD.h b/Game/GigLine/Source/GigLine/GigLineHUD.h index 61d2c4d..adff4ec 100644 --- a/Game/GigLine/Source/GigLine/GigLineHUD.h +++ b/Game/GigLine/Source/GigLine/GigLineHUD.h @@ -28,6 +28,14 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Attribution") FString AttributionLine = TEXT("\u00A9 OpenStreetMap contributors"); + /** + * Control legend, shown bottom-right so the 0.1.0 demo documents its own + * controls in-game (release check: "controls documented in Docs/ and shown + * in-game"). Keep in sync with Docs/controls.md. + */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Controls") + FString ControlsLine = TEXT("WASD move \u00B7 Mouse look \u00B7 Space jump \u00B7 R reset \u00B7 Esc pause"); + /** Licence line, including where the licence can be read. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Attribution") FString LicenceLine = TEXT("Data \u00A9 OpenStreetMap contributors, ODbL 1.0 \u2014 openstreetmap.org/copyright"); diff --git a/TODO.md b/TODO.md index 34997ab..edd184f 100644 --- a/TODO.md +++ b/TODO.md @@ -106,7 +106,7 @@ The MPFB character asset is planned as the NPC template (see `ROADMAP.md`). Keep - [x] Commit and review the publication preparation changes before pushing. Initial publication commit: `101db3f`. - [x] Review ODbL obligations for each shipped derivative database or produced work before public release. **Done 2026-11-08** — full review recorded in `Docs/odbl-review.md`: the shipped streets/footprints/sidewalks are a Produced Work of the OpenStreetMap database; obligations held are on-screen attribution (`AGigLineHUD`), the ODbL link, and the committed source extract with provenance; share-alike applies to the data layer only (project code/art stay CC0). THIRD_PARTY_NOTICES and `Docs/licensing.md` updated. -### Release checks - active - 01a1b26b-3c94-707f-9665-2f6b4a79b564 (branch `package-controls-0.1.0`) +### Release checks - [x] Player can traverse both sides of the demo without falling through geometry. **Verified 2026-11-08:** Blender pre-check plus an in-engine swept transect (`-qaselftest`) over the north sidewalk, carriageway and south sidewalk from X -14900 to -9420 — 84 samples, 0 holes, ground Z 317..395 (sidewalk 395, road 366, south walk 317). The player spawns at Z 456 and stays there for the whole run (`fall=0`, single Z). - [x] Building placement, street scale, and site identity checked against references. **Done 2026-11-08:** rendered current DemoMap content, probed world-space geometry (road 24.3 m vs ref 20.9–25.9 m; sidewalk centreline offsets 12.5/13.2 vs ref 12.6/13.6 m; hero frontage 26.0 m, setback ~13 m vs ref 25.75/14.5 m; frontage + north buildings in verified OSM positions), recorded PASS + deliberate deviations (flat blockout surfaces → `0.1.4`, kerb upstand → `0.1.1`, kerb-flush ramps → `0.1.1`) in `Docs/release-checks.md`, and fixed the mis-aimed north-buildings camera (was 9.5 km west → 85% sky; now frames the buildings). Final human verdict pending on `Screenshots/demo/*`. @@ -114,7 +114,7 @@ The MPFB character asset is planned as the NPC template (see `ROADMAP.md`). Keep - [x] Remove TEMP QA diagnostics (`GigLine SIM` / `GigLine GROUND` log lines and the settle-timer log) from `GigLineCharacter.cpp` before the release tag, or gate them behind a cvar. **Done 2026-11-08:** SIM/GROUND probes were already removed in the input fix (PR #8); the remaining settle-timer + `GigLine IN:` input-setup logs are now gated behind the `gigline.SetupLogs` cvar (default 0 in `DefaultEngine.ini [ConsoleVariables]`, re-enable at runtime). Verified on the packaged build: 0 setup-log lines, `-qaselftest` still all PASS. - [x] 60 FPS at 1440p on the dev workstation (Bazzite, Ryzen 7 7700X, 64 GB RAM, RTX 5070 Ti 16 GB) using a documented quality preset; record upscaling state; report performance without frame generation. **Measured 2026-11-08:** Epic preset, TSR on, VSync off, no frame gen — **2.42 ms avg (414 fps), p99 3.01 ms** at 2560×1440 over the fixed `-qaselftest` walk route; frame-time series in `Docs/perf/0.1.0-walk-frametimes.csv`, record in `Docs/release-checks.md`. - [x] Fresh project checkout builds with the documented external engine installation. **Verified 2026-11-08:** clean clone of `main` (`4bc41e9`) + `git lfs pull` (`check-lfs.sh` OK, 130 files); `GigLineEditor` (28.2 s) and `GigLine` (26.9 s) both `Result: Succeeded` with the documented engine path. Record in `Docs/release-checks.md`. -- [A] Package Linux build with documented controls. +- [x] Package Linux build with documented controls. **Verified 2026-11-08:** packaged Development build (`EXIT=0`) launches straight into `/Game/Hollywood/DemoMap`, no missing-asset/linker errors. Controls documented in `Docs/controls.md` and drawn in-game bottom-right by `AGigLineHUD` ("WASD move · Mouse look · Space jump · R reset · Esc pause"); evidence screenshot `Docs/perf/0.1.0-packaged-hud-controls.png`. - [ ] Tag `v0.1.0` and write `CHANGELOG.md` entry; then remove this section. ### Documentation