Commit graph

2 commits

Author SHA1 Message Date
Erik
04c98be154 feat(overlay): surface Chat + Combat state in DebugOverlay + ship OpenAL-Soft native
Two visible wins that prove today's wire-layer work is actually doing
something:

1. Chat panel (bottom-left): live tail of the last 10 ChatLog entries.
   Color-coded by kind — Tell cyan, Channel green, System yellow, Popup
   red, local/ranged white. Bound to WorldSession via the existing
   GameEventWiring path (H.1) so server ChannelBroadcast / Tell /
   TransientString / Popup + HearSpeech all render live. Includes a
   synthetic \"connecting / connected\" system message so the panel
   isn't blank before anyone talks.

2. Event panel (bottom-right): last 8 combat events from CombatState
   (E.4). Damage taken (red), damage dealt (yellow), evaded-incoming
   (green), missed-outgoing (grey). Each entry fades out over 5s.
   DebugOverlay.BindCombat wires the listeners.

3. Silk.NET.OpenAL.Soft.Native 1.23.1 added. Before this, OpenAL
   managed bindings loaded but the native runtime was absent so
   IsAvailable returned false and audio was silently disabled. Now
   soft_oal.dll ships to runtimes/win-x64/native/ and the engine
   reports \"OpenAL engine ready (16 voices, 3D positional)\" on
   launch. Footsteps + other motion-hook sounds now audible.

GameWindow: after constructing DebugOverlay, assign .Chat + .Combat
and call BindCombat to hook the event stream.

Build green, 628 tests still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 23:11:50 +02:00
Erik
ff325abd7b feat(ui): debug overlay + refined input controls
Adds the first on-screen HUD for the dev client plus today's mouse-control
refinements. Also lands yesterday's scenery-alignment changes that were
left uncommitted in the working tree.

Overlay:
- BitmapFont rasterizes a system TTF via StbTrueTypeSharp into a 512x512
  R8 atlas at startup (Consolas on Windows, DejaVu/Menlo fallbacks)
- TextRenderer batches 2D quads in screen-space with ortho projection;
  one shader + two draw calls (rect then text) for panel backgrounds
  under glyphs
- DebugOverlay composes info / stats / compass / help panels on top of
  the 3D scene; toggles via F1/F4/F5/F6; transient toasts for key events
- DebugLineRenderer and its shaders (carried over from the scenery work)
  are properly committed in this commit

Controls:
- Per-mode mouse sensitivity (Chase 0.15, Fly 1.0, Orbit 1.0); F8/F9 to
  adjust the active mode multiplicatively (x1.2)
- Hold RMB to free-orbit the chase camera around the player; release
  stays at the new angle (no snap-back)
- Mouse-wheel zooms chase distance between 2m and 40m
- Chase pitch widened to [-0.7, 1.4] so mouse-Y tilts both ways from
  the default neutral angle

Scenery alignment (carried from yesterday's session):
- ShadowObjectRegistry AllEntriesForDebug + Scale field
- SceneryGenerator uses ACViewer's OnRoad polygon test + baseLoc +
  set_heading rotation
- BSPQuery dispatchers accept localToWorld so normals/offsets transform
  correctly per part
- TransitionTypes.CylinderCollision rewritten with wall-slide + push-out
- PhysicsDataCache caches visual-mesh AABB for scenery that lacks
  physics Setup bounds
2026-04-17 18:45:38 +02:00