Inspiration
I've always been drawn to games that have simple mechanics but deep challenge curves (think Sudoku or Wordle), and I wanted to create something that scratched that same itch but feels fresh. The idea for Hex Beam came to me while I was bored at work - I started sketching out what a hexagonal mirror puzzle might look like on paper, figuring out how beams would reflect off angled surfaces. The rest is history ...
What it does
Hex Beam is a light-bending puzzle game. Each level presents you with a hexagonal grid filled with mirror tiles. Your job is to rotate the tiles until every beam of light travels from the central source to its matching goal marker on the edge of the grid.
The game has two modes:
- Daily Challenge: A new puzzle drops every day, seeded by the date so everyone in the Reddit community solves the exact same puzzle. A countdown kicks off the timer, and your completion time gets ranked against all other players. It's a race.
- Infinite Mode: An endless progression of procedurally generated puzzles that vary in difficulty — starting with simple two-beam layouts and eventually throwing six-beam monsters at you on massive grids. Your highest level is tracked on a global leaderboard.
Both modes have leaderboards, so there's always something to compete for.
How we built it
The frontend is React running inside Devvit's webview system, styled with Tailwind CSS. The puzzle generation is entirely procedural: there's a recursive pathfinding algorithm that carves out solvable beam paths through the grid, places mirrors along those paths, then scrambles everything so the player has to figure it out. Getting that generator to produce puzzles that are actually fun (not just technically solvable) took a lot of iteration.
The backend uses Devvit's Redis integration for persistence - leaderboards, user progress, daily challenge scores. Daily challenges are created automatically via a scheduled job that posts a new puzzle each day.
I did a lot of playtesting on my phone to make sure the mobile experience felt right. Pinch-to-zoom and drag-to-pan were essential for the larger grids.
Challenges we ran into
Procedural level generation is hard. Early versions of the generator would create puzzles that were either trivially easy (beams already pointing the right way) or technically solvable but boring (straight lines to the goal). I had to add a "tortuosity" factor to force the paths to wind around the grid, plus a waypoint system for the hardest levels to guarantee interesting solutions.
Another challenge was making the game feel good on mobile without sacrificing the desktop experience. Hex grids don't scale nicely on small screens, so I added a zoomable/pannable container. Getting the touch interactions to feel natural (tap to rotate, pinch to zoom, drag to pan - without conflicts) took more tweaking than I expected.
Accomplishments that we're proud of
- Dual leaderboard system: Infinite mode ranks by highest level reached, Daily mode ranks by fastest completion time. Two different ways to compete, two different skills being tested.
- The procedural generator actually works: Every puzzle is guaranteed solvable, scales in difficulty, and (I hope) feels satisfying to solve.
- Daily challenges feel like an event: The countdown timer, the shared puzzle, the speed leaderboard: it gives the community something to rally around each day.
- It's polished: Sound effects, smooth animations, a clean glassmorphism UI, a tutorial video, responsive design across devices. I wanted it to feel like a "real" game, not a hackathon prototype.
What we learned
Reddit is an incredible platform for puzzle games, especially ones with daily content. The community aspect is baked right in. Players can discuss strategies in the comments, compare times, generally cooperate (or compete).
I also learned that Devvit is way more capable than I initially thought. Building a full game with persistent leaderboards, scheduled posts, and cross-platform play was totally doable and honestly fun.
What's next for Hex Beam
I'd love to work on expanding the core puzzle mechanics. New game modes like:
- Portal hexes: Beams enter one portal and exit from another somewhere else on the grid.
- Gear hexes: Multiple tiles linked together that rotate as a unit: turn one, they all turn.
- Longest path challenges: Instead of just connecting beams to goals, optimize for the longest possible route.
- Cooperative puzzles: Multiplayer puzzles where different players control different colored beams and have to coordinate.
On Reddit specifically, I want to seed and keep growing the r/HexBeam community. Weekly tournaments, seasonal events, maybe even a "puzzle of the week" voted on by players.
Built With
- devvit
- react
- vite
Log in or sign up for Devpost to join the conversation.