Skip to content

Size world health bars to the entity on screen - #2005

Merged
Noisemaker111 merged 2 commits into
betafrom
world-bar-scale
Oct 20, 2026
Merged

Noisemaker111 merged 2 commits into
betafrom
world-bar-scale

Conversation

@Noisemaker111

Copy link
Copy Markdown
Owner

Beacon Bastion's first wave read as a stack of red slabs: every raider, about 10 px tall from the top-down camera, carried a 112 px health bar.

  • shell/world/worldBarSamples.ts: each bar sample records pixels per metre at its anchor (one metre projected along the camera's right axis). worldBarSize paints the bar about 1.4 m wide at that scale, clamped to 28–112 px, with proportional height. Close third-person views still hit the old 112×10 cap. Caller-painted samples without a scale keep the old size.
  • Tests: near vs far actors, the clamp, unscaled samples; one existing assertion now accepts the new field. changes/world-bar-scale.md.

Verification

  • bun test packages/shell/src/world — 60 pass, 0 fail; check-types — pass; bun run gen — ok; ship:preflight — ok
  • Live, Beacon Bastion, same drive on each build (--click "Begin first assault" --wait 6000 --rpc sim_advance 30, using Fast-forward the simulation from drive RPCs #2004). Left is before, right is after. In both frames the raider models hadn't streamed in yet at the headless frame rate (that happens on the build without this change too), so compare the bars:

world-bars-ba


Generated by Claude Code

Bars were a fixed 112x10 px whatever the camera distance. Beacon Bastion's
top-down camera put a 112 px bar over every 10 px raider, so a wave read
as a stack of red slabs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RwsemkhoUGyeQkdkKFmUmw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RwsemkhoUGyeQkdkKFmUmw
@Noisemaker111
Noisemaker111 merged commit df41b19 into beta Oct 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants