Repository navigation
Smoother board on low-end tablets (steady 30 fps + adaptive sharpness) - #75
Merged
Merged
Conversation
…l budget - Phaser fps limit 33 (target 30): with exactly 30, two 60 Hz refreshes often summed to just under 33.3 ms, so frames stepped unevenly between 30 and 20 fps (visible stutter on moves) - src/board/quality.ts: board pixel budget (0.8 MP and ratio <= 2 on devices with <= 4 GB or <= 4 cores, 4 MP otherwise) plus a frame watchdog that steps sharpness down when the board stays under 24 fps; never below 1 canvas pixel per CSS pixel, remembered across floors, one step sharper retried each launch - Plus glow eyes animate --bot-eye on the eye shapes, not on <html> (no whole-page restyle per frame) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HnC1czXPoK7Wh1ccNHkt8t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Kevin · project thread
Why
On a TCL tablet (Android 15, 4 GB) the game feels choppy unless Reduce motion is on; a Galaxy S26+ is smooth. Every animation stays. The board just draws in a way a weaker device can keep up with.
What changed
src/board/quality.ts). Since Play Games on PC: landscape window, interface scaled to fit, sharp board #73 the board canvas is drawn at full devicePixelRatio, which is a lot of pixels to redraw 30 times a second on a big tablet with an entry-level GPU.deviceMemoryor ≤ 4 cores, and 4 MP otherwise. Phones barely notice. Big low-end tablets drop to about 1.4×.loopbot.boardScale), so the next floor starts there. Each app launch tries one step sharper again, so a one-off slow moment doesn't make the board soft for good.--bot-eyeon the eye shapes themselves instead of on<html>. Before, a glowing eye restyled every element on the page every frame. The title bot's antenna keeps its blink as well as the glow.Testing
tsc -bclean,vitest run: 2,738 tests pass (newquality.test.ts: tier detection, budget, step-down memory, watchdog ignores single dips and pauses)Generated by Claude Code