Files
gig-line/Docs/Architecture/05_building_block_view.adoc
T
zwitschi 72705268b5 docs: arc42 architecture documentation for Gig Line
Populated from the arc42-template (EN/adoc) with project-specific content
across all 12 sections:

1.  Introduction and Goals — requirements overview, quality goals, stakeholders
2.  Architecture Constraints — technical (engine, collision, coordinates),
    organisational (squash-merge, visual review, provenance), conventions
3.  Context and Scope — business and technical context tables
4.  Solution Strategy — technology decisions, top-level decomposition,
    quality achievement approach
5.  Building Block View — Gameplay (6 C++ classes), Site (7 meshes + 7
    materials), Facades (9 buildings), Art Pipeline, QA & Review; Level 2
    white boxes for input flow and collision model
6.  Runtime View — walk, screenshot capture, QA self-test, build/import
    pipeline scenarios
7.  Deployment View — dev workstation and packaged build infrastructure
8.  Cross-cutting Concepts — coordinate system, collision model, lighting,
    materials, data provenance, QA harness
9.  Architecture Decisions — 7 ADRs (dynamic lighting, UE materials,
    C++ collision helper, grounded reset, core ticker, Y convention,
    headless Blender)
10. Quality Requirements — overview table + 7 measurable scenarios
11. Risks and Technical Debts — 5 risks, 2 debts with mitigations
12. Glossary — 16 domain-specific terms

Master document: Docs/Architecture/architecture.adoc
Config: Docs/Architecture/config.adoc
2026-11-08 13:08:35 +01:00

102 lines
4.6 KiB
Plaintext

ifndef::imagesdir[:imagesdir: ./images]
[[section-building-block-view]]
== Building Block View
=== Whitebox Overall System
The system decomposes into five top-level building blocks:
[cols="1,2" options="header"]
|===
| **Name** | **Responsibility**
| Gameplay | Player pawn, movement, camera, input bindings, HUD, game mode
| Site | Terrain, road, sidewalks, kerbs, crossing markings, site-level collision
| Façades | Hero façade (El Capitan), south block frontage, north-side buildings
| Art Pipeline | Blender models, geographic data, export scripts, import scripts
| QA & Review | Screenshot pipeline, self-test harness, visual review workflow
|===
==== Gameplay
C++ classes in `Game/GigLine/Source/GigLine/`:
[cols="1,2,1" options="header"]
|===
| Class | Responsibility | Key detail
| `AGigLineCharacter` | First-person player pawn | 1.75 m capsule, 4.5 m/s walk, Enhanced Input bindings, reset, pause, `-qaselftest` harness
| `AGigLineGameModeBase` | Sets game mode and HUD class | `HUDClass = AGigLineHUD`
| `AGigLineHUD` | ODbL attribution overlay | `DrawText` every frame, bottom-left
| `AGigLineNPCPerson` | NPC prefab (future) | Capsule + visible MPFB body, feet on Z 0
| `AGigLineShotActor` | Screenshot camera walker | Drives cameras in `-game` mode, `FScreenshotRequest`, quits
| `UGigLineAssetTools` | C++ collision helpers | `SetComplexCollisionAsSimple` on `StaticMesh` assets
|===
Input assets in `/Game/Input/`: `IA_Move`, `IA_MoveBack`, `IA_Strafe`, `IA_StrafeLeft`, `IA_Look`, `IA_Jump`, `IA_Reset`, `IA_Pause`, bound in `IMC_Default`.
==== Site
Static meshes and materials in `/Game/Hollywood/Site/`:
[cols="1,2" options="header"]
|===
| Asset | Role
| `Terrain_DEM` | Ground heightfield (complex-as-simple collision)
| `Road_Hollywood` | Carriageway surface (block-all collision)
| `Sidewalk_North`, `Sidewalk_South` | Pedestrian surfaces (block-all collision)
| `Kerb_North`, `Kerb_South` | Kerb edges
| `Crossing_Markings` | Zebra markings at signalised crossing
| `M_Asphalt`, `M_Concrete`, `M_KerbConcrete`, `M_Ground`, `M_RoadPaint`, `M_Stucco`, `M_FacadeStone` | Procedural materials (world-space-noise blend + roughness)
|===
==== Façades
[cols="1,2" options="header"]
|===
| Asset | Role
| `SM_HeroFacade` | El Capitan Entertainment Centre detailed façade
| `SM_ElCapitanTheatre`, `SM_Budget_6822`, `SM_Hollywood_6806`, `SM_Hollywood_6902`, `SM_Hollywood_6922`, `SM_LeeDrug_6800` | South block frontage (6 buildings)
| `SM_Madame_Tussauds`, `SM_TCL_Chinese_Theatre` | North-side buildings (within 50 m)
|===
==== Art Pipeline
Python scripts in `Tools/` drive the content pipeline:
[cols="1,2" options="header"]
|===
| Script group | Purpose
| `export_*`, `hero_facade_build` | Blender headless export (FBX)
| `ue_import_*`, `ue_hero_facade_import` | Unreal headless import + placement
| `ue_build_demo_map`, `ue_build_review_map` | Map assembly (lighting, meshes, player start)
| `ue_create_input_assets` | Enhanced Input actions + mapping context
| `render_screenshots.sh` | Screenshot capture pipeline
| `judge_screenshot.py` | Vision-model pre-check (optional)
|===
Source data: `Art/blender/` (`.blend` files), `Geo/` (OSM extracts, DEM, verification docs).
==== QA & Review
* `AGigLineShotActor` walks fixed cameras in `-game` mode, captures PNGs, and quits.
* `-qaselftest` switch on `AGigLineCharacter` runs a core-ticker harness: walk 2 s, reset, pause/unpause, ground transect — all PASS/FAIL logged.
* `Screenshots/` holds committed PNGs and `README.md` approval table.
=== Level 2
==== White Box Gameplay — Input Flow
. `AGigLineCharacter::SetupPlayerInputComponent` binds `IA_*` actions to `MoveForward`, `MoveBack`, `MoveStrafe`, `MoveLeft`, `Look`, `StartJump`/`StopJump`, `ResetToStart`, `TogglePause`.
. Movement delegates to `ApplyMove(Forward, Strafe)` → `AddMovementInput`.
. Look applies yaw/pitch scaled by `LookSensitivity` (Y invertable via `bInvertLookY`).
. `ResetToStart` teleports to `StartLocation` (captured on first grounded frame), clears velocity, resets control rotation.
. `TogglePause` toggles `APlayerController::SetPause`, swaps input mode between `FInputModeGameOnly` and `FInputModeUIOnly`, shows/hides mouse cursor.
==== White Box Site — Collision Model
* Every site mesh (road, sidewalks, kerbs, crossing) is `STATIC` with `BlockAll` collision.
* `Terrain_DEM` uses `CTF_UseComplexAsSimple` (forced by `UGigLineAssetTools` at build time, saved on the asset).
* The terrain corridor is carved to half-width 10.7 m around the road centreline so the player can walk the carriageway and both sidewalks.
* Ground Z: north sidewalk 395, road 366, south sidewalk 317 (3.94 m fall along the block, matching the DEM).