r/vibecoding • • 34m ago

Showcase/Project I built a daily geography game with Claude Code over the span of 2 weeks, here's how it works under the hood

Hi! I made Off the Map (offthemap.fun), a daily geography trivia game inspired by Krillion. You get 3 prompts a day and drop a pin on a globe with no labels, and you score higher the more rare your answer is relative to other players. 107 of the 116 commits are co-authored with Claude Code, so I figured people here might like how it's put together.

Everything runs on Cloudflare. The part I'd point other people at is one Durable Object per day. All of a day's picks go through it one at a time, so two picks can never update the same count at once, and at midnight Pacific it writes the day's totals to D1.

The server also works out which country you clicked, so nobody can just send "Vanuatu". Clicking in the sea snaps to the nearest country, and a country inside another one wins over the one around it, so Lesotho is clickable.

Scoring needs other players to compare against, and on day one there aren't any. So each country starts with an estimate from Wikipedia pageviews plus Claude's guesses, worth 100 picks. For fellow stats nerds its basically a Bayesian prior. Your score only counts picks made before yours, so it doesn't change after you drop.

For design I keep two files in the repo. PRODUCT.md says who the game is for and the rules that don't change, like never showing the country name while you aim. DESIGN.md has the colors, fonts and a few rules like "only the main button gets the flame gradient". Claude reads them before any design work so it doesn't redo old decisions or drift from the look. Before each feature I have Claude grill me one question at a time with its recommendation, and a lot of features got cut that way.

Once it was playable I did a game feel pass in phases. First making a good pick feel good, then a hot air balloon that climbs higher the rarer your pick, then a heatmap of everyone's pins on the reveal. The sky behind the balloon is one fragment shader that takes a single altitude number between 0 and 1.

1 Upvotes

0 comments sorted by