Inspiration

Firefly Garden is the Reddit adaptation of Fireflies: Cozy Offline Puzzle, an Android logic game about placing fireflies and mixing colored light.

The original idea came from combining the calm atmosphere of a nighttime garden with exact, rule-based deduction. Instead of matching shapes or numbers, players reason about beams of colored light and how those colors combine on flowers.

For the Reddit Games with a Hook Hackathon, we wanted to turn that solitary puzzle experience into something shared. Everyone receives the same three puzzles each day, but every player also contributes to a larger community competition.

The first time someone enters the garden, they are randomly assigned to one of two groups: the Nightshades or the Primroses. Their puzzle scores contribute both to their personal leaderboard position and to their group’s collective score.

This gives every daily puzzle a wider purpose. Players are not only solving for themselves. They are helping their side of the garden grow brighter.

What it does

Firefly Garden is a daily light-placement puzzle that runs directly inside an interactive Reddit post.

Players select colored fireflies and place them on a grid. Each firefly emits light horizontally and vertically. Every flower must receive exactly the color it requires.

The puzzle system includes:

  • Red, green, and blue light that can combine into secondary colors
  • Fixed fireflies that form part of the puzzle
  • Prisms that split and redirect colored light
  • Mirrors that change the direction of beams
  • Animated, moving, and merging light beams
  • Hints, undo, and reset controls
  • Music, sound effects, and a complete level-clear celebration
  • Guided tutorial levels and mechanic introductions

Three shared puzzles appear each day and change at midnight UTC. The current catalogue contains 45 daily puzzles, providing a 15-day rotation before later cycles rearrange the available levels.

Groups and leaderboard

When a player first enters the game, they are randomly assigned to either the Nightshades or the Primroses. That assignment is remembered for their Reddit player identity.

The leaderboard displays:

  • Every participating player
  • Their personal cumulative score
  • Their assigned group
  • Their overall rank
  • The collective Nightshades score
  • The collective Primroses score

This creates two connected competitions: players can compete for an individual leaderboard position while also contributing to their group’s total.

Scoring

Each daily puzzle has a maximum score of 100.

  • Solving with the minimum required number of placements awards 100 points.
  • Each additional move deducts 5 points.
  • Each Hint use deducts 20 points.
  • A successfully completed puzzle can never award fewer than 10 points.
  • Tutorial and mechanic guide levels do not award points or count toward the three daily puzzles.

The server independently verifies the submitted board and recalculates the score before adding it to the leaderboard. A daily puzzle can only contribute to a player’s cumulative score once.

The game works on both mobile and desktop Reddit.

How we built it

The Reddit version is a standalone rebuild created specifically for the Reddit Developer Platform. It does not depend on the Android application at runtime.

The interactive client was built with:

  • React and TypeScript
  • Vite
  • CSS
  • HTML5 Canvas
  • Devvit Web
  • Artwork and audio adapted from the Android game

Canvas handles the board, tiles, flowers, fireflies, special mechanics, animated beams, color mixing, and the level-clear celebration.

A Hono server selects the shared daily puzzles using the current UTC date. It also manages player profiles, group assignments, tutorial progress, daily attempts, score validation, and leaderboard data.

Devvit provides the interactive Reddit post, player context, app installation, and persistent Reddit-backed storage.

The leaderboard uses persistent score and player records. The server stores each player’s cumulative score and group, ranks the complete player list, and calculates the two collective group totals.

The original puzzle rules were carefully reproduced for the Reddit version, including beam propagation, color mixing, fixed pieces, prisms, mirrors, hints, completion detection, scoring, and the Android game’s timed celebration sequence.

Python tools and player-rating calibration data were used to evaluate puzzle difficulty and construct the daily puzzle catalogue.

Challenges we ran into

The original Android game was designed around a tall mobile screen, while Reddit interactive posts need to work inside mobile, desktop, and fullscreen containers. Each format has different proportions and available space, so the board and controls required separate responsive arrangements.

Porting the light simulation was another major challenge. A single placement can affect several rows, columns, flowers, fixed pieces, prisms, mirrors, and overlapping colors. The Reddit implementation needed to remain consistent with the original puzzle rules while drawing everything smoothly inside Canvas.

Reproducing the Android beam and celebration effects in a browser also required substantial work. The beams needed to move, breathe, merge, glow, and remain contained inside their tiles. The completion sequence required synchronized flower sparks, a central gathering effect, expanding rings, glitter, sound, and a delayed results panel.

Persistent competitive scoring introduced a different kind of challenge. The game could not simply trust a score sent by the client. The server validates the submitted firefly positions, confirms that the puzzle is genuinely solved, recalculates the score, and prevents the same daily puzzle from awarding points more than once.

We also needed to handle Reddit players who do not expose a username. These players receive a consistent Garden Guest name so they can still participate in groups and appear on the leaderboard.

Finally, we had to decide which parts of the Android game belonged on Reddit. Advertising, purchases, Android navigation, and other platform-specific systems were excluded so the Reddit version could remain focused and quick to open.

Accomplishments that we're proud of

We are proud that Firefly Garden is playable directly inside a public post in r/FirefliesPuzzle.

The Reddit version now includes:

  • Three shared puzzles every day
  • A 45-puzzle daily catalogue
  • Random Nightshades or Primroses assignment
  • A complete individual leaderboard
  • Collective scores for both groups
  • Server-validated scoring
  • Persistent player progress
  • Guided tutorial levels
  • Firefly placement, removal, undo, and reset
  • Exact RGB light mixing
  • Fixed fireflies, prisms, and mirrors
  • Animated beams and color merging
  • Music and gameplay sound effects
  • An Android-inspired level-clear celebration
  • Responsive mobile, desktop, and fullscreen layouts

Most importantly, the submitted game is not simply the Android screen placed inside a web page. It is a dedicated Reddit implementation with its own responsive interface, daily puzzle system, persistent player identities, server-validated scores, group competition, leaderboard, and interactive-post integration.

What we learned

We learned that adapting an existing game to a new platform is often closer to rebuilding it than simply porting it.

Reddit’s post format changed how we thought about the game. A mobile campaign is primarily designed around individual progression. A Reddit game works better when it creates a shared event and gives players something to discuss, compare, and contribute toward.

The Nightshades and Primroses transformed the daily puzzle from an isolated challenge into a lightweight community competition. Even a player far from the top of the individual leaderboard can still help their group.

We also learned that competitive systems require a clear source of truth. Scores must be recalculated and validated on the server rather than accepted directly from the browser.

Finally, we learned how strongly loading behavior, responsive placement, animation timing, audio, and Canvas redraw quality affect the perceived polish of a small game.

What's next for Firefly Garden

Future updates could include:

  • Daily and weekly leaderboard views
  • Seasonal Nightshades versus Primroses competitions
  • Spoiler-free result cards for sharing scores
  • Puzzle streaks and returning-player milestones
  • Group-specific visual rewards and garden progression
  • More puzzle mechanics and larger daily rotations
  • Special weekly challenges
  • Community statistics and completion rates
  • Additional difficulty calibration using player results
  • Group comparison methods that account for differences in group size

Longer term, we want Firefly Garden to feel like an ongoing Reddit community event: quick to open, satisfying to solve, and meaningful to every player’s side of the garden.

Built With

Share this project:

Updates

Submission history