Reference
Accounts and verified scores
How Riffover profiles, leaderboards and friends work: the game uploads replays, the server re-judges them, and nothing stops working offline. What's checked, and what isn't.
On this page
A Riffover account gives you a profile at riffover.com/u/<username>, your verified scores on every song's leaderboard, and friends. You never need one to play: the game keeps your scores on your PC exactly as it always has, signed in or not.
This page is for players who want to know what's going on, and for contributors working on it. It's honest about what the checks can and can't catch.
In short#
- The game never sends a score. When you finish a song it saves a replay: the chart's fingerprint, your settings and every input you made, with timings. Signed in, it uploads the replay in the background. The server plays the chart back with the same judge the game uses and records its own score.
- Leaderboards are per chart part: one board for each song × instrument × difficulty, keyed by the chart's fingerprint, so a board only ever compares runs of exactly the same notes.
- Only known charts are ranked: catalog songs and approved Discover uploads. Charts the game learned from your own audio, or charts you imported, count on your profile as personal bests, unranked.
- Suspicious runs are held, not rejected: they wait for a person to review them before they show on public boards.
- Offline first. Nothing waits on the network. Replays queue on your PC and upload when they can; if Riffover's servers are gone, the game plays on (see Riffover keeps working without us).
Signing the game in#
The game signs in with a code, never a password (the OAuth 2.0 device flow):
- Settings → ACCOUNT → SIGN IN. The game shows a code like
BCDF-GHJK, the addressriffover.com/link, and a QR code for your phone. It also opensriffover.com/link?code=BCDF-GHJKin your browser. - On that page, signed in to riffover.com, you see which device is asking ("Riffover on Windows") and confirm it explicitly.
- The game notices within a few seconds and shows your name.
Codes last ten minutes and work once, and starting a sign-in is rate limited. There's no local web server and no riffover:// return trip: the game only ever polls the API.
Devices and tokens#
- Each signed-in game is a device session, listed in Settings → Devices with its name, when it was last used, and a rough location (city and country from our host's request headers; no IP address is stored with it). Sign out any one, or every device except this browser.
- The game holds two tokens: an access token that lasts an hour, and a refresh token that gets a new pair. Every refresh replaces the refresh token; if an old one is ever presented again, the server assumes it was copied and signs that device out. The downside: if the network drops the very response that carried a new token, the game has to sign in again. We chose that over leaving a stolen token usable.
- A session unused for 90 days ends.
- The tokens can do three things: upload scores, read your profile, and read your follows (
scores:write profile:read friends:read). They can't change your password, email, username or profile. - On your PC the tokens are kept in the operating system's protected storage: DPAPI on Windows, tied to your Windows user. macOS (Keychain) and Linux (libsecret) are planned; until then those builds keep the sign-in only until the game closes. Tokens are never written to logs. The server keeps only hashes of them.
- When a device is signed out from the website, the game says so calmly at its next upload ("Signed out from the website") and keeps playing; replays wait until you sign in again.
The replay#
A replay is a small JSON file, saved in the game's user data folder under replays/pending/ (then uploaded/, or rejected/ with the server's reason beside it). It's saved whether or not you're signed in, so runs played offline, or before you made an account, upload later.
| Field | What it is |
|---|---|
id |
A random id; uploading the same replay twice is harmless |
game |
The game build that recorded it |
recorded_at |
When the run ended |
song |
Title, artist and source: official:<id>, community:<id>, imported or learned |
fingerprint |
The chart's fingerprint (below) |
chart |
The chart part, in the canonical form the fingerprint is made from |
settings |
Timing window (standard, strict, relaxed), NO FAIL, audio offset, and the controller: guitar, drums, gamepad, keyboard or mixed |
playable_from, ended_at |
Where the run started (after a skipped intro, say) and ended, in microseconds of song time |
outcome |
completed, failed or quit |
events |
Every input in order: strums, fret changes, taps, held-note changes, whammy and Surge, each with its song time in microseconds |
claimed |
The game's own score, accuracy and streak: diagnostics only, never trusted |
Recording the controller and every extra press ("ghost inputs": taps that hit no note) costs nothing now and lets boards filter and show them.
Chart fingerprints#
A fingerprint is the SHA-256 of a chart part's parsed notes in a fixed serialization, not of the file. The same song saved as .mid or .chart, re-exported, or with a different song.ini gets the same fingerprint as long as the notes and timing are the same; change one note and it's a different board.
The canonical form is integers only: times in tenths of a millisecond, BPM ×1000, the HOPO threshold ×10⁶, notes as [time, lane, length, flags] sorted and de-duplicated, plus the beat grid and the Surge phrases. The game (game/src/Online/JudgeChart.cs) and the server (web/lib/scores/chart.ts) each build it, and shared fixtures make sure they agree.
Catalog charts are MIDI files the server doesn't parse. Instead tools/fingerprints runs the game's own parsers over the published catalog and writes the ranked fingerprints to web/lib/scores/ranked-charts.json. Admins rank an approved Discover upload's chart from the score review page once it's been played.
How the server judges#
web/lib/scores/judge.ts is a line-for-line port of the game's judge (game/src/Game/Judge.cs), and web/lib/scores/replay.ts replays the events through it: the judge updates on a fixed 120 Hz grid of song time, inputs land between updates at their recorded times, then the run plays out to its end. The game does the same thing in C# (game/src/Online/ReplayRunner.cs).
tools/fixtures/judge-replays.json holds recorded runs (perfect and sloppy guitar, strict and relaxed timing, a quit, imported HOPO and tap flags, keyboard tap mode, expert drums, a skipped intro) with the result the C# judge gives. The game's tests write and check it; the website's tests check the TypeScript judge gets the same score, hits, streak and Surge for each. If the two judges drift, CI fails.
The score you see at the end of a song can differ from the server's by a few sustain points, because the game updates every frame and the server on its fixed grid. The server's number is the one on the boards.
What counts on a board#
A run is ranked when:
- its chart's fingerprint is on the ranked list, and the chart it sent hashes to that fingerprint;
- it was completed: every note was reached, no notes skipped;
- it used the standard or strict timing window (relaxed is for practice);
- on guitar-style parts, it wasn't played in keyboard tap mode.
NO FAIL runs are ranked, and marked; boards can hide them. Each player's best run is their place on the board; boards can also sort by accuracy or date, filter by controller or strict timing, and narrow to your friends.
Everything else is still verified and still counts on your profile: your stats, your recent plays and your personal bests on learned and imported charts.
Plausibility checks#
After judging, the server looks at the run's timing. A run is held for review (status flagged) when, with at least 50 hits to go on:
- the spread of hit timings is under 4 ms (people are rarely that steady for a whole song);
- more than 20% of presses land within 0.2 ms of the note;
- strums exceed 28 a second, or inputs 90 a second, at any point;
- the run is far longer than the chart, or claims completion without reaching the notes.
A held run shows on your own profile, marked, and nowhere else until a reviewer approves it. Anyone signed in can report a run; reports go to the same queue. Reviewers see the flags, the timing stats and the reports, and can download the replay.
The server keeps replays for your personal bests and for held runs; older bests' replays are deleted when you beat them, unless the run is reported.
Fair play and appeals#
The rules are on the fair play page: play it yourself on the controller you name, no macros or pre-timed input, unusual setups welcome with a heads-up. If a run was held or removed and you played it fairly, email hey@flagon.io with your username and the song; another reviewer looks again.
Limits, honestly#
- A replay is a list of inputs, and a program can write one. Re-judging stops edited scores, scores for charts that don't exist, and impossible results. It can't prove a human pressed the buttons. The plausibility checks catch lazy bots (perfect timing, inhuman rates); a careful one that adds human-looking error can pass them. Review, reports and kept replays are the backstop.
- The thresholds are first guesses. They'll move as real runs come in.
- Learned charts can't be ranked: everyone's learned chart of a song differs, so there's no shared board to put them on.
- Imported charts aren't ranked unless the same notes are in the catalog or Discover.
- Run times are song time, not wall-clock time, so a paused run looks the same as an unpaused one.
Profiles and friends#
- Profiles are public by default and show your name, picture, bio, main instrument, follower counts, lifetime stats, bests for each instrument and difficulty you've played, top and recent plays, and personal bests. A private profile shows only your name, and your runs stay off public boards. Change it in Settings → Profile.
- Avatars. Upload a PNG, JPEG or WebP (up to 5 MB) in Settings → Public profile and crop it square; the crop works with a mouse, a keyboard or anything that moves focus. The server decodes it, refuses anything that isn't really one of those images, and re-encodes it as WebP at 512, 128 and 48 px with no metadata (EXIF, GPS and color-profile details are dropped). Files are served from
/avatars/<id>/<size>, where the id is a hash of the image itself, so they're cached for a year and a new picture is a new address. Uploads are limited to 10 an hour. Other players can report a picture; admins review reports at/admin/scoresand can remove one. - Gravatar. Without an upload, Riffover shows your email's Gravatar if you have one. Our server asks for it (
https://gravatar.com/avatar/<SHA-256 of your email>?d=404; a 404 means there's none), re-encodes it like an upload and keeps its own copy, asking again about once a week. Your browser never talks to Gravatar, and the email's hash never appears in a page, a link or an API response: a public email hash can be matched back to the address. Turn it off with Use my Gravatar in Settings → Public profile. With neither, your first letter shows on a square in one of the fret colors, the same one every time. - Following is one-way; two people who follow each other are friends. Boards can show just you and your friends.
- Renaming keeps your old
/u/address pointing at you for 90 days, and nobody else can take it meanwhile. - Settings → Scores downloads every run as JSON. Deleting your account deletes your profile, follows, device sessions, runs and stored replays.
Difficulties are open-ended string ids (easy, medium, hard, expert, expert_plus, and whatever comes next), never a fixed list, so boards and profiles show exactly the difficulties a chart has and you've played.
Other sign-in providers#
Accounts store sign-in methods as separate rows (the account table, one per provider), and devices carry a platform. A new provider, such as a store or platform account, is one more row and one more device kind: a player links it to an existing Riffover account or creates one from it, the game can sign in with that platform's session ticket instead of a code, and every run is still re-judged from its replay. Nothing above needs reworking for it.
For contributors#
| Piece | Where |
|---|---|
| Canonical chart, fingerprint | game/src/Online/JudgeChart.cs, web/lib/scores/chart.ts |
| Replay format, recorder | game/src/Online/Replay.cs, web/lib/scores/replay.ts |
| Replay judge | game/src/Online/ReplayRunner.cs, web/lib/scores/judge.ts |
| Shared fixtures | tools/fixtures/judge-replays.json (regenerate: RIFFOVER_WRITE_FIXTURES=1 dotnet test tests/Riffover.Tests in game/) |
| Plausibility | web/lib/scores/plausibility.ts |
| Ranked charts | tools/fingerprints → web/lib/scores/ranked-charts.json, plus the ranked_chart table |
| Device sign-in | web/lib/server/devices.ts, web/app/link, game/src/Online/AccountClient.cs, game/src/Main.Account.cs |
| Uploads | game/src/Online/ReplayUploader.cs, web/app/api/replays, web/lib/server/scores.ts |
| Avatars | web/lib/server/avatars.ts (pipeline, Gravatar, reports), web/app/avatars/[id]/[size], web/app/settings/profile/avatar, web/components/settings/AvatarEditor.tsx |
| Pages | web/app/u/[username], web/app/leaderboards, web/components/scores, web/app/settings, web/app/admin/scores |
| API | REST API |
Change the judge? Change both, regenerate the fixtures, and expect the TypeScript test to tell you if they disagree. To point a local game at a local site, set RIFFOVER_API=http://localhost:3000/api before starting it.