Morphy Chess
Inspiration
I love chess, but I've watched countless friends bounce off it. The rules are a wall: castling, en passant, which piece moves how, why you can't just take that thing right there. The depth is real, but the on-ramp is brutal.
So I asked a different question: what if there were a chess-flavored game with exactly one rule, learnable in a single sentence?
That became Morphy Chess:
Every move must be a capture — and your piece morphs into whatever it takes.
You start as a knight, capture a bishop, and now you move like a bishop. Capture a rook, now you're a rook. Clear the entire board and you've solved the puzzle. There's nothing to memorize: if you can capture, you can play. The chess intuition emerges naturally as you play, instead of being a prerequisite for playing.
I wanted it to live where people already are, with zero install friction — so I built it to run instantly inside Reddit as a Devvit app. No download, no account, no rules screen: tap the post and you're playing.
What I learned
- Constraint is a feature, not a limitation. Reducing chess to "every move captures, you become what you take" didn't make a shallower game — it made a different one, with its own emergent depth (you're constantly planning which piece you want to be three moves from now).
- The hardest part of a puzzle game isn't the puzzles — it's the difficulty curve. Getting players into flow meant building an adaptive ramp that tracks skill and serves puzzles just above it.
- Building on Reddit means building inside someone else's runtime. Devvit's webview has real constraints, and designing with them instead of against them is the whole game.
- A great first screen is the entire pitch. On Reddit, a player decides in one second whether to tap. The splash and the very first move have to sell the whole concept instantly.
How I built it
The engine. A small, dependency-free TypeScript core models the board, generates legal capture-only moves, applies the morph (the moving piece adopts the captured piece's type), and detects the solved state (board cleared). Because every move is a capture, a puzzle's par equals its enemy count:
$$\text{par} = |{\text{enemy pieces}}|$$
Adaptive difficulty. Each player carries a hidden skill rating $s$. After every result the rating eases toward the puzzle's difficulty $d$ with a damped update:
$$s \leftarrow s + \alpha\,(d - s), \qquad \alpha = 0.35$$
The next puzzle is then sampled from a window just above the current rating, so the game keeps players in the zone where it's challenging but winnable — never grinding, never crushing.
The Reddit app (Devvit). The game runs as a custom post inside Reddit, backed by a Hono + tRPC server and Redis. Redis stores player profiles, Crowns (the in-game currency), rating tiers, a one-time tutorial flag, and a global leaderboard — so an entire community competes on the same board. I also built a moderator-only admin panel (a separate, mod-gated post entry) to inspect live stats and reset or edit the leaderboard.
Designing for the platform. Devvit's webview has quirks that shaped the whole build: persistent preferences live in Redis because the webview URL changes on each published release and wipes localStorage; destructive actions use an in-app two-step confirm because the iframe can't use window.confirm; mascot clips ship as alpha HEVC .mov so they render with transparency on iOS; and the entire layout is built to fit fullscreen on both mobile and desktop without scrolling, in line with Reddit's featuring requirements.
Challenges I faced
- Difficulty that feels fair. My first ramp oscillated — players got whiplash between trivial and impossible. Damping the update ($\alpha = 0.35$) and softening the sampling window turned a frustrating sawtooth into a smooth climb that keeps players in flow.
- Performance on a real board. Naively re-solving each puzzle to validate a submission was too slow on the largest boards, so I precompute and cache each puzzle's par and validate against that instead.
- One game, every screen. Reddit serves the same post to phones and desktops, and the experience has to feel native on both — readable, tappable, and scroll-free at every size. Getting a board, HUD, and controls to fit any viewport without compromise took real layout surgery.
- Working within the iframe. Things you take for granted on the web — alerts, haptics, stable storage URLs — behave differently (or not at all) inside Devvit. Each one became a small design problem with a platform-appropriate solution.
What's next
A multi-mode direction that leans into Reddit's social nature — daily community puzzles, hand-made boards shared by players, and seasonal leaderboards — turning a solitaire puzzle into a place a community returns to every day.
Built With
- hono
- javascript
- node.js
- trpc
- typescript