Deterministic System Specificationlib/daily.ts

How Daily Challenges Work

Editorial Commitment & Unique Value: A transparent explanation of UTC date key hashing, seed calculation in lib/daily.ts, and why puzzles never vary across timezones.
Published: 2026-01-15Last reviewed: 2026-10-28Next review: 2027-01-28

How Does Daily Seeding Work?

Every morning at midnight UTC, a new daily puzzle becomes active across all five Atelier games. Rather than downloading pre-made boards from a remote server, each player's browser deterministically computes the exact same board locally using a synchronized mathematical seed.

Algorithmic Flow in lib/daily.ts:
  1. Date String Extraction: The client reads the current Universal Coordinated Time (UTC) date and formats it as an ISO key: YYYY-MM-DD (via getDailyDateKey()).
  2. Game-Specific Integer Offset: To prevent Solitaire and Sudoku from using identical layouts on the same calendar date, a distinct prime offset is applied per game ID.
  3. Linear Congruential Generator (LCG): The seed is fed into a deterministic pseudorandom number generator (PRNG) with multiplier 1664525 and increment 1013904223 modulo 2^32.
  4. Board Construction & Verification: The solver builds the board using this seed and confirms uniqueness before rendering.

Why We Use UTC Time

Many casual gaming sites use local browser device time for daily puzzles. However, this causes serious synchronization flaws: players traveling between time zones can accidentally skip days, reset their streaks, or replay previous days by artificially shifting their system clocks.

Atelier Games anchors daily challenges strictly to 00:00 UTC. Whether you are solving in Tokyo, London, or San Francisco, every player on Earth receives the exact same puzzle simultaneously.

System Limitations & Boundaries

Missed Calendar Days: Streaks require completing at least one daily puzzle every consecutive 24-hour UTC window. If a calendar date elapses without completion, the active streak resets to zero.
Browser Cache Clear: Daily completion stamps are stored locally in your browser storage. Clearing website data will reset your recorded streak history unless you maintain an exported JSON backup.

What Happens to Your Data?

Nothing leaves your computer. Your daily completion timestamps, solve durations, and hint counts are written directly to localStorage under the key atelier_stats. Atelier Games runs zero telemetry servers, collects no personal identifiers, and requires no account login.

How Daily Challenges Work: Deterministic Seeding & Reset Times — Atelier Games