1
0
Fork 0
polaris-task-force/src/hooks
Z8MB1E bfb5cea3c1 feat(minigames): add Ordnance Disposal (bomperator) multiplayer drill
Add a 2-8 player free-for-all Bomberman-style charge-clearing drill at
/minigames/bomperator, category multiplayer. Pure engine plus a single-instance
in-memory match registry, mirroring the call-for-fire-versus split but upgraded
from turn-based to a fixed ~10 Hz tick loop.

Engine (src/lib/minigames/bomperator): seeded RNG via state.rngState/gridSeed;
grid is 15x13 with border, even/even pillars and seeded crates; classic pickups
bomb/range/speed/kick. Movement is grid-locked with sub-cell interpolation,
charges fuse about 2.5s, cross-flames stop at walls, crates are destroyed and
charges chain-detonate and kick-push. Round ends at one alive; sudden death
spawns random explosions after 150s with a draw guard.

Registry (registry.ts): one setInterval per live match started on startMatch and
cleared on complete/dissolve; globalThis-anchored map; holds seats across a
reconnect window then eliminates; below two active seats it dissolves. On a
manual end, broadcasts a bomperator-terminated event so remaining players see a
toast, then awards rewards via stats.ts (minigame:bomperator, profile group
bomperator: matchesPlayed/matchWins/roundsWon/kills/xpEarned).

Clients POST rate-limited inputs and poll fetchBomperatorMatch; the SSE bus pushes
snapshots with a guarded slow-poll fallback. Registry row ships as upcoming so the
page renders the coming-soon shell until an admin flips it active. Adds the
migration for the stats group, the minigame:bomperator event type, XP
aggregation on the profile, generated types, and real-time event wiring.
2026-10-16 00:32:52 -04:00
..
use-mobile.ts style(ui): format shadcn/ui primitives and utility hooks 2026-08-16 23:27:51 -04:00
useGameTick.ts feat(minigames): add Ordnance Disposal (bomperator) multiplayer drill 2026-10-16 00:32:52 -04:00
useKeyboardShortcuts.ts feat(command-palette): add command palette with Cmd+K keyboard shortcuts 2026-08-18 02:05:00 -04:00
useNow.ts chore(ui): add shadcn badge, checkbox, sonner toaster, and useNow hook 2026-08-10 16:01:43 -04:00
useRealtimePresence.ts feat(presence): add presence channel handling in real-time updates 2026-08-28 22:08:37 -04:00
useSessionExpired.ts feat(session): add pre-expiry warning banner with extend button 2026-09-23 15:02:10 -04:00