Inspiration

Pattern recognition is fundamental to how we think and solve problems. I wanted to create something that'd actually challenge people to think analytically while giving them that satisfying "aha!" moment when they crack a pattern. The idea came from those classic IQ test puzzles, but I figured they needed a modern twist with proper progression and rewards to keep people engaged.

What it does

PatternHunt is a pattern recognition game where you look at examples and figure out the hidden rule, then solve a challenge based on that pattern. There are over 30 different patterns covering everything from basic math to text manipulation to more complex stuff like the Collatz conjecture and Morse code.

The game has three difficulty levels that adapt based on how you're doing. You earn XP and unlock achievement badges as you progress, plus there are daily challenges with special rewards. There's a live leaderboard so you can see how you stack up against other players, and you can share your results. You can also unlock different visual themes and use coins you earn to get hints when you're stuck.

How we built it

I built this on Reddit's Devvit platform using React 19 and TypeScript for the frontend, with Tailwind CSS handling the styling. The backend runs on Express with Redis managing the game state. The core game logic includes all 30+ pattern algorithms, from simple digit addition to complex mathematical sequences.

The whole thing needed to work perfectly on mobile since that's where most Reddit users are, so I designed an ultra-compact UI that fits in Reddit's constrained viewport. The architecture separates client and server code cleanly, with shared TypeScript types to keep everything consistent. Real-time features like the leaderboard update live, and there's proper social integration for sharing results.

Challenges we ran into

Getting a complex game interface to work well on mobile was probably the biggest headache. Reddit's mobile viewport is pretty constrained, so fitting all the game elements without making it feel cramped took a lot of iteration.

Balancing the difficulty across such diverse pattern types was tricky too. Some patterns are naturally harder to spot than others, so I had to adjust scoring and progression to keep things fair. Performance was another concern since I wanted to keep the bundle size under 200KB while still having rich functionality.

Managing all the game state with achievements, streaks, and progression systems got complex pretty quickly. And finding that sweet spot where patterns are challenging but not frustrating required a lot of testing and tweaking.

Accomplishments that we're proud of

I managed to create 30+ genuinely unique patterns that range from basic math operations to advanced algorithms most people haven't heard of. The gamification system turned out really well with a full XP progression, 15+ achievement badges, unlockable themes, and a coin economy that actually feels rewarding.

Performance-wise, the app loads in under 2 seconds even on slower connections, and the mobile experience is smooth across all devices. The engagement features like streak bonuses, leaderboards, and social sharing seem to be working since people keep coming back to play.

What we learned

Pattern recognition games need really careful balance between being challenging and accessible. Too easy and people get bored, too hard and they give up. Mobile-first design isn't optional for Reddit apps, it's absolutely critical for success.

Gamification elements make a huge difference in user engagement and retention, but they have to feel natural, not tacked on. TypeScript and proper architecture become essential when you're dealing with complex game logic and state management. And adding social elements can create a sense of community even around what's essentially a single-player game.

What's next for PatternHunt

I'm planning to add multiplayer mode where people can race to solve patterns in real-time. User-generated content would be cool too, letting players create and share their own patterns. A tournament system with weekly competitions could add more competitive elements.

On the technical side, I want to add more detailed analytics so players can track their performance over time. There are also some monetization opportunities with premium themes, power-up packs, and maybe a subscription tier for an ad-free experience with bonus features.

Share this project:

Updates