Inspiration
I love r/place, but it happens once every few years. I wanted a small piece of it every day, in any community, with a twist borrowed from auction games: every pixel has an owner, and anyone can buy it from them. Play money only, nothing to buy.
What it does
Every day at 00:00 UTC, Pixel Baron posts a fresh canvas with a theme chosen by the moderators.
- Everyone gets free coins each day (100, up to 200 with a daily streak). A free pixel costs 1 coin.
- Any pixel can be bought from its owner for about 1.5× its last price. The previous owner gets back what they paid plus half of the increase, so being outbid never hurts.
- A pixel that was just bought is protected for 15 minutes, so drawings can grow without instant sniping.
- At midnight, whoever owns the most pixels becomes the Pixel Baron of the day and wins a crown. Crowns unlock rare colors.
- Three daily missions give bonus coins, and live name tags show who just painted what.
- When the day ends, the app posts a results comment, and the finished canvas can be replayed purchase by purchase and shared.
Moderators get one menu for everything: upcoming themes, canvas size (32 × 32 or 64 × 64), reset with refunds, wiping an area, and banning a player from painting.
How I built it
Pixel Baron is a Devvit Web app: a React + Tailwind client that plays entirely inside the feed post (taps only, no scroll capture), and a Hono server that keeps all state in the app's Redis.
- The canvas is stored as two compact strings (one character per pixel for color, one for price level), so a full 64 × 64 canvas loads in a single small request.
- Purchases update everyone instantly through Devvit Realtime, with polling only as a fallback when the connection drops.
- The scheduler closes the round at midnight, awards the crown and opens the next canvas. A second task runs every minute to clean up interrupted purchases.
- The replay is stored as 3 characters per purchase, so even a busy day costs only a few kilobytes.
Challenges
- No transactions. Two players can buy the same pixel in the same millisecond, and a request can be killed halfway. Each purchase reserves its slot first, and a reservation that never completes expires and refunds the buyer.
- An economy you cannot farm. Two friends buying a pixel back and forth would print coins if refunds were too generous. Burning half of every price increase makes that always a loss.
- Playing inside the feed. No pinch, no drag, no scroll trap: the 64 × 64 canvas zooms with a single tap instead.
- Platform limits. External images are blocked, so name tags replaced avatars. Global storage is not available yet, so crowns belong to each community.
What I learned
How far a game can go inside a single post when the server, not the client, owns every rule. And how much fairness matters in a game where everything can be taken from you: protection windows, refunds and tie-breaks ended up being the core of the design.
What's next
First-time hints for new players, a personal end-of-day recap, Devvit Journeys analytics, and publishing the app for other communities once the hackathon is over.
Built With
- devvit
- hono
- node.js
- react
- redis
- tailwindcss
- typescript
- vite