carlok — zsh — 88×30

cat _posts/2026-11-17-sunslide-the-tutorial-waits-for-play-the-menu-holds-the-game-a-paused-game-stops-rendering-at-60-fps-and-the-game-speaks-italian-and-korean.md

sunslide: the tutorial waits for PLAY, the menu holds the game, a paused game stops rendering at 60 fps — and the game speaks Italian and Korean

First contact with sunslide was the weakest part of it: tutorial cards opened on top of the title screen, where two stacked backdrops made the planet read as black, and the pointer or keyboard could walk through the menu into the game. The tutorial cards now open on the first PLAY with the live game held behind them, a backdrop click closes a card without marking it seen for good, and one shared focus-trap helper serves the menu and the tutorial with focus returned or released at the end; setUiHold freezes the simulation and puts the loop to sleep without showing the pause panel, so bats no longer attack while Settings is open (b628aca). The title screen became a solid card with PLAY under the tagline and the rules in a <details> disclosure, justify-content: safe center lets short phone screens scroll to the top, and the toolbar hides pause and view on title, game-over and win screens.

The paused state was worse than it looked: the loop re-rendered the frozen scene and a shadow pass at 60 fps indefinitely, a connected gamepad was not polled so Start could pause but never resume, and a resize while paused left a blank canvas — paused games now render one frame and let the loop sleep, keep polling the pad on a 100 ms timer, and wake on resize, while the settings menu forwards only the keys that changed and a WebGL context restore lowers quality for that tab session instead of overwriting the saved preference (38111d3). The global key handler no longer steals keys from focused buttons — Enter on PLAY used to start the game twice — and the win screen gives Enter back to the Menu.

The day’s other feature is the localization the fork invited: shared message tables with data-i18n wiring in the DOM, a language picker in the menu with a localStorage and ?lang= override, runtime translation for the HUD, toasts, tutorial and pause controls, a Noto Sans KR fallback, and locale-detection and message-parity tests (32231ad, #47); the Korean strings come from the Korean fork under its Apache-2.0 licence with a NOTICE credit. The ecology floor got the same care as the UX — per-cell seeded HSL greens on the instanced patches with per-instance value-noise mottling and a soft alpha edge over the real floor instead of albedo multiplied toward black, night emissive retained, and matched day/night captures to prove it (b750cea, a0bef69, d42428b).

The island shadows needed a second pass after the polar-decor caster fix: the batched island material assigned vTileId after the normal chunk had already read it, so every island was lit with tile 0’s normals, and the sphere-mapped depth materials sat on the material rather than on the BatchedMesh, so the shadow pass drew all fifteen mazes stacked near the core (4ec2302). Deployment is no longer a race either: pages.yml runs on the CI workflow’s completion for a push to main and builds the exact commit CI tested, so a red main cannot reach Pages, and the fragment-concatenation Vite plugin registers addWatchFile so npm run dev stops serving stale fragments (e6ee381).