Repository navigation
Plot the player's level on the in-game trend chart - #241
Merged
Merged
Conversation
The trend chart showed each game's speed metric, which falls as the
player improves. It now shows the 1-based level after each trial, so
the line rises with progress, and stretches at the maximum level are
drawn as a thicker green path over it.
Each game keeps a levelHistory of { level, atMax } points in place of
speedHistory. A level is the maximum at the last LEVELS entry, or from
the level where the game's display time reaches its floor. Object Track
has no maximum. Field of View has no levels, so it simulates one from
the SOA: level 1 at the 500 ms start, one more per frame faster, never
below 1, up to 30 at the fastest SOA. Fast Piggie plots its image level.
Card Rat now adds a point for every scored card, not only speed-ups.
The normal line is muted ink so the green max segments stand apart.
Fixes #191
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tutorial slides said the speed trend tracks display time and that lower is better. They now call it the level trend and say when it turns green. Refs #191 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every game's tutorial screenshot showed the old "Speed Trend (ms)" chart. Each is retaken to the screenshot standard (1280x880 window, device scale, clipped to the game area) at the moment its tutorial notes name. Each crop matches the old one within a CSS pixel, so the callout boxes still line up and their percentages are unchanged. Refs #191 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Flips the in-game trend chart so it shows the player's level after each trial instead of the falling speed metric. Stretches at a game's maximum level are drawn as a thicker green path.
Fixes #191
What changed and why
trendChartService.js:renderTrendChart(els, history, currentLevel)now takes{ level, atMax }points. A newbuildMaxLevelPathwrites each run of 2+ consecutive at-max points into a<path>(maxLineEl) drawn over the polyline. The latest label readsN (max)at the maximum.speedHistory/getSpeedHistory()is replaced bylevelHistory/getLevelHistory(). When a point counts as max (as agreed on the issue):LEVELSentry.imageLevel, and counts as max once display time reaches 10 ms.interface.htmlhas a "Level Trend" heading, the new max path, and "Latest level". The normal line is now muted ink (--trend-line: #4a5650, 7.5:1), and the new--trend-line-maxis#2e8540(4.5:1 on card). The max path is also twice as thick, so it isn't marked by color alone.Testing
npm run lintis clean.npm run test:coveragepasses 2223 tests with 100% function coverage.buildMaxLevelPath, the max path and "(max)" label, each game's at-max rule, and Field of View'sgetSimulatedLevel.For reviewers
game.jspush site; the numbers above are worth a sanity check.Signed: Claude Code
🤖 Generated with Claude Code