How the daily challenges are generated, from the UTC day to the seed
Updated
On this page
Every daily on this site starts from one integer: the number of whole UTC days since 1 January 2026. Everything else, the bullets in graze, the pieces in blast, the cups in hustler, is derived from that number and a game-specific recipe. This post walks through the code, including where a daily is not the same for everyone.
One day number
The day index lives in src/shared/prng.js. Day 0 is 2026-01-01T00:00:00Z, and the index is the elapsed time divided by 86,400,000 milliseconds, rounded down:
export const EPOCH_UTC_MS = Date.UTC(2026, 0, 1);
const MS_PER_DAY = 86400000;
export function getDayIndex(now = Date.now()) {
return Math.floor((now - EPOCH_UTC_MS) / MS_PER_DAY);
}
export function hashSeed(seed) {
let h = 0x811c9dc5;
for (let i = 0; i < seed.length; i += 1) {
h ^= seed.charCodeAt(i);
h = Math.imul(h, 0x01000193);
}
return h >>> 0;
}
For 5 November 2026 the index is 308, and it stays 308 until 00:00 UTC on 6 November. The file’s header says everything is computed in UTC, never with local-time getters. The API keeps a second copy of the functions, and its tests check that the index is 0 at the epoch, flips exactly at the UTC boundary, and is the same under four different TZ settings.
From a readable string to a stream of numbers
hashSeed is FNV-1a: it folds each character of a string into a 32-bit unsigned integer. That lets a seed be something a person can read. graze-308-hot hashes to 1530190160 (5b34d950 in hex).
That integer goes into mulberry32, a small generator that returns floats in [0, 1). Each call advances an internal 32-bit state, so the same seed always yields the same sequence. The first three values for graze-308-hot are about 0.4555, 0.0643 and 0.7020. The API’s tests freeze the output for seed 42 so that a change to the algorithm shows up as a failing test.
The API’s daily module also returns a UTC day index, seed and scoring version for active games. Solo gameplay does not wait for that endpoint: each browser builds its board from the date and its game’s recipe.
The Daily button on tint’s start screen. Tint’s daily seed is built from the day number alone, not from the level you pick.
Recipes: how a seed becomes a board
Games do not share one recipe. These are the ones in the code:
| Recipe | Games | Seed on day 308 |
|---|---|---|
Hashed string <slug>-<day>-<level> | graze, updraft, wreck, outbound, hustler, leash-park | graze-308-hot gives 1530190160 |
Integer day * 7919 + difficulty * 131 | blast, recall, stones, pogo, slick, ricochet, cornered, pour | blast, difficulty index 1: 2439183 |
| Integer with other multipliers | cat-watch (day * 6151 + difficulty * 389 + 1) | per game |
Hashed <slug>-<day> | filter (see below), tint, claim | filter-308 gives 413419127 |
Shared dailyRng(slug, level, day) | the bots in closure, bridge and overload; the opening phase in deadband | key <slug>-<day>-<level> |
Graze. dailySeed in src/games/graze/seed.js hashes graze-<day>-<level>, where the level is calm, hot or redline.
Blast. dailySeed in src/games/blast/dealer.js is day * DAILY_DAY_STEP + difficultyIndex * DAILY_DIFFICULTY_STEP, with the steps set to 7919 and 131 in the game’s config. The result is passed straight to mulberry32, and the dealer draws every piece shape, colour and bomb from that one stream.
Hustler. The seed is hashSeed("hustler-<day>-<difficulty>") with difficulty easy, medium or hard. A test checks that the same seed gives the same plan and ball positions.
Why a fixed step matters
If the simulation advanced by the length of each rendered frame, a 144 Hz screen and a 60 Hz screen would reach the draws at different moments. Several games instead advance in fixed slices of simulated time and carry the leftover frame time forward:
- Graze steps at 1/120 s. The config comment reads “Fixed step so one seed plays identically at any refresh rate”, and a test replays the same seed and the same recorded input at 60 Hz and 144 Hz and requires byte-identical bullet data after 30 seconds. A second test builds the daily seed for
hotfrom two timezones on one UTC day and compares at both refresh rates. - Wreck uses a 1/120 s step. Its tests trace the same scripted input at 60 and 144 Hz and compare the path step by step, and replay a seed twice to confirm the same enemy spawns.
- Pogo runs at 120 ticks per second, and a test replays a recorded run from its seed and inputs and gets the same final state.
- Hustler and leash-park use a 1/60 s step. Both cap a frame at 8 steps, so after a stall longer than that the extra time is dropped rather than caught up.
Tests for graze and wreck also fail if Math.random appears in their simulation code.
What a daily does not fix
Same seed does not mean the same run:
- Graze aims at you. The random draws are the same, but an aimed pattern computes its angle from the ship’s current position (
angleToShipinsim.js), so the bullets fly differently for each player. - Blast adapts to your board. Hands are drawn from the stream, but on difficulties flagged
fairthe dealer redraws up to a fixed number of times when no piece fits the current board, and rocks go only on empty cells. Those retries consume numbers from the stream, so the sequences diverge once two boards differ. - Closure, bridge and overload play against a bot. Its random stream is seeded from the day and level, but each reply chooses among the moves currently available, which depend on what you have played.
- Filter has a daily code path but no daily on its menu. The board is only built from the day when the page is opened with
?mode=daily; there is no daily page for it, and the game’s own FAQ says it has no daily mode. Where it does run, the bot picks after you do, from the faces that remain once yours is removed. - Deadband seeds very little. Only the opening phase of the drift comes from the day.
- Leash-park fixes a schedule. Same day and difficulty give the same arrival schedule; what you do with each arrival is yours.
- Recall depends on the screen’s shape. Target placement and starting positions use the board’s aspect ratio. Retries also consume random numbers, so later rounds can differ between screens.
The scored attempt on your device
Most games track one scored attempt per difficulty per UTC day. In src/shared/daily.js, claimDailyAttempt builds a key <storageKey>:<day>:<level>, reads it from local storage, then writes it. The first call that day returns false (scored); every later call returns true (practice). Games using this helper normally keep practice scores off the leaderboard. Tests cover the helper’s first-attempt rule and that levels and days are tracked separately.
Some limits follow directly from that:
- Games choose when to write the marker. Closure, stones and wreck mark it at the start, so abandoning a run halfway still uses the day’s scored attempt. Blast marks it on the first placement; hustler and leash-park mark it at the end.
- It lives in the browser’s local storage, through
src/shared/storage.js. That wrapper turns every failure into a silent no-op, so if storage is blocked the page cannot remember that you already played. - Not every game uses the shared helper. Stones and wreck write a key of the same shape themselves; filter and tint store a day index when a daily finishes.
- Graze blocks practice submissions in the client. Its server rule now also keeps the first valid daily result per browser identity and level. Clearing site data or changing browsers changes that anonymous identity; it is not a cross-device account restriction.
- The date shown in the share text and the countdown note is formatted with the browser’s local time zone, while the board follows the UTC day. Near midnight the two can disagree.
What the server checks
The local attempt marker controls what the browser submits. The API has its own checks in apps/api/src/modules/runs and does not trust that marker.
When a run starts, the server computes its own day index with the same getDayIndex. For a daily run it issues the seed <slug>-<dayIndex>; for other modes it issues a random one. On submit, the day the score is filed under is taken from the time the run started, not from the time it was submitted.
game-rules.ts then maps game slugs to rules. A rule can map the submission to a level or difficulty, run a plausibility range check, or replay the run on the server and return the score to store, or nothing if the replay does not match. Replay rules exist for cornered, ricochet, pour, blast, claim, recall, pogo, stones and slick. For blast, the server recomputes the expected seed from the day index with the same formula as the client and rejects a submission whose seed differs, then replays every placement and compares the score and tallies. The remaining games with a rule (updraft, outbound, wreck, overload, closure, bridge, deadband, cat-watch, leash-park, hustler) get range checks.
For the first-daily rule, isFirstDailyToday looks for an earlier daily score by the same player, for the same game, day index and difficulty or level. For overload, closure, bridge, deadband, blast, claim, cat-watch, cornered, hustler, leash-park, outbound, pogo, recall, pour, stones, ricochet, slick and wreck, a daily is stored only if that lookup finds nothing. Updraft is different: its rule stores a score if it is the first daily, or if it beats the player’s previous best for that level.
Graze, tint and filter use the shared precision rules: Graze checks time, graze counts, chains and score bounds; Tint checks score and overflow bounds; Filter derives the score from the reported outcome and question counts. These checks do not replay every input. The API also serializes daily submissions for the same player, game, day and level so simultaneous requests cannot both claim the first valid result. A game with no registered rule is rejected from ranking.
At midnight UTC
At 00:00:00 UTC the day index goes up by one. Boards are built when a run starts, so a run already under way keeps its board, and the next run you start reads the new day. The marker key includes the day number, so each day starts fresh. A run started before midnight and submitted after it is filed under the day it started on.
The board comes from your device’s clock, while the server reads its own clock when it issues a daily run. Those two clocks are never compared in the code, so a device with the wrong time will build another day’s board. For an example, see the stones daily page.