Solitude, Part 1: The Island
After Anarchy Chess and Codeword, both of which have strict win conditions, I wanted to build something calmer and more open-ended. That turned into Solitude, a 28-day island homestead game played across four 7-day seasons. Each day gives you 5 action points (AP) and a 3-slot satchel for carrying wood and food. Pitching a camp creates a home base for storing supplies, and laying stone paths out from camp lets you walk and haul along them for 0 AP as you explore the fog, raise a sheltered cabin, and stock up for winter.
Because Solitude has more moving parts than my earlier games, I split this write-up into three short posts:
- Part 1 (this post): generating daily hex islands, grading maps for interesting trade-offs, and solving live placement hints.
- Part 2: what I learned the hard way building a 2.5D renderer and mobile UI.
- Part 3: building the two end-of-year AI bots - and how beating my own Oracle bot exposed its blind spots.
Why random hex islands fell apart
Each island sits on a 21x19 hex grid (~220 land and shore tiles), where every tile tracks the terrain on all six edges so rotated coast, river, and road tiles line up cleanly with their neighbors. River tiles only connect one incoming edge to one outgoing edge (there are no three-way forks), and coast tiles expect a single continuous stretch of sand versus ocean around their six sides.
My first prototype drew rivers and beaches with independent random walks and tried to patch mismatched borders afterward. Half the maps failed: two rivers ran into each other where no fork tile existed, jagged shorelines alternated sand and water edges that no coast tile could match, or a river mouth cut off the starting beach and trapped the player on their first tile.
Placing five key landmarks first - two inland springs, two southern river mouths, and a calm shore spot for a fishing dock - fixed all of it, letting a small backtracker route both rivers downhill apart from each other before smoothing the coast. (I wired those five landmarks through my Go CSP solver simply because it was already in the repo; five variables that small don’t need a CSP engine at all.)
Grading “fun” when you can’t lose
In Anarchy Chess and Codeword, difficulty comes down to how constrained the path to a solution is. Solitude has no lose condition at all - you don’t die even if you run out of food, so every run reaches Day 28. Simply finishing a map tells you nothing about whether it’s fun.
Instead, the generator builds up to six valid islands per seed and grades them on whether the terrain creates real spatial choices - from bridge shortcuts and fog pacing to how many sheltered cabin spots exist for Easy, Medium, and Hard:
Catching future mistakes in live Charter hints
Alongside freeform play, the Homestead Charter offers 12 optional building goals. Each rule is simple on its own, yet their interactions across time sneak up on you fast: plant a pine sapling to block cold north wind on your cabin right below a riverside garden, and everything looks good on Day 1 - until three nights later, when that sapling grows up and shades your crops for the rest of the year.
Asking for a hint solves the whole Charter layout at once based on your currently revealed tiles, so water access, future tree shade, doorway clearance, and road reach all agree. It tries placements on open grass first before suggesting extra work like clearing brush or planting saplings - or points out an earlier build to remove if you’ve boxed yourself in. When key terrain is still hidden under fog, it avoids spoiling coordinates and instead reads the terrain edges along your mist border to point you inland:
Was a general CSP overkill here?
Honestly, yes. Five island landmarks and six Charter buildings are tiny enough that custom backtrackers could replace both with ease. Where the Charter model paid off was keeping every spatial rule in one place reused three ways: grading generated maps, answering live hints under fog, and guiding the solver bots in Part 3. Next up in Part 2 is the frontend side - and the rendering mistakes I made turning flat hex grids into a 2.5D island.