inspiration
i wanted to build a logic-based grid puzzle for the community. it’s a 6x6 or 8x8 grid where players find a hidden ghost using distance clues. there are no complicated rules just a quick puzzle to play, a leaderboard to compare times, and a way for me to learn devvit's global state management in a short timeframe.
what it does
daily puzzle: every player in the subreddit hunts the same ghost at the same coordinates for 24 hours.
community contracts: winners unlock a level editor. they can hide their own ghosts, set custom move limits (speedruns), or crank up mine density (elite traps). these custom challenges are posted to the subreddit for others to solve.
bounty system: players earn "contracts completed" stats by solving user-generated puzzles, turning the game into an infinite content loop.
social mission reports: upon completing a puzzle, players can click SHARE to generate a"System Report" in the comments.
distance clues: tapping a tile gives a "signal strength" (0-100) based on how close you are to the ghost.
daily streaks: a dedicated tracking system that rewards players for winning on consecutive days.
persistent progress: your attempts and scans stay saved even if you close the app.
leaderboards: separate rankings for scout (easy), ranger (medium), and elite (hard) modes, plus a global streak leaderboard.
live agent tracking: a real-time counter in the menu displays how many unique "agents" have initiated a search today.
how i built it
- dynamic ugc engine: i used reddit's submitpost api combined with redis. when a user designs a level, i serialize the board state (ghost location, mine seeds, difficulty settings) and store it in redis linked to the new reddit post id. opening that post hot-loads the custom level data.
- logic engine: the feedback system uses euclidean distance between the tap and the ghost: $$d = \sqrt{(x2 - x1)^2 + (y2 - y1)^2}$$. this converts into a 0–100 signal strength meter.
data layer (redis)
global sync: the ghost's location is stored under a date-stamped key.
streak logic: i implemented a date-check algorithm that compares lastwin date with the current date to manage streaks.
state management: redis stores scannedtiles and attempts for seamless resuming.
leaderboards: sorted sets (zadd) handle real-time rankings.
- active user telemetry: i used redis sorted sets (zcard) to track unique user ids per day for live community feedback.
- ui layer: built with devvit blocks, scaling dynamically between 6x6 and 8x8 grids with a terminal-themed aesthetic.
challenges i ran into
context switching: handling the logic jump between loading a "daily game" (date-based) and a "custom user puzzle" (post-id based) without crashing the app state.
state syncing: managing the handoff between local ui state and persistent redis data to ensure progress is never lost.
streak validation: handling time-zone logic to ensure streaks are calculated fairly for a global audience.
responsive grids: designing an interactive 8x8 grid that remains touch-friendly on mobile.
accomplishments that i'm proud of
players can create: successfully building a level editor that lets users generate content for the community.
integrated streak system: building a persistent reward loop that encourages daily play.
persistent state: implementing a "save-game" system so players can finish their hunt later.
global daily sync: creating a synchronized community event where everyone hunts the same target.
what i learned
building this taught me how to manage a database (redis) inside a reddit app. i learned how to structure data keys so the game loads fast, how to handle daily resets, and how to link reddit posts to custom database entries for user-generated content.
what's next for spectral signal
-weekend "multi-ghost": a 10x10 super-elite grid where players must triangulate 3 separate ghosts hidden among 25 mines without hitting a single trap.
-dynamic reddit user flairs: rewarding winners with temporary subreddit flairs (e.g. 🏆 breach master) that expire after 7 days.
- visual "death static": tracking coordinates where players fail—tiles with high death counts will appear as flickering visual "static" on the grid, serving as a digital warning from previous agents.
UI & UX Evolution: Refining the visual interface and integrating haptic soundscapes with a guided onboarding tutorial to fully streamline the player experience.
Built With
- devvitsdk
- node.js
- redditapi
- redis
- typescript
Log in or sign up for Devpost to join the conversation.