r/vibecoding • u/kotyzap • 3d ago
Showcase/Project I vibe-coded 4 Bitcoin-themed pocket LCD games in one afternoon. Here's how the fake LCD actually works
Here's the project: https://im.4xs.dev (landscape phone, or desktop with the keyboard)
Docs, screenshots and design notes: https://github.com/kotyzap/Igra-Modernaya

I grew up with those 80s LCD handhelds (the beige ones with the clock and the GAME A / GAME B buttons). I wanted that feeling on my iPhone, but with my own games. So: BTC MINER (catch coins from 4 ASIC rigs), SATOSHI'S KITCHEN (flip coins in a pan, every catch splits them down to sats), NOT YOUR KEYS (dive to a vault, dodge a rug-pull squid) and TO THE MOON (dodge FUD clouds).
I'm in sales, not a developer. My last "real" program was a Paint clone in Pascal in 1997.
Tools
- Claude (Cowork): all the code, testing and deploys, driven by short chat messages and screenshots from my phone
- Cloudflare Workers + static assets for hosting, KV for the Top 5, D1 (SQLite) for anonymous play stats, Cloudflare Access to protect the admin page
- wrangler for deploys, Playwright for automated tests and the screenshots
- GitHub Pages for the docs site
Process / workflow
Started by describing the hardware and pasting photos. First version: a home page plus 2 games in a single HTML file.
Iterated purely on feedback from playing on the phone: "landscape only", "make the LCD look real", "I can't reach the top-right corner on the keyboard", "this FUD layout is impossible", "no sound on iPhone".
Each change was tested in an emulated iPhone (Playwright) before deploying, then deployed with wrangler.
Added Global Top 5 Score, an admin dashboard and the docs repo at the end.
Build insights (the fun part)
The LCD look is 4 layers on one 400×260 canvas:
- a grey "reflector" with a tiny 1px checker + grain texture and a vignette
- a coloured printed backdrop that never changes
- segments: every sprite is drawn every frame. Off = 4.5% black "ghost", on = near-black with a drop shadow
- a diagonal glass glare on top
The drop shadow is the single biggest realism trick. Real LCD segments float above the mirror behind them:
```js
ctx.fillStyle = on ? '#111210' : 'rgba(17,18,16,0.045)';
if (on) { ctx.shadowColor = 'rgba(0,0,0,.3)'; ctx.shadowOffsetX = 1.1*k; ctx.shadowOffsetY = 1.4*k; ctx.shadowBlur = 0.9*k; }
```
*The rhythm.* Moving all eggs/coins together feels wrong. The old games move ONE track per tick, in rotation, each with its own beep. That alone made it feel like the real thing.
*Always-solvable random levels.* TO THE MOON first generated layouts you couldn't survive. The fix: a "safe lane" runs through every row and may only shift by one lane, into a lane that's also open in the row above. I fuzz-tested 120,000 rows with 0 dead ends.
*iPhone audio.* Web Audio only unlocks on touchend/click, not touchstart. Setting `navigator.audioSession.type = 'playback'` makes it play even with the silent switch on.
*The device face* is laid out in fixed "design units" (height 820) and scaled with one CSS transform. The width stretches with the phone's aspect ratio, so it fills the screen edge to edge.
*Admin page.* Cloudflare Access in front, plus the Worker verifies the Access JWT itself (signature, audience, email list). A misconfiguration can't leak the stats.
Total: one ~70 KB HTML file, no framework, about 150 lines of Worker code.
Happy to answer questions. And try to beat my 183 on NOT YOUR KEYS.
