HUD and Height Changes

This commit is contained in:
2026-06-07 22:29:25 -07:00
parent 4ebaba9933
commit 1ed2aa46c5
41 changed files with 24787 additions and 766 deletions
@@ -1,7 +1,15 @@
---
date: 2026-06-03
type: session
tags: [session, input, controls, aiming, gamepad, netcode, presentation]
tags:
- session
- input
- controls
- aiming
- gamepad
- netcode
- presentation
permalink: gamevault/07-sessions/2026/2026-06-03-aim-controls-cursor-gamepad
---
# Session 2026-06-03 — Aim controls: mouse cursor + gamepad twin-stick
@@ -40,4 +48,4 @@ After the first pass landed and tested well, the operator asked to make KBM aimi
## Next
- Operator focused click-test of cursor aim + device switching; then consider ability-slot expansion or controller aim-assist tuning.
- Operator focused click-test of cursor aim + device switching; then consider ability-slot expansion or controller aim-assist tuning.
@@ -1,7 +1,14 @@
---
date: 2026-06-03
type: session
tags: [session, m6, core-loop, netcode, ghost-relevancy, design]
tags:
- session
- m6
- core-loop
- netcode
- ghost-relevancy
- design
permalink: gamevault/07-sessions/2026/2026-06-03-m6-aether-cycle-core-loop
---
# Session 2026-06-03 — M6 "The Aether Cycle": core-loop research, plan, and Stages 01
@@ -130,4 +137,4 @@ See [[DR-013_M6_Aether_Cycle_Region_Split]] for the full architecture + validate
## Next
Checkpoint for operator feedback on the working core-loop skeleton, then continue Stage 2 (resources + harvest)
— the gather half of the economy — followed by build placement (Stage 3) and persistence/goal (Stage 4).
— the gather half of the economy — followed by build placement (Stage 3) and persistence/goal (Stage 4).
@@ -1,7 +1,15 @@
---
date: 2026-06-03
type: session
tags: [session, cleanup, housekeeping, netcode, perf, vault, packages]
tags:
- session
- cleanup
- housekeeping
- netcode
- perf
- vault
- packages
permalink: gamevault/07-sessions/2026/2026-06-03-pre-m6-cleanup
---
# Session 2026-06-03 — Pre-M6 cleanup (loose ends before Build/Placement)
@@ -45,4 +53,4 @@ Inventory finding up front: the **code layer was already clean** — no open dec
## Next
- Start **M6 — Build/Placement** (server-authoritative grid placement via RPC) on the locked `BaseGridMath` coordinate space ([[DR-008_M5_HomeBase_BaseLayer_Storage]]).
- Start **M6 — Build/Placement** (server-authoritative grid placement via RPC) on the locked `BaseGridMath` coordinate space ([[DR-008_M5_HomeBase_BaseLayer_Storage]]).
@@ -1,7 +1,15 @@
---
date: 2026-06-04
type: session
tags: [session, core-loop, pacing, netcode, dev-tools, scenes, m8]
tags:
- session
- core-loop
- pacing
- netcode
- dev-tools
- scenes
- m8
permalink: gamevault/07-sessions/2026/2026-06-04-m8-persistent-base-player-driven-pacing
---
# Session 2026-06-04 — M8: Persistent base & player-driven pacing
@@ -61,4 +69,4 @@ Replaces the M6 **forced-timer treadmill** (Expedition 60s → Defend → Build
- **Build/automation/customization expansion** on the now-persistent base (the operator's stated next direction) — the ThreatDirector inert sources + the DR-014 structure tick fields are the additive hooks.
- Multi-client (MPPM) run of the co-op split-presence + dev-tools-over-a-real-connection (the unconditional RPC type is the enabler).
- Optional: base-integrity fail-state if losing a siege should have visible teeth.
- Optional: base-integrity fail-state if losing a siege should have visible teeth.
@@ -1,7 +1,15 @@
---
date: 2026-06-04
type: session
tags: [session, polish, backlog, testing, hygiene, netcode, audio]
tags:
- session
- polish
- backlog
- testing
- hygiene
- netcode
- audio
permalink: gamevault/07-sessions/2026/2026-06-04-polish-backlog-pass
---
# Session 2026-06-04 — Polish & Backlog-Clear Pass (Stages AG)
@@ -72,4 +80,4 @@ This log covers **Stages A, B, C, D, and E(audio)**. Stages AC were done on t
- **Polish stages AF are DONE + validated** (118 EditMode green; the one new netcode surface — `CycleState.WaveNumber` — proven server==client in Play; feel operator-approved; props reskinned + post verified).
- **Stage G done so far:** timed modifiers, knockback, attack telegraph (all validated). **Remaining:** the ranged **Spitter** (the large one — new `EnemySpitter` + new interpolated `EnemyProjectile` ghost prefabs + spit-fire/move/damage-vs-players systems; re-bake = new ghost TYPES, not an existing-ghost serializer change) and **multi-prefab abilities** (generalize the non-Burst `ProjectileClassificationSystem` to a ghost-type SET; core correctness — no owner-client double-spawn — is Play-only). Small fold-ins still open: standalone-server debug RPC, storage proximity-gate, pickup auto-grant (confirm intent).
- **Stage H** (rebindable controls + ability slots + ability icon/UI) and **Stage I** (thin-client/MPPM harness + operator-required live runs: two-build LAN co-op, live fire, standalone server perf — the standing ~1.251.75 ticks/frame question).
- **Stage H** (rebindable controls + ability slots + ability icon/UI) and **Stage I** (thin-client/MPPM harness + operator-required live runs: two-build LAN co-op, live fire, standalone server perf — the standing ~1.251.75 ticks/frame question).
@@ -1,7 +1,18 @@
---
date: 2026-06-05
type: session
tags: [session, frontend, menu, ui-toolkit, settings, saves, netcode, world-lifecycle, build, infra]
tags:
- session
- frontend
- menu
- ui-toolkit
- settings
- saves
- netcode
- world-lifecycle
- build
- infra
permalink: gamevault/07-sessions/2026/2026-06-05-game-infrastructure-menu-settings-saves
---
# Session 2026-06-05 — Game infrastructure: Main Menu, Settings, Saves foundation, Build wiring
@@ -79,4 +90,4 @@ The core change: adopt the Netcode **frontend pattern** — boot a menu with NO
## Next
- Operator: run the build + a real LAN join; then resume **M7 Automation** (the next milestone) or base/automation expansion on the now-buildable, persistent-save foundation.
- Operator: run the build + a real LAN join; then resume **M7 Automation** (the next milestone) or base/automation expansion on the now-buildable, persistent-save foundation.
@@ -1,7 +1,15 @@
---
date: 2026-06-05
type: session
tags: [session, hud, ui-toolkit, build-palette, presentation, uitk, juice]
tags:
- session
- hud
- ui-toolkit
- build-palette
- presentation
- uitk
- juice
permalink: gamevault/07-sessions/2026/2026-06-05-hud-rework-uitk-build-palette
---
# Session 2026-06-05 — HUD rework to UI Toolkit + build-palette HUD (click-to-place + ghost preview)
@@ -38,4 +46,4 @@ Converted the in-game HUD from code-built **uGUI** (`HudSystem`'s RawImage bars
- **Per-buildable icons** + a conveyor-facing arrow on the ghost (text-only palette + cube ghost today).
- **Throughput visuals** (item-on-belt) still need a small replicated field (server-only machine buffers don't reach the client).
- Remove the legacy IMGUI `ConnectionUI` "Net: Connected" label (backlog) — the only non-UITK on-screen UI left in-game.
- Optional: a one-line "BUILD: [name] • click to place, [/] rotate, Esc cancel" hint while in build mode; a build toggle key to open/close the palette focus.
- Optional: a one-line "BUILD: [name] • click to place, [/] rotate, Esc cancel" hint while in build mode; a build toggle key to open/close the palette focus.
@@ -1,7 +1,16 @@
---
date: 2026-06-05
type: session
tags: [session, m7, automation, production-chains, conveyor, persistence, netcode, determinism]
tags:
- session
- m7
- automation
- production-chains
- conveyor
- persistence
- netcode
- determinism
permalink: gamevault/07-sessions/2026/2026-06-05-m7-automation
---
# Session 2026-06-05 — M7 Automation: self-running production chains (Harvester → Conveyor → Fabricator)
@@ -46,4 +55,4 @@ Intake decisions (AskUserQuestion):
- **Build-palette HUD + ghost preview** + a conveyor-facing indicator (dev `[`/`]` rotate + H/F/C keys only today).
- **Relevancy ceiling:** `RegionRelevancySystem`'s O(structures×connections)/tick scan becomes load-bearing at higher conveyor counts (DR-014 ceiling note) — batch it when counts grow.
- **Recipe depth:** multi-input fabricator recipes; fabricator→conveyor output chaining (additive — give the fabricator a `MachineOutput`); per-machine distinct meshes (machines reuse the Turret mesh as a placeholder).
- **Operator live play-through** + a real 2-build LAN run to exercise the chain under latency (single-client validated).
- **Operator live play-through** + a real 2-build LAN run to exercise the chain under latency (single-client validated).
@@ -1,7 +1,16 @@
---
date: 2026-06-06
type: session
tags: [session, animation, rukhanka, synty, netcode, presentation, dots, slice]
tags:
- session
- animation
- rukhanka
- synty
- netcode
- presentation
- dots
- slice
permalink: gamevault/07-sessions/2026/2026-06-06-animation-pipeline-slice1
---
# Session 2026-06-06 — Animation pipeline (Rukhanka + Synty), Slice 1: the player is alive
@@ -45,4 +54,4 @@ Operator (via `/dots-dev`, ultracode): *"Explore animations for this DOTS projec
- Template the pipeline to **enemies** (Husk/Brute/Swarmer) — same flow, swap mesh + reuse `AC_PlayerTopDown` (or per-enemy clips).
- Source a **combat/hit-react/death** anim pack (Base Locomotion is locomotion-only; Death is a crouch placeholder; Fire has no clip yet).
- **Aim-IK** upper body toward the cursor (twin-stick), then ragdoll-on-death, bone-socket weapons, GPU engine + VAT for crowds.
- Operator live play-through to tune anim-speed scaling / blend thresholds / the 0.9 offset, and a 2-client MPPM check that remote players animate (the position-delta path).
- Operator live play-through to tune anim-speed scaling / blend thresholds / the 0.9 offset, and a 2-client MPPM check that remote players animate (the position-delta path).
@@ -1,7 +1,16 @@
---
date: 2026-06-06
type: session
tags: [session, cleanup, alignment, docs, refactor, hygiene, connectionui, uitk]
tags:
- session
- cleanup
- alignment
- docs
- refactor
- hygiene
- connectionui
- uitk
permalink: gamevault/07-sessions/2026/2026-06-06-cleanup-alignment
---
# Session 2026-06-06 — Cleanup & alignment (docs, dead code, refactor) before more development
@@ -50,4 +59,4 @@ No DR (hygiene pass). Reaffirmed conventions: edit `Assets/*.cs` only via MCP; `
## Next-session intent
- Resume feature work on the now-aligned, committed base. Candidate threads from the M7 follow-ups: throughput/belt visuals (one replicated byte), recipe depth (multi-input fabricator, fabricator→conveyor chaining), per-machine meshes; operator live play-through + a real 2-build LAN run.
- Optional code-tidy follow-ups (logged in [[Backlog]]) if churn budget allows.
- Optional code-tidy follow-ups (logged in [[Backlog]]) if churn budget allows.
@@ -1,7 +1,18 @@
---
date: 2026-06-06
type: session
tags: [session, animation, rukhanka, synty, enemies, netcode, presentation, dots, slice, inventory]
tags:
- session
- animation
- rukhanka
- synty
- enemies
- netcode
- presentation
- dots
- slice
- inventory
permalink: gamevault/07-sessions/2026/2026-06-06-enemy-animation-synty-inventory
---
# Session 2026-06-06 — Enemy animation (Rukhanka, client-derived), Slice 2 + Synty inventory
@@ -42,4 +53,4 @@ Operator (via `/dots-dev`, ultracode): *"Extend the animation system to encompas
- **Cyberpunk enemy faction** (PolygonSciFiCity) as new wave variants on this exact pipeline — one material + `EnemyRigTools` variant rows.
- Wire **PolygonParticleFX** (blood/gore/explosion) into `VFXConfig` for richer Husk-death VFX.
See [[DR-023_Enemy_Animation_MonsterMash]].
See [[DR-023_Enemy_Animation_MonsterMash]].
@@ -1,7 +1,16 @@
---
date: 2026-06-07
type: session
tags: [session, hud, ui-toolkit, synty, presentation, juice, build, dots]
tags:
- session
- hud
- ui-toolkit
- synty
- presentation
- juice
- build
- dots
permalink: gamevault/07-sessions/2026/2026-06-07-hud-synty-visual-pass
---
# Session 2026-06-07 — Expansive HUD visual pass (Synty sci-fi-soldier kit → UITK)
@@ -42,4 +51,4 @@ The in-game HUD (DR-021) was code-built UITK but flat-colour + system font + tex
## Next-session intent
- Eyeball the HUD at a true 1920 game-view (the narrow ~945 editor window overlaps vitals↔palette — resolution artifact, fine at target res).
- Confirm the conveyor-facing arrow's compass mapping vs the world placement ghost (a 1-line `FacingDegrees` offset if the arrow art's default vector differs); optional polish: cooldown radial, throughput visuals (needs a replicated machine field — DR-020 open).
- Confirm the conveyor-facing arrow's compass mapping vs the world placement ghost (a 1-line `FacingDegrees` offset if the arrow art's default vector differs); optional polish: cooldown radial, throughput visuals (needs a replicated machine field — DR-020 open).
@@ -0,0 +1,141 @@
---
date: 2026-08-08
type: session
tags:
- session
- physics
- collision
- character-controller
- enemy-ai
- hud
- uitk
- ui-scaling
permalink: gamevault/07-sessions/2026/2026-06-08-world-collision-hud-scaling
---
# Session 2026-06-08 — World collision (terrain bowl + landmarks + enemies) & HUD scaling
> Driven by `/dots-dev`. Two operator bugs after the [[DR-025_World_Environment_Redo_Natural_Frontier]] world
> redo: the player glides through the world, and the HUD is huge/overlapping in Play.
## Goal
Operator: *"Fix the colliders for the terrain — the player just glides through them and other stuff is in the
middle of things. Then fix the HUD scaling — in Play it's huge and overlapping; make it scale correctly for the
editor and in game."* Intake forks resolved (one `AskUserQuestion`): collision scope = **boundary ring + solid
landmarks** (low cover stays walkable); **enemies must collide too**.
## Root causes
- **Collision:** DR-025 made the whole world cosmetic classic-URP GameObjects with colliders stripped (inert to the
DOTS PhysicsWorld). The player CC sweeps only the baked `Gameplay` subscene, which held just **3 leftover test
colliders** (`Wall_North`/`Wall_East`/`Pillar_Center` — the pillar sat at the player spawn origin). Enemies move
by direct `LocalTransform` writes (physics-blind), so they phase through everything too.
- **HUD:** `RuntimePanelSettings.asset` was effectively **`ConstantPhysicalSize`** (the serialized `m_ScaleMode: 1`
is NOT ScaleWithScreenSize in this Unity version — see gotcha). At 96 dpi that renders the HUD at **1:1 pixels**,
so the `HudSystem.cs` layout (420px bars, 3052px fonts) filled a small Game-view (the 420px health bar spanned
the whole 420px-tall view → "huge and overlapping"). It never scaled with the screen at all.
## What was done
### World collision
- New **`Environment` physics layer** (slot 8). Unity Physics 1.x derives a baked collider's `BelongsTo` from the
GameObject layer; the default layer-collision matrix has Default (player) collide with it → **player blocked for
free, no player-authoring change**.
- New `WorldCollisionConfig{uint EnvironmentMask}` (Simulation) baked by `WorldCollisionAuthoring` (Authoring) from
`1u << LayerMask.NameToLayer("Environment")` — lets the Bursted server AI build a `CollisionFilter` without a
managed lookup or a hardcoded layer index. One instance dropped in the subscene.
- Into the **Gameplay subscene** (open-additive → build via `execute_code` → save → close): a **boundary ring**
per region (base r30 / 16 segs outside the ±16 32×32 build grid; expedition r52 / 24 segs at the cliff line) of
tangent box segments (15% overlap, no gaps), plus **landmark box colliders** on the solid interior structures
(warpgate, cabin, windmill, well, waterwheel; expedition artefact, rock arch, sign, survey tent). Low/flat cover
(flowers, bushes, grass, ground rocks) intentionally **left walkable**. Removed the 3 stale test colliders.
- **Enemy collide-and-slide** in `EnemyAISystem` (server-only, non-predicted → no rollback/desync risk; stays
`[BurstCompile]`): both the seek and knockback moves are now swept with `CollisionWorld.SphereCast`
(closest-hit, non-generic → Burst-safe) filtered to `CollidesWith = EnvironmentMask` (hits only the static world,
never the player collider or other Husks — they have no collider). On a hit: stop at the wall (skin gap) then
slide the remainder along the surface via the new pure, unit-tested `EnemyAIMath.SlideVelocity(vel, normal)`, with
a second short sweep so it can't tunnel a second wall. Sweep radius is a constant 0.5 (decoupled from the
`HitRadius` query so the EnemyAISystem EditMode tests, which build minimal Husks, keep matching).
- `ProjectM.Server.asmdef` gained a direct **`Unity.Physics`** reference (needed for the cast).
### HUD scaling
- `RuntimePanelSettings.asset`: set **`scaleMode = ScaleWithScreenSize`** (the actual fix), `referenceResolution =
1920×1080`, `screenMatchMode = MatchWidthOrHeight`, `match = 0.5` — **applied via the typed `PanelSettings` API**,
not a SerializedObject int (the enum int is non-standard, below). Shared by HUD + menus/pause/settings → all
screens consistent. Verified live: panelScale 0.453 on a 991×420 Game-view (logical 2190×928) — the HUD now ~45%
of its former on-screen size and proportional at any resolution.
- **First attempt was a false fix:** a SerializedObject write of `m_ScaleMode = 1` (assuming 1 = ScaleWithScreenSize)
left it on **ConstantPhysicalSize**. Caught by reading `ps.scaleMode` at runtime in Play, not by the asset YAML.
## Validation
- **EditMode 218/218** (214 prior + 4 new `SlideVelocity` tests). First run caught 3 EnemyAISystem-test regressions
from adding `RefRO<HitRadius>` to the query (test Husks lack it) → fixed by dropping it for a constant radius.
- **Play-mode (server world introspection):** `WorldCollisionConfig.EnvironmentMask == 256`; CollisionWorld has
**50 static bodies** + 1 dynamic (player). SphereCasts on the env filter hit the base ring at 28.7m, the cabin
landmark at 6.5m, and the expedition ring at 50.7m — the exact pipeline `EnemyAISystem` uses, proven live. No
console errors / no Burst ICE in Play.
- **HUD screenshot** at a wide aspect: banner/resources/palette/health all proportionate and readable (no longer
huge or overlapping). At 16:9 the corner panels separate further.
## Gotchas / notes
- **`apply_text_edits` column math bit me twice** — guessed `endCol` values truncated lines (brace-balance validator
caught it) and an accidental `RefRO<LocalTransform>` swap. Lesson: use **full-line ranges** (start-of-line →
start-of-next-line) for multi-line replacements; let the validator + tests catch the rest.
- **Adding a component to a `SystemAPI.Query` tuple silently filters out entities that lack it** — broke 3 existing
tests whose minimal test entities didn't have `HitRadius`. Prefer a constant or a `ComponentLookup` HasComponent
check over widening a hot query when test fixtures build partial archetypes.
- `manage_scene save` saved the **active** (Game) scene, not the additively-opened Gameplay subscene — save the
subscene explicitly via `EditorSceneManager.SaveScene(GetSceneByName("Gameplay"))`.
- **`PanelSettings.m_ScaleMode` serialized int is NON-standard in Unity 6.4:** `ConstantPixelSize=0`,
**`ConstantPhysicalSize=1`**, **`ScaleWithScreenSize=2`** (confirmed by printing `(int)PanelScaleMode.*` at
runtime). Set scale mode via the **typed enum API** (`ps.scaleMode = PanelScaleMode.ScaleWithScreenSize`), never a
raw SerializedObject int — and **verify the live `ps.scaleMode` in Play**, not the asset YAML (the YAML int lies).
## Known limitation (future work)
Enemies collide-and-slide but have **no pathfinding** — they can briefly stall in concave corners (sparse bowl
arena makes this acceptable). A nav pass (flow-field / simple steering-around) is the follow-up if it reads badly.
## Follow-up — verticality / "bowl rim" pass (operator feedback)
Operator: *"if traversal of the terrain/rocks isn't going to be smooth, instead of laying them out create a clear
verticality visual gap where it's clear the player can't go above this — how do Riftbreaker / V Rising handle
height?"* Forks: **raised cliff/rock-rim bowl** + **clear interior scatter, keep landmarks**.
**Design principle (Riftbreaker / V Rising / They Are Billions / Diablo):** the playable area is **flat** — the
player never traverses terrain height. Height is used *only* as a hard, legible boundary: a clear vertical cliff
face that towers over the play plane so it unmistakably reads "can't go up there." Things are **flat = walkable**
or **clearly tall/vertical = blocked**, never the ambiguous middle. Our bug was exactly that middle — rocks/chunks
at ground level the player clipped through, plus an invisible wall in open grass.
**What was done (cosmetic re-dressing of both `Game.unity` biome roots, aligned to the existing colliders):**
- The base (Meadow) biome has **no vertical-wall prefab** (only 105×18 flat terrain *tiles*), so the rim is built
from the **arid `SM_Env_Rock_Cliff`** (22u tall, vertical) — grey rock ringing a green meadow = a natural
mountain basin. A **continuous wall ring** (40 front @ r33 + 22 offset backstop @ r37.5, deterministic LCG,
per-piece ground-snap via renderer-bounds, colliders stripped) sits just behind the boundary collider (r30); the
34 trees re-rung densely *in front* at r28; big rocks pushed to a hidden band r40; flat terrain tiles pushed to
distant backdrop r78. Interior = flat flower meadow + low cover + landmarks only.
- Expedition (Arid) already used native rock cliffs → rebuilt as a continuous wall (46 @ r55 + 26 @ r60); 69 big
rock/spike/arch/mound instances pushed to backdrop r70; outer outpost props pulled inside the wall (~r46) so the
landmark cluster stays visible; low cover (cactus/bramble/craters/bones/pebbles) left walkable.
- `LM_RockArch` collider removed from the subscene (its cosmetic moved to the backdrop → it would've been an
invisible interior wall). Boundary-ring + remaining landmark colliders unchanged and still aligned.
**Validation:** player-eye screenshots both regions show a clear towering rock basin around a clean flat interior
(no horizon gaps); in-Play the gameplay camera confirms HUD + bowl together; server CollisionWorld = 49 static
(50 1 rock arch) + 1 dynamic, base & expedition ring casts still hit. Console clean.
**Technique note:** to ring tall props as a continuous, gap-free wall — overlap two offset rows (front + half-phase
backstop), `LookRotation(outward)` per piece, deterministic LCG jitter on radius/yaw/scale, and **ground-snap each
piece by `groundY - rendererBounds.min.y`** (Synty pivots vary; never trust pivot=base). Verify by screenshotting
from *inside* the bowl looking out (`manage_camera` `view_position`/`view_target`) — watch the region center
(expedition is at x=1000, **z=0**; a z=1000 camera shoots empty desert).
## Next-session intent
Trigger a live siege wave to watch Husks slide along the base ring / landmarks under load; tune boundary radii and
landmark box sizes against the visual props if anything reads off; consider per-tree collision only if the walkable
gaps feel wrong.
@@ -2,6 +2,7 @@
title: CLAUDE.md Build-Gotchas Archive
type: reference
created: 2026-06-04
permalink: gamevault/meta/claude-build-gotchas-archive
---
# CLAUDE.md Build-Gotchas Archive
@@ -361,4 +362,4 @@ cosmetic classic-URP biomes in `Game.unity`; region-aware `WorldAtmosphereSystem
(mirrors `HudSystem.ExpeditionRegionXMin`). No ECS query, observe-only, `"Game"`-scene guarded so the menu isn't
restyled; knobs in a `WorldFeelConfig`-style MonoBehaviour with `SubsystemRegistration` static reset + null-safe
fallbacks. Zero sim/netcode impact (writes only global managed `RenderSettings`; `ClientSimulation` filter keeps
it off the server/headless world).
it off the server/headless world).