smaller stage, half steps above 2x — bigger, still even
Trimming the stage alone does nothing, and that is worth writing down: the scale is snapped, so at 3x the game is 1512 device pixels wide whether the stage is 560 or 512. Shrinking the surround only pays when it crosses a step. So both halves land together. ── the stage ── 560x400 down to 512x352, which is expert (504x342, measured) plus four pixels a side. There is nothing left to give — intermediate is 342 tall too, so anything shorter clips a board people actually play. ── half steps from 2x ── Not a retreat from whole-number scaling. The unit that has to stay regular is the CELL, not the pixel: this is a 16px grid, so at 3.5x a cell is exactly 56 screen pixels — as even as 3x or 4x — and only sub-cell pixels alternate between three and four. Below 2x that alternation is a third of a pixel rather than a seventh, so whole numbers still apply there. The case that started all this, a fractional devicePixelRatio at nominal 1:1, put the CELL boundaries at 26.4px, which is a different thing entirely. Together, on a 1800x1400 device-pixel panel: 3.0x becomes 3.5x, and the game goes from 1512 to 1764 device pixels wide. Known cost, and it is in the README: the Extras > Auto Options dialog is 328 wide and opens 25px right of the game, so it needs a 554-wide stage to fit whole from beginner. It cannot be closed from the panel anyway — no window manager, no title bar, no OK button — so that is the thing to fix before this number is revisited. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Officer-Session: de3ed4e6-f88a-429c-94e6-a760336ba83b
This commit is contained in:
@@ -77,7 +77,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 560x400
|
||||
**The game is centred on a fixed stage, and the whole stage is what you see.** The framebuffer is 512x352
|
||||
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.
|
||||
@@ -85,10 +85,16 @@ resizing the panel, and the surround is teal (`-solid`) rather than the root's b
|
||||
**The stage is small because the panel scales it by whole numbers.** Pixel art at a fractional scale gets
|
||||
uneven cells — some three screen pixels wide, their neighbours two — which reads as "not quite right"
|
||||
rather than as blur, and `image-rendering: pixelated` does not help because unevenness is not blur. So the
|
||||
panel picks the largest whole number of DEVICE pixels per source pixel and every pixel of empty stage is
|
||||
panel the game does not get: in an 1866-device-pixel panel, 800 wide lands on 2x and 560 wide lands on 3x.
|
||||
560x400 is expert (504x342) plus a margin. A custom board bigger than that is clipped at the right and
|
||||
bottom rather than shrunk, with the menu bar kept reachable.
|
||||
panel snaps the scale, in DEVICE pixels, to whole numbers below 2x and half steps above it. Halves are safe
|
||||
because the unit that has to stay regular is the CELL: at 3.5x a cell is exactly 56 screen pixels, as even
|
||||
as at 3x, and only sub-cell pixels alternate.
|
||||
|
||||
That makes the size QUANTISED, which is the thing to understand before changing the stage: at 3x the game
|
||||
is the same width whether the stage is 512 or 560. Trimming the surround is worth nothing on its own — it
|
||||
only helps when it crosses a step. 512x352 is expert (504x342) plus four pixels a side, and there is no
|
||||
room left: intermediate is 342 tall too. A custom board bigger than that is clipped at the right and bottom
|
||||
rather than shrunk, with the menu bar kept reachable, and the Auto Options dialog needs a 554-wide stage to
|
||||
fit whole from beginner.
|
||||
|
||||
It used to park the window at the origin and have the client crop to the window's size, polled every four
|
||||
seconds. That resized the panel under the player, and it was off by the 3x29 wine puts between the root
|
||||
|
||||
Reference in New Issue
Block a user