Inspiration

Cribago Daily Peg started from the idea of turning traditional cribbage scoring into a compact daily puzzle. I wanted something that felt familiar to card players, but with enough twists to make each day feel like a fresh optimization challenge: find the best possible line, squeeze extra points out of special cards, and compare your result with other players.

What it does

Cribago Daily Peg is a daily card puzzle built around cribbage-style scoring. Each day, players get the same starting deck, hand flow, abilities, and seals. The goal is to play, discard, and modify cards to reach the highest score possible.

The game includes animated cards, score popups, sound effects, music, daily leaderboards, replayable daily puzzles, random practice games, and a maximum-score target so players know what they are aiming for. Practice games are random, while daily puzzles are curated by automatically searching random game states and selecting strong scoring candidates.

How we built it

We built the game as a Devvit web app using React, Vite, Tailwind CSS, Motion, Hono, Redis, and the Devvit web APIs.

The frontend handles the interactive game board, animated cards, scrolls, seals, overlays, audio, and leaderboards. The shared game logic models cards, moves, scoring, abilities, seals, and recursive maximum-score search. The backend stores daily puzzles, pending puzzle candidates, leaderboard entries, and player coin totals in Redis.

A scheduler runs puzzle search over time, keeps the best pending puzzle, and publishes the selected puzzle as the official daily challenge.

Challenges we ran into

The biggest challenge was keeping the game responsive while also supporting deep recursive search for maximum possible scores. Some randomly generated games create a large search space, especially when seals, discards, whirlwind, and scoring combos interact.

Animation also had tricky edge cases. Cards needed to move between zones, flip between face-up and face-down states, reorder smoothly in the hand, and behave correctly while dragging over other elements. Motion layout animations needed careful timing and state handling to avoid instant flips or visual jumps.

Another challenge was adapting the game to Devvit’s environment: keeping the splash screen lightweight, using Redis correctly for persistent state, wiring scheduled jobs, and separating client, server, and shared code cleanly.

Accomplishments that we're proud of

I’m proud that the game feels like a real playable puzzle rather than just a prototype. It has animated interactions, audio feedback, daily puzzle state, leaderboards, random practice mode, help text, and persistent player coins.

I’m also proud of the automated puzzle generation. The game can search possible move lines, identify a maximum score, and use that information to generate daily challenges with a known target score.

The scoring system has grown into something with depth: traditional cribbage-inspired logic, special suits, modifiers, glass cracking, foil multipliers, seals, whirlwind, renewal, and other abilities all interact in ways that make the puzzle interesting.

What we learned

We learned a lot about balancing game logic between deterministic shared code and interactive UI state. The same rules need to power the player experience, the search algorithm, and backend validation later.

We also learned that animation-heavy card games require very explicit state transitions. A card changing zone, flipping visibility, and changing layout all at once can confuse animation systems unless the state changes are staged carefully.

On the Devvit side, we learned how to structure a web app with server routes, scheduled work, Redis persistence, and Reddit-hosted custom posts.

What's next for Cribago Daily Peg

Next, we want to add stronger server-side replay validation for leaderboard submissions, so submitted scores can be verified against the daily puzzle and move list.

We also plan to add cosmetics and a store using the player coin total earned from daily games. Other future improvements include richer leaderboards, more puzzle balancing tools, additional card abilities, better puzzle search optimizations, and more polish for the daily challenge experience.

Built With

Share this project:

Updates