Skip to content
Paul Kerrison
Go back

Known Unknowns

Edit page
Known Unknowns

Gold Fever is a daily strategy game loosely inspired by reality TV gold mining. You have ten weeks, three action points per week, a grid of hidden terrain, and somewhere underneath it all, a paystreak of gold. Find it. Mine it. Don’t go broke.

The interesting part is not the gold. The interesting part is the terrain.

The Map

Each daily puzzle is a ten-by-ten grid. Most squares are hidden. Drilling a square costs one action point and reveals what is underneath: material, depth, and gold content. But not all squares need drilling, because the terrain gives clues before you spend anything.

Creeks are the main indicator. Seventy percent of the time, the paystreak runs beneath a creek. This is not guaranteed, but it is good enough to shape your strategy from week one. Trees always have shallow depth — depth of one — so they are cheap to mine but rarely rich. Cliffs are impassable. Ponds have gold but require a water pump to access.

The decorative terrain types — scrub, dry grassland, deadfall, loose rocks — are visual filler. They appear in tooltips with their names and icons but carry no gameplay information. The distinction between indicator and decorative terrain is baked into each square at generation time and determines whether hovering a square shows you useful rules or just a coordinate label.

The Engine

The paystreak is generated by a random walk across the grid. The walk avoids cliff squares, runs for between eighteen and twenty-two squares, and the first and last three squares of the path become black sand edges. The rest are gold. Off the path, ponds are scattered at an eight percent chance and trees at four percent. The cliff clusters come first, in a pre-pass, so the walk can filter them out.

All of this is deterministic. The seed is the current date string, hashed with djb2 into a 32-bit integer, fed into a Mulberry32 PRNG. The same date produces the same puzzle for everyone, which is what makes it a daily game rather than a singleplayer sandbox. The same PRNG approach appears in This or That for question selection. It works, requires no server coordination, and means the puzzle can be generated entirely client-side with no database.

There is no database. The whole game runs in the browser.

The Equipment Shop

Equipment compounds over the season. The choices are:

An Excavator processes five grid operations per dig. A Loader processes two. The Excavator costs three times as much to hire and has a weekly maintenance cost. Early in the season, with limited cash and uncertain paystreak location, the Loader is often the right call. Once you know where the gold is, the Excavator pays for itself.

The Sluice Box recovers ninety-nine percent of mined gold but processes only five ounces per week. The Trommel processes ten ounces per week at eighty percent recovery. If you find a rich paystreak and can mine faster than the Sluice can process, gold sits in the stockpile until the final week flush. The Trommel’s lower recovery rate costs you, but throughput matters more once the stockpile is backing up.

Optional upgrades add revenue multipliers. The Derocker adds twenty percent to revenue. The Shaking Table adds fifteen percent purity. The Water Pump is required to mine pond squares and costs nothing else. Equipment can be traded in mid-season at fifty percent of original cost, so a week-one Excavator is not a permanent commitment.

Global Events

Two events interrupt the season at fixed weeks.

Permafrost arrives at week five. You can pay a thousand pounds to thaw it permanently, or you can work overtime: two extra action points that week, with a twenty percent chance of equipment breakdown per mine. The breakdown is itself an event at week eight, where you either pay eight hundred to repair fully or spend an action point on a quick fix that costs nothing but leaves you short for the rest of the week.

These events are scripted rather than random. Everyone faces the same week five decision and the same week eight breakage. The variance comes from your state at that moment: how much cash you have, how deep you are into the paystreak, how much stockpile is waiting to be processed.

The Share Card

After the season ends, the share text is a row of ten dots: gold for weeks where you ended with more money than you started, red for weeks where you did not. No map layout is revealed. Someone reading the share card knows whether you had a profitable week but not where you drilled, what terrain you found, or how close you got to the paystreak before giving up.

This was a deliberate decision. The map is the puzzle. Sharing it would ruin the next player’s experience.

The Stack

Next.js 16, React 19, TypeScript, Tailwind 4. lucide-react for the terrain icons — Leaf for scrub, Wind for dry grassland, TreeDeciduous for deadfall, Hexagon for loose rocks. next-auth is present in the dependencies and not currently doing much. No external game library, no physics engine, no canvas. Just React state and a grid.

The entire game state fits in a single object that gets updated by an action dispatcher. The engine file is the pure logic layer: generation, action resolution, yield calculation, share text. The components read from state and dispatch actions. It is not a complicated architecture because it does not need to be.

RESULT

It’s live at goldfever.baudypositive.com. The daily puzzle works. The terrain deduction holds up. The equipment economics are not perfectly balanced but are interesting enough to create genuine decisions.

The thing that surprised me most during development was how much the terrain system did for the game without adding much code. Four indicator types, a handful of probabilities, and the map becomes a logic puzzle rather than a guessing game. The creek is not a guarantee. It is information. What you do with it is the game.


Edit page
Share this post:

Previous Post
No Scroll Policy
Next Post
The SFW Version