Inspiration
A few years ago I played a mobile puzzle game whose name I do not quite remember anymore. It had a wooden board and strings you pulled into shape. I played it in spare moments, between classes and commutes.
When Reddit's "Games with a Hook" Hackathon opened, I looked for an idea that would fit the criteria they laid out: a game that gives people a reason to come back, something that feels at home in a Reddit post, and something that is not another space shooter or platformer (the two categories they specifically said they had seen enough of). I thought back to that old string game. The core loop was proven fun (the puzzle genre has a thousand levels on both app stores), and nobody had brought it to Reddit yet. I convinced myself it could work.
What it does
Rope & Nails is a string-art puzzle game that lives inside Reddit posts. Every puzzle is a wooden board with nails hammered into it, and colored strings stretched between them. The player does not draw strings from scratch. The strings already exist, pinned at both ends, stretched straight like a rubber band between two points. The player grabs a string along its length and hooks it onto an empty nail to bend a new corner. They keep doing that until the strings match a faint target silhouette drawn on the board. When the shape matches, the puzzle solves itself automatically. No check button. No "am I done yet."
Strings can cross each other at a point (the game draws a small weave effect so you see which goes over which). They cannot lie on the same path, because two ropes cannot occupy the same space on the board.
The game runs entirely inside Reddit's embed system. A player opens a post, taps "Play," and starts solving. In the same interface they can publish puzzles of their own design, browse a leaderboard, collect theme rolls, and keep a daily streak.
How I built it
I used a platform called Devvit Web, which is Reddit's own way of running mini-apps inside posts. The game logic and the visuals are separate. The math that checks whether a puzzle is solved correctly lives in its own folder with no outside dependencies, so both the server and the game screen can use it without duplicating code.
The server side stores puzzles, keeps track of scores, posts the daily puzzles on a timer, and handles the coin system for hints and theme rolls. It runs on Reddit's infrastructure. I found early on that network connections can drop for no good reason, so every request to the database retries a few times before giving up, and every route handler has a safety net that returns a plain error message instead of crashing.
The game screen is built with Phaser, a 2D game framework. It runs inside a webview in the Reddit app. The board is drawn fresh every frame, but since most of it (the wood panel, the nail holes, the frame) never changes, I cache that part into a hidden image and only redraw the moving parts: the strings, the preview ghost, and the settle animations. This was the single most important optimization for making the game run smoothly on phones.
The biggest mistake happened on day one. I built the first prototype with the wrong mechanic. The player drew lines between nails like connecting dots. That is not how the game actually works. The real mechanic bends a string that already exists. I had to throw out most of the code on July 12 and rebuild. The shape-matching math survived because it compares the final picture, not how you got there. Everything else had to change.
Challenges I ran into
The hardest problem was mobile performance. On some phones the game ran at a noticeably low frame rate, and the dragging and settle animations did not feel smooth.
I spent more time on this than on any other single bug or feature. The root cause was that the game runs inside a sandboxed webview in the Reddit app. Sandboxed webviews often cannot access the phone's graphics processor directly, so everything has to be drawn by the CPU instead. Drawing smooth 60-frame-per-second graphics on the CPU is hard, especially on phones with high-resolution screens where every frame has millions of pixels to fill.
The fix had two parts. The first was capping how many pixels the game tries to draw. High-resolution screens look sharper but cost more performance, so I found a middle ground that kept motion smooth while staying crisp enough that the board did not look blurry. The second was avoiding unnecessary work. Most of the board (the wooden panel, the nail holes, the frame) never changes, but the game was redrawing all of it from scratch 60 times a second. I changed it so the static parts are drawn once and only the moving strings get redrawn every frame.
It is not a perfect fix. On the slowest phones there is still a ceiling you cannot push past. But it went from noticeably laggy to smooth enough, and that made the difference between a game people would play and one they would close immediately.
Accomplishments I am proud of
I started this project five days ago having never built a game before. I had never used Phaser. I had never deployed anything on Reddit's platform. By day five the game had the daily puzzle scheduler, a gacha system for board themes, 120 achievements, a coin economy, a dashboard with leaderboards, a puzzle editor that guarantees solvable-by-construction publishes, and a share-to-comments flow. The architecture checks pass, the typecheck passes, and all tests pass.
When I watched someone else play it for the first time and saw them figure out the hook mechanic, I knew I had built something that worked. That moment was worth the five days of work.
What I learned
I learned that Devvit Web is a capable platform with sharp edges. The webview sandboxing means you cannot assume GPU access, so the default Phaser config (auto-pick renderer) gives you the worst possible performance. Canvas2D forced explicitly is the right choice. I also learned that gRPC connections to Redis can fail transiently and that an unhandled promise rejection in an Express route handler logs as "Fatal" on the platform, which makes it look like your server is crashing when it is not.
I learned that when you have five days to ship, scope discipline is everything. The first mechanic mistake cost me a day. If I had not prototyped the wrong thing first, I would have saved that day. But I also would not have understood why the right mechanic was better.
I learned that game development is different from the web development I was used to. Performance is not about bundle size or network requests. It is about pixel fill rates, retained-mode renderers, and the cost of a full-canvas clear. The debugging process for a frame rate problem has nothing to do with React DevTools or network waterfalls. You measure. You isolate. You find the bottleneck (it was pixel fill, not logic, not input) and you attack that specific thing. You do not guess.
I also learned that having people play your game and give feedback is the best part of building it. I had genuine fun watching people try the puzzles and hearing what they thought. I want more of that.
What is next for Rope & Nails
The immediate next step is getting people to play it. The submission goes in by July 15. After that, I want to see the community try the puzzles, publish their own, and find the patterns that are fun to solve.
The game is feature-complete for what I set out to build. But there are things I want to add. A space where players can browse published patterns sorted by popularity and vote on the ones they like most. That would give the best creators recognition and give new players a curated list of puzzles to try. More board themes, because the gacha system works better with a larger pool. A proper daily streak leaderboard that resets monthly, so players have a reason to come back beyond the personal streak.
For now, the thing that matters most is having people open a puzzle post, figure out how to hook a string around a nail, and feel the satisfaction of the board matching the target.
Built With
- devvit-web
- express.js
- phaser-3
- redis
- typescript
- vite