Extract shared WebGL HUD framework from dungeon-crawler into @spikersoft/gl-hud library #922

Closed
opened 2026-08-06 01:03:29 +00:00 by spikerj · 2 comments
Owner

Per the direction that all game UI/UX must be native WebGL (no HTML/Angular overlays), extract the dungeon-crawler's in-scene HUD widget framework into a shared library so other games (starting with the space game's new options menu) can build on it.

Scope (spikersoft-angular):

  • New libraries/game/gl-hud via the workspace generator (@spikersoft/gl-hud, layer:game, scope:gaming)
  • Move framework core + generic widgets (~1,300 lines): hud-panel, hud-scene, hud-input, hud-text-input, hud-layout-manager, tooltip/prompt/message/context-menu/crosshair widgets, hud-shaders + their specs
  • Sever couplings: FONT_URL -> hud-theme.ts default, HUDLayoutManager storage key becomes required ctor param (dungeon keeps spikersoft_dc_hud_layout), drop dead hudT import
  • New hud-button.ts (extracted makeButton + hover tint helper) and HUDPanel.createBackdrop
  • dungeon-crawler/hud/index.ts becomes a re-export shim; intra-hud imports rewritten to the lib alias
  • hud-i18n and all game-specific panels stay in dungeon-crawler (lib ships zero i18n; widgets take pre-translated strings)

Follow-up (separate tickets): migrate space-game's ~20 hand-rolled HUDs onto the framework; port wasm-voxel/chess DOM UI to native GL.

Per the direction that all game UI/UX must be native WebGL (no HTML/Angular overlays), extract the dungeon-crawler's in-scene HUD widget framework into a shared library so other games (starting with the space game's new options menu) can build on it. Scope (spikersoft-angular): - New `libraries/game/gl-hud` via the workspace generator (`@spikersoft/gl-hud`, layer:game, scope:gaming) - Move framework core + generic widgets (~1,300 lines): hud-panel, hud-scene, hud-input, hud-text-input, hud-layout-manager, tooltip/prompt/message/context-menu/crosshair widgets, hud-shaders + their specs - Sever couplings: FONT_URL -> hud-theme.ts default, HUDLayoutManager storage key becomes required ctor param (dungeon keeps `spikersoft_dc_hud_layout`), drop dead hudT import - New `hud-button.ts` (extracted makeButton + hover tint helper) and `HUDPanel.createBackdrop` - dungeon-crawler/hud/index.ts becomes a re-export shim; intra-hud imports rewritten to the lib alias - hud-i18n and all game-specific panels stay in dungeon-crawler (lib ships zero i18n; widgets take pre-translated strings) Follow-up (separate tickets): migrate space-game's ~20 hand-rolled HUDs onto the framework; port wasm-voxel/chess DOM UI to native GL.
Author
Owner

Implemented in spikersoft-angular PR #616 (feat/gl-hud-library) — pending CI + merge. 55 lib tests, app suite green, ng-packagr build verified.

Implemented in spikersoft-angular PR #616 (feat/gl-hud-library) — pending CI + merge. 55 lib tests, app suite green, ng-packagr build verified.
Author
Owner

Resolved in spikersoft-angular PR #616 (merged to master, plus follow-ups #618 for the troika ambient-typing fallout). @spikersoft/gl-hud now lives at libraries/game/gl-hud — HUDPanel/HUDScene, input helpers, shader bars, text input, layout persistence, generic widgets, and new button/hover + backdrop helpers; dungeon-crawler consumes it via a re-export shim with users' saved layouts preserved. Master CI green (build, 3742 tests, e2e walk, Sonar). Closing.

Resolved in spikersoft-angular PR #616 (merged to master, plus follow-ups #618 for the troika ambient-typing fallout). @spikersoft/gl-hud now lives at libraries/game/gl-hud — HUDPanel/HUDScene, input helpers, shader bars, text input, layout persistence, generic widgets, and new button/hover + backdrop helpers; dungeon-crawler consumes it via a re-export shim with users' saved layouts preserved. Master CI green (build, 3742 tests, e2e walk, Sonar). Closing.
Sign in to join this conversation.