Play Live on Reddit Today: https://www.reddit.com/r/VaultDialGame/comments/1yda0cz/vault_dial_339_20261205_grand_vault_opposing/ Public Subreddit: https://www.reddit.com/r/VaultDialGame/ Devvit App Listing: https://developers.reddit.com/apps/vault-dial-daily GitHub (MIT): https://github.com/ngominhtam1998/vault-dial Standalone Interactive Preview: https://ngominhtam1998.github.io/vault-dial/

Inspiration

Great daily games fit naturally into a 45-second coffee break inside a Reddit feed while sparking genuine comment-thread banter. Instead of another word grid or neon puzzle, we asked: What if every morning on Reddit delivered a freshly locked 1960s Swiss bank vault sitting right on your desk? We combined the tactile thrill of mechanical brass safecracking with crisp Mastermind-style deduction and a Daily Engraved Brass Plaque twist that reshapes strategy every single UTC day.

What it does

  • Custom Reddit Splash Briefing: Right inside the feed, players see today’s Vault #NNN, difficulty tier (Atelier Standard -> Master Series -> Grand Vault), engraved daily Blueprint Plaque teaser, and live community crack rate before clicking "Crack Today’s Vault ->" to expand into the desk.
  • 4-Tumbler Brass Deduction + Daily Plaque Twist: Players set 4 rotary brass tumblers across 6 colorblind-safe bank emblems (Diamond A, Key B, Crown C, Gear D, Anchor E, Star F) and pull the lever to receive canonical lock-pin feedback (🟢 Exact dial, 🟡 Right symbol wrong dial, ⚫ Dead). Every day introduces one of 12 engraved Brass Plaque constraints (e.g., Exactly 2 mechanical relics, No adjacent identical symbols, Dial I & IV match), complete with a live compliance lamp (✓ Met / ⚠ Off Plaque) so zero tutorial text is needed.
  • Bespoke Procedural Mechanical WebAudio: Every dial step, lever pull, jewel pin drop, and vault-bolt unlock is synthesized live via Web Audio API with zero external sound asset fetches (plus persistent mute toggle).
  • Reddit-Native Daily Competition (Express + Redis):
    • Server-Authoritative Deduction: Today’s secret combination never leaves the server until the player cracks or seals the vault.
    • Global Daily Leaderboard & Histogram: Ranked by fewest cracks -> fastest solve time, paired with a live 1..6 community solve distribution histogram and Par medals (Master Safecracker <= 3, Clean Crack 4–5, Last-Second Heist 6).
    • 1-Click Spoiler-Free Comment Sharing: Generates a clean emoji lock-pin scorecard and posts directly to the Reddit thread via runAs: 'USER' with a strict server-side once-per-day anti-spam lock.
    • Practice Endless Mode: Automatically unlocks once today’s daily vault is completed so players can keep cracking endless vaults.
    • Zero-Touch Daily Automation: Includes onAppInstall, a UTC midnight cron scheduler (0 0 * * *), and a Moderator Menu action to publish fresh daily vault posts automatically.

How we built it

  • Frontend: Vanilla TypeScript + Vite (~27 kB total gzipped client payload with zero external font or image requests for instant Reddit mobile webview loads), custom inline SVG bank symbols, CSS brushed-brass & walnut-velvet atelier design, and procedural WebAudio synthesis.
  • Backend: Express + @devvit/[email protected] server bundled into dist/server/index.cjs, backed by Devvit Redis sorted sets (zAdd/zRange/zRank) and hashes (hSet/hGetAll/hIncrBy), plus Reddit API submitComment and submitCustomPost.
  • Deterministic 365-Day Engine: Seeded PRNG + annual zero-duplicate secret scheduler guaranteeing 365 unique vault codes per year (366 on leap years), 100% Brass Plaque compliance, weekly difficulty escalation, and mathematically verified solvability (<= 6 cracks via our deterministic Knuth-style minimax solver).

Challenges we ran into

  • Conditional Exports in @devvit/[email protected]: Split tsconfig.client.json ("customConditions": ["browser"]) and tsconfig.server.json so client and server SDK types resolve cleanly in strict TypeScript.
  • Duplicate-Symbol Pin Edge Cases: Engineered a two-pass exact-then-frequency-capped Mastermind evaluator so repeated guesses never over-award near pins, verified with dedicated unit tests.
  • Zero-Scroll Mobile Reddit Webview Ergonomics: Carefully balanced the 6-row recessed crack ledger, 4 rotary brass tumblers, quick symbol stamp bar, and lever CTA to fit comfortably inside 390x700 mobile viewports with 0px horizontal overflow.

Accomplishments that we're proud of

  • 15/15 Automated Tests Passing (100%): Including full-year deterministic verification across all 365 days of 2026 and 366 days of 2028 proving zero duplicates, 100% plaque compliance, and provable solvability within 6 cracks.
  • Ultra-Light Instant Bundle: Complete client JS + CSS + dual HTML entrypoints total under 28 kB gzipped — zero console errors, zero page errors, zero failed network requests, and 0px horizontal overflow verified in real headless Chrome across Desktop (1440x900) and Reddit Mobile (390x700 & 390x844).
  • Authentic Tactile Feel: Procedural Swiss safe-tumbler audio and brushed-brass visual polish make every 45-second daily run feel genuinely mechanical.

What's next for VAULT DIAL

  • Weekly Heist Tournament aggregate scores across Monday–Sunday vaults.
  • Subreddit customizer letting moderators engrave custom community vault emblems and seasonal plaques.
  • Daily Head-to-Head Challenge Links to race a friend on the exact same Practice Vault seed.

Built With

Share this project:

Updates

Submission history