fix: fog-of-war entities, multi-level descend feedback, camera centering, fewer levels

- FOG: sceneFromGameState only emits exit/entrance/treasure/items once their cell is EXPLORED,
  and the monster only while IN VIEW — no more exit stairs leaking through the fog.
- DESCEND FEEDBACK: reaching a non-final exit descends (multi-level) and used to silently dump the
  player at a new entrance (read as a bug). Server now sends depth/maxDepth on game_event; the
  client shows "Stairs down! Level N of M — keep going". Also lowered level counts (WOW 4->2,
  BTC 8->3, XMR 2->1) — clearing 4-8 levels in one block was unwinnable; kept modest until proper
  multi-level calibration + UX.
- CAMERA: the host filled the very-tall #game-display so centering put the player low; it's now a
  bounded viewport (min(100%,78vh)) centered in #game-display, so the player stays on-screen-centered.
Suite 62/435 green.
This commit is contained in:
jwinterm
2026-07-12 11:50:40 -04:00
parent 75b0f7acfb
commit dd7d70aec8
6 changed files with 50 additions and 20 deletions
+5 -4
View File
@@ -23,13 +23,14 @@ describe('per-network difficulty tuning (multi-level)', () => {
expect(w.monster.movesPerPlayerMove).toBe(DIFFICULTY_PRESETS.casino.monster.movesPerPlayerMove);
});
test('levels scale with block time: GRIN < XMR < WOW < BTC', () => {
test('levels are non-decreasing with block time, BTC the deepest', () => {
const lv = (n) => applyNetworkTuning(casino(), n).levels;
expect(lv('GRIN')).toBeLessThan(lv('XMR'));
expect(lv('GRIN')).toBeLessThanOrEqual(lv('XMR'));
expect(lv('XMR')).toBeLessThanOrEqual(lv('LTC'));
expect(lv('LTC')).toBeLessThan(lv('WOW'));
expect(lv('LTC')).toBeLessThanOrEqual(lv('WOW'));
expect(lv('WOW')).toBeLessThan(lv('BTC'));
expect(lv('GRIN')).toBe(1); // fast chain = single level
expect(lv('GRIN')).toBe(1); // fast chain = single level
expect(lv('BTC')).toBeGreaterThan(1); // slow chain descends
});
test('applies to every preset (levels is preset-agnostic pacing)', () => {