Jason Flatford Fractional CTO
Book 30 minutes (opens Google Calendar in a new tab)

Game

Reveillark

A daily Magic: The Gathering card-guessing game in which players identify a hidden legendary creature as card attributes are progressively revealed. Deterministic puzzles, instant autocomplete across 2,841 cards, and zero backend.

  • React 19 + Vite + TypeScript
  • Progressive Visual Masking
  • Deterministic Daily Puzzles
  • Stateless / Zero Backend

Overview

Reveillark is a daily guessing game inspired by Wordle, where players identify a hidden legendary creature from Magic: The Gathering. With each incorrect guess, a new region of the card is revealed in sequence: color identity, mana cost, type line, stats, and finally the full art and name. All players worldwide receive the same puzzle each day.

  • Data-driven gameplay: All card attributes are sourced from Scryfall, eliminating the need for manual puzzle creation.
  • Progressive reveal: SVG-masked card images uncover regions in a thematic sequence over up to six guesses.
  • Shareable results: Wordle-style emoji-grid summaries enable social sharing without revealing spoilers.
  • Zero backend: The game runs entirely client-side with localStorage for persistence, requiring no accounts or server.

Problem

Daily puzzle games benefit from simplicity and social sharing, but developing one for a complex domain like Magic: The Gathering introduces challenges in content scale, visual design, and long-term sustainability.

Content at scale

  • Thousands of cards to choose from
  • Hand-authoring daily puzzles doesn't scale
  • Need variety without repeating cards

Visual reveal design

  • Text-only clues fail to capture the essence of the card game.
  • Displaying the full card immediately reveals the answer.
  • A single puzzle should offer graduated difficulty.

Global consistency

  • All players must receive the same daily puzzle.
  • No backend means no server-side state
  • Timezone handling across the globe

Solution

The game uses a stateless, data-driven architecture: Scryfall supplies the card pool, a seeded random number generator deterministically selects the daily puzzle, and SVG masks progressively reveal the card image. This approach requires no backend or content team and enables infinite variety.

Core design decisions

  1. Scryfall as source of truth: 2,841 legendary creatures are pre-filtered and embedded as static JSON, eliminating the need for runtime API calls.
  2. Deterministic selection: A date-seeded Mulberry32 PRNG ensures every player receives the same card globally each UTC day.
  3. Visual masking: SVG overlays are applied to real card art, using pixel-calibrated regions for Scryfall's 488×680px images, rather than custom graphics.
  4. Client-only: Game state is stored in localStorage, with no backend, database, or accounts required.

Visual masking system

Signature mechanic: Real card art is progressively unmasked using SVG overlays with pixel-perfect region coordinates. Each reveal level exposes a thematically significant part of the card.

Reveal levelWhat's unmasked
0 - Card backNothing visible; player starts with only the knowledge that it's a legendary creature
1 - Frame colorCard border/frame reveals color identity (white, blue, black, red, green, multi, colorless)
2 - Mana costTop-right corner shows casting cost - narrows candidates by CMC and color pips
3 - Type lineCreature types and supertypes revealed (e.g., “Legendary Creature — Human Wizard”)
4 - Power/toughnessBottom-right stat box unmasked
5 - Set infoSet symbol and collector number visible
6 - Full cardArt, name, and rules text - game over (loss)

Technical implementation

  • SVG clip paths: Eight distinct mask regions use precise coordinates calibrated to Scryfall's 488×680px card images.
  • CSS transitions: Smooth dissolve animations enhance the reveal of each region.
  • Color-based glow: The card border radiates a color that matches the card's color identity, enhancing thematic immersion.

Design rationale

  • Thematic ordering: Reveals follow the typical evaluation sequence for MTG players: color, then cost, type, and stats.
  • Real art: Using actual card images creates authentic moments of recognition.
  • No custom assets: Masks function automatically on any card, eliminating the need for per-card graphics.

Puzzle generation

Every player worldwide receives the same card each day without a server. A seeded pseudo-random number generator deterministically maps each UTC date to a specific card.

How it works

  1. Date seed: The current UTC date is hashed into a 32-bit integer.
  2. Mulberry32 PRNG: This deterministic algorithm produces the same sequence for any given seed.
  3. Card selection: The PRNG output maps to an index within the 2,841-card pool.
  4. Curated overrides: The first ten or more days feature hand-picked cards to ensure a strong launch experience.

Architecture

The codebase features a clear separation of game logic, state management, and UI components. It is fully typed, thoroughly tested, and deployed as a static bundle with no server dependencies.

Code organization

  • game/: Pure logic for puzzle selection, the state reducer, storage, search, and share formatting.
  • components/: React UI components for masked card display, autocomplete, guess history, result screen, and header.
  • types/: Shared TypeScript interfaces for cards and game state.
  • data/: Static JSON pool of 2,841 cards, pre-processed from Scryfall.

Quality & testing

  • Vitest: Unit tests cover all game logic, including puzzle, state, storage, search, and share.
  • React Testing Library: Component tests cover autocomplete, card display, and masking.
  • TypeScript strict: No implicit any, with full type safety across the codebase.
  • CI/CD: GitHub Actions runs linting, testing, and builds on every push, with automatic deployment to Pages.

Outcomes

2,841
Legendary creatures in pool
7
Progressive reveal levels
8
SVG mask regions calibrated
0
Backend dependencies
7+
Years of unique daily puzzles

Delivered capabilities

  • Deterministic daily puzzle generation using a seeded PRNG.
  • SVG visual masking system with pixel-calibrated regions.
  • Instant autocomplete across 2,841 cards with relevance scoring.
  • Spoiler-free emoji-grid sharing for social platforms
  • localStorage persistence with automatic state serialization
  • Confetti, color glows, and victory animations enhance the user experience.
  • WCAG-compliant accessibility with ARIA labels and keyboard navigation.
  • A comprehensive test suite covers both logic and components.

Building engaging web experiences?

Reveillark demonstrates creative problem-solving, polished user experience, and clean architecture, from deterministic puzzle algorithms to pixel-perfect SVG masking. If you are seeking someone who can deliver delightful, technically sound products, I would welcome the opportunity to connect.

Return to top

Press Esc to close • ⌘K / Ctrl K to open