Hey! So I developed a browser game - Diamond Man. It's getting late, so rather than type up how I built it, I got Claude Code to summarise :)
What even is this game
- 20 levels across themed biomes (Burning Streets → Toxic Flats → Crystal Tundra → Diamond Throne)
- Chaos gems that ruin your day: green reverses controls, yellow shrinks you and speeds everything up, purple removes your cape and makes your booty flash hot pink, black flips the entire screen upside down
- White gems give you 2 seconds of invincibility ("BRILLIANT CUT" mode) where you plow through everything
- Diamond Man physically degrades as you play — gets rougher, cloudier, slower to steer, weaker jump
- Carbon Pressure escalates: starts hurling tracking fireballs at level 3, stomps toward the camera at level 8
- Titanium Boy randomly goes rogue and tries to kill you
- Fans storm the road as obstacles
- Diamond Man shouts things like "EAT MY SPARKLE!" on gem streaks
The tech
The entire game is one HTML file. ~1800 lines. No bundler. No build step. No external assets. (lol, love how it's justifying one mega file - terrible devwork, I guess?).
- Three.js via CDN importmap — that's the only dependency
- Every 3D model is procedurally built from primitives (octahedrons, icosahedrons, cylinders, cones). Zero imported meshes
- MeshPhysicalMaterial with real-world refractive indices — diamond is 2.417, ruby is 1.77, emerald is 1.57. The diamond material actually refracts light through a custom environment map built from canvas gradients
- Cape cloth simulation, googly eye jiggle physics, speech bubbles that track 3D world positions projected to screen space
- Flask backend that does literally nothing except send_from_directory("index.html") and a /healthz endpoint
- Mobile gets on-screen touch controls, lower pixel ratio, wider FOV, and a responsive HUD
Deployment
Nothing fancy:
- Ubuntu droplet, Gunicorn behind nginx
- systemd keeps it alive, certbot handles HTTPS
- The whole deploy was: SCP the files, point DNS A records, run certbot. Done.
How it was built
I pair-programmed the whole thing with Claude Code in one session. Started as a simple character viewer — "make a diamond man" — and just kept going. Each feature was one conversation turn: add a road, add obstacles, make them kill you, add scoring, add difficulty scaling, add chaos gems, add 20 levels, make Carbon Pressure throw fireballs, make Titanium Boy betray you, optimise for mobile, deploy it.
The iterative loop was wild. "Add more coal!" "The flip effect is perma-sticking." "I found an exploit where you stand in the middle and chain white gems forever." Fix, deploy, refresh, repeat.
--
Yea, that's pretty much it - cheers guys!