diff --git a/README.md b/README.md index dd78866..8f50d9f 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ The check that matters is `ss -lntp` against the **running** process. Reading th listener that exists because a flag is missing, and running the same arguments by hand did not reproduce it either. -**The game is centred on a fixed stage, and the whole stage is what you see.** The framebuffer is 512x352 +**The game is centred on a fixed stage, and the whole stage is what you see.** The framebuffer is 512x384 whatever the difficulty, `sidecar/session.ts` keeps the window in the middle of it, and the panel draws the framebuffer entire — scaled to fit, never cropped. So changing difficulty moves the board rather than resizing the panel, and the surround is teal (`-solid`) rather than the root's black. @@ -96,6 +96,11 @@ stay regular is the CELL: the board is a 16px grid, so every quarter step gives overshoot, and quarters all the way down rather than whole numbers under 2x because otherwise zooming out from a 2x baseline falls straight to 1x and halves the board in one press. +The stage is 512x384 rather than 512x352 because the game refuses to open a REPLAY on a screen only ten +pixels taller than the board — "Your screen cannot fit a window of that size", for a window it is about to +draw at exactly 504x342. It wants slack it never spends. Growing the stage is free at the sizes people use: +the scale is capped at 2x, so anything up to about 726x451 draws the game identically. + The BASELINE — the size at 100% — is capped at 2x. Fitting the panel is not the same as looking right, and past 2x this stops reading as a window on a desktop. diff --git a/sidecar/session.ts b/sidecar/session.ts index 36d28c7..d14c3ec 100644 --- a/sidecar/session.ts +++ b/sidecar/session.ts @@ -54,18 +54,28 @@ export type SessionStatus = { * so the size here decides which step it lands on, and the steps are far apart. In a 1866-device-pixel * panel: 800 wide gives 2x, 560 wide gives 3x. Same panel, half again as much game. * - * 512x352 is expert (504x342, measured) plus four pixels a side. There is no room left to give: expert - * and intermediate are both 342 tall, so anything shorter clips a board somebody actually plays. + * 512x384. The width is expert (504x342, measured) plus four pixels a side; the HEIGHT is not, and the + * extra 42 is load-bearing. * - * Two things get clipped at this size, and both are deliberate. A CUSTOM board larger than the stage - * loses its right and bottom edges — `centre` clamps at zero, so the menu bar stays reachable. And the - * Extras → Auto Options dialog is 328 wide and opens 25px right of the game window, which needs a stage - * 554 wide to fit whole when the board is beginner. That dialog cannot be closed from the panel anyway - * (no window manager, so no title bar, and it has no OK button) — see the README. Fix that first, then - * revisit this number. + * At 512x352 — expert plus ten pixels of height — the game refuses to open a replay with "Your screen + * cannot fit a window of that size", even though the replay window is exactly the 504x342 it just + * measured. It is not a positional check: from a centred beginner window the expert window would run + * 236px off the right edge and the game repositions it happily. It is a minimum-screen check with slack + * the game never spends, and the slack it wants is roughly a title bar it does not have here. 384 was + * verified by opening an expert replay; 352 was verified refusing one. + * + * Growing the stage costs nothing at the sizes people use, which is why the number is generous rather + * than minimal: the panel caps the scale at 2x, so anything up to about 726x451 draws the game at exactly + * the same size. The stage only starts costing pixels once `fit` drops below the cap. + * + * Two things are still clipped here, both deliberate. A CUSTOM board larger than the stage loses its + * right and bottom edges — `centre` clamps at zero, so the menu bar stays reachable. And Extras → Auto + * Options is 328 wide and opens 25px right of the game window, so it needs a 554-wide stage to fit whole + * from beginner. That dialog cannot be closed from the panel anyway (no window manager, so no title bar, + * and it has no OK button) — see the README. Fix that first, then revisit the width. */ const SCREEN_W = 512; -const SCREEN_H = 352; +const SCREEN_H = 384; /** * How often to check whether the board changed size. diff --git a/web/MinesweeperPanel.tsx b/web/MinesweeperPanel.tsx index 4cc08c2..88e35f3 100644 --- a/web/MinesweeperPanel.tsx +++ b/web/MinesweeperPanel.tsx @@ -20,7 +20,7 @@ type SessionStatus = { // // Only a placeholder until `onReady`, which sizes the canvas from the real framebuffer. Drift with the // sidecar's stage costs one frame of the wrong aspect ratio and nothing else. -const PLACEHOLDER = { width: 512, height: 352 }; +const PLACEHOLDER = { width: 512, height: 384 }; const BUTTON_MASK: Record = { 0: 1, 1: 2, 2: 4 };