Top-down isometric view of the Kingdom Sandbox: four stacked rectangular tiers from Beggar Street to Castle Town, surrounded by vast forest, wilderness, sea, and mountains in a soft-lit low-poly diorama style.

Kingdom Sandbox — Storybook

KINGDOM
SANDBOX

A persistent medieval sandbox where every path leads up. Beg, craft, trade, scheme, or murder your way to the throne — in a world governed by AI nobles whose deliberations are posted to the town billboard every dawn.

Built on Cloudflare edge  ·  Real-money economy  ·  Sealed-LLM politics

What This Is

Kingdom Sandbox is a persistent multiplayer sandbox where the social hierarchy is governed by a sealed LLM council, the economy runs on a finite daily silver mint per village, and death strips your gear but leaves your skills intact — putting the master swordsman back in beggar's rags until they claw their way back up. The wealth gradient is the main pressure: where you sleep, what you can buy, who can starve you out.

Sealed-LLM Politics

Players never talk to the AI. They act — donate, trade, steal, build — and the council deliberates in private, publishing its verdict to the town billboard every dawn. No prompt injection. No slot machine. Legible, auditable, alive.

Closed Real-Money Economy

Gold only enters via player deposits (USDT on Solana) and only leaves via game-side fees. Every coin is accounted for. The crypto bridge is optional — players can live their entire game without ever touching it.

Skill-Retention Death

Death strips gear and resets position to Beggar Street — but keeps skills locked to apprentice tier until you claw back. A master in rags is still a master. The comeback arc is baked into the design.

Five Design Pillars

Every decision in the design defers to these. Anything that conflicts gets cut.

01

Vertical Mobility Through Any Path

Beg, steal, craft, fight, trade, govern. Every path leads up. No path is fundamentally better than any other. The game rewards skill and commitment regardless of playstyle.

02

Physical Economy

No magic inventories. Real goods at real locations, moved by real bodies. Wealth is something you can see, touch, hide, steal, and lose. Every silver coin was mined and minted by a player.

03

Sealed-LLM Politics

Players never speak to the LLM directly. The council reads structured action buffers and deliberates in private. There is no prompt-injection attack surface — by architectural constraint.

04

Fragility with a Floor

Named NPCs are invulnerable and form the survival floor. Everything above the floor is contested, killable, destructible, recoverable. The game cannot collapse — but it can suffer.

05

Closed-Loop Economy with Real Money

Gold only enters via deposits, only leaves via fees. The total gold in the world at any moment equals lifetime deposits minus lifetime fees. Every coin is accounted for.

The World

Every player begins as a beggar at the southern edge of a rectangular map. Progression is geographic — the further north, the higher the station. Movement up is earned. Movement down is always free.

▲ NORTH (Castle) WASTELANDS WASTELANDS THE CASTLE throne · treasury · royal NPCs · ~3 named NPCs [MVP-4] THE TOWN guilds · magistrates · watch · ~9 named NPCs [MVP-3] THE VILLAGE shops · workshops · farms · bakery · clinic · ~15 named NPCs [MVP-2] BEGGAR STREET spawn zone · untaxed · pre-political · ~18 named NPCs ← MVP-1 ships ONLY this tier — gates above are visible but locked → [MVP-1] ▼ SOUTH (Spawn) PROGRESSION

Four Kingdom Tiers — South to North

Tier 1 Beggar Street The starting tier — every player begins here.
A peaceful thatched-roof village around a cobbled square with a stone well, fields and forest beyond, in warm morning light.
Tier 2 Village Crafting unlocks. The first real market.
A walled medieval town with timber-and-brick buildings around a market square, bathed in late afternoon golden light.
Tier 3 Town Trade volume jumps. Guilds, magistrates, watchmen.
Tier 4 Castle Town The capital. The throne. The thickest market.
Concept Art Overworld panorama (mood study) Painterly vibe sketch — not the final art style. See In-Game look for the real thing.
45
Named NPCs / faction
90
Total named NPCs
~200
Concurrent players / shard
4h
Full day/night cycle
Every player starts as a beggar at the south edge. Geography is progression — moving north means earning your way. The 4-hour cycle (3h day + 1h night) matches the council deliberation cadence exactly, so every new day brings a new dawn announcement. MVP-1 ships only Beggar Street. The other tiers exist on the map but the gates are sealed until later phases.

The Wastelands Frontier

Outside the kingdom walls, the law thins out. There is no Bandit King — there are many bandit kings, one per camp, scattered across a craggy frontier.

Frontier Many Camps, No King Anyone can pitch a tent. Anyone can fall.

The wastelands are not a mirror of the kingdom. They have no throne, no parliament, no fixed capital. What they have is land: any player who clears a stretch of mobs and terrain hazards can pitch a tent on it and claim it as their own. From a single tent and a firepit, that camp can grow into a real outfit — palisade, watchtower, walls, billboard, hired guards, raid table, fence shop — at five upgrade tiers all the way to a full Bandit Headquarters.

Because every camp belongs to its founder, the wastelands hold many "bandit kings" at once. They quarrel, they raid each other, they form coalitions, and when one camp is razed the founder can pack up and start again somewhere else. There is always more frontier.

The kingdom holds the structural edge — more guards, deeper supply lines, a Knight class no bandit can match, hospitals to bring people back from the brink. The wastelands hold the chaos edge — speed, night strikes, contraband, cross-camp coalitions, and a culture of reform after defeat. The wall mostly holds. The tide mostly breaks. Every now and then, the tide wins, and that's the player story worth telling.

Bandit Camp Upgrade Ladder

T0 · Tent bedroll · small chest · firepit cost: clear the area no game features yet T1 · Encampment wooden palisade · 1–2 followers · cookpit · stash cost: gold + cut wood + 24h upkeep T2 · Outpost walls + gate · watchtower · billboard · 2 guards cost: gold + iron + rep threshold T3 · Fortified Camp stone walls · gatehouse · 6 guards · raid table · dummy cost: gold + stone + kill milestone T4 · Bandit Headquarters stone keep · 12+ guards · bounty office · fence shop cross-camp raid coordination · named on the world map the founder is now a real "bandit king"

Parallel Kingdom Upgrade Tree

T0 · Wooden Shacks conscript militia · Beggar Street default T1 · Reinforced Timber town watch · Village standard T2 · Stone trained guard · Town standard T3 · Reinforced Stone veteran guard · Castle Town standard T4 · Masterwork Stone & Iron Knight / Captain · castle keep · royal residences healing infrastructure · supply line discipline structural edge: outlasts T4 bandit walls by ~20%

Power Asymmetry — Wall vs Tide

Kingdom edge

  • 5–10× more guards in absolute numbers
  • Command structure (captain → guard)
  • Steady iron, food, recruits
  • T4 walls outlast bandit T4 by ~20%
  • Knight class — no bandit equivalent
  • Hospital + temple regen at scale

Bandit edge

  • Lighter logistics — raids strike fast
  • Night strikes exploit guard shifts
  • Contraband at scale: poison, picks, garrotes
  • Cross-camp coalitions for one-off assaults
  • Razed camps re-found elsewhere — never fully gone
  • No witness penalty in the wastelands

MVP Scope & Tiered Rollout

v0 ships in five tiered phases. Each phase opens one tier of the world. MVP-1 is the smallest possible vertical slice — Beggar Street only. Castle and the wastelands don't exist yet, not even as art.

A canonical top-down board-game style map of the Kingdom Sandbox v0 world with Beggar Street centered, the sea and islands south, the kingdom road and tiers north, forest and wilderness flanking east and west, bandit wastelands northeast — rendered as a tiny handpainted wooden tabletop diorama.
The Realm — canonical map Beggar Street → Village → Town → Castle, with the sea and islands south Five phases, one road, one map. (Blocker #14)
MVP-1

Beggar Street — one Connector, one relationship arc

The alpha is a single narrative arc: earn Tobias the Connector's trust until he writes you a recommendation letter that unlocks the Village gate. Combat, sleep, ecology, crafting, and the letter system are all live. The dawn announcement system stays disabled until MVP-2 — at Beggar Street, the world reacts through direct in-world consequences: the Connector hearing about your actions, NPCs talking in passing, the Ranger's Ledger updating silently. Gates above are visible in the world but sealed. Wastelands and Castle don't exist yet.

Tiered Phase Rollout

alpha maturity → MVP-1 ~50 players BEGGAR STREET core combat · sleep · ecology · basic NPCs MVP-2 + village VILLAGE OPENS LLM council · dawn announce · ~15 NPCs MVP-3 + town TOWN TIER guilds · magistrates · politics MVP-4 + castle CASTLE kingship · royal succession MVP-5 + bandit WASTELANDS FRONTIER

Each MVP unlocks the next tier of the world. Castle and the wastelands frontier are post-MVP-1 content — they're not built at all in alpha.

Tobias the Connector

The load-bearing character of MVP-1. One named NPC, one trust meter, one gate. The entire alpha experience hangs on this single relationship arc.

Blocker #16 · Locked 2026-04-08

The Trust Meter

Tobias's opinion of you is tracked numerically but surfaces qualitatively in dialog: cold → wary → cordial → friendly → vouching.

  • + Bring him food, listen to his stories, help with errands
  • + Give up loot, stay off the wanted list, don't steal from him
  • Be seen with bandits, get witnessed committing crime
  • Attack him or his soup kitchen

The Vouch

When trust hits "vouching," Tobias writes a recommendation letter — a real in-world item using the Blocker #3 letter system. Present it at the Village gate and the guard tears it up and waves you through. The letter can be lost, stolen, or forged. His decision to vouch is not transactional — gold bribes do nothing. This teaches the player that the game's social systems care about behavior over wealth.

Trust State Ladder

Cold

no interactions yet — turns away

Wary

basic dialog unlocked, watching you

Cordial

errand quests available, shares rumors

Friendly

mentions the Village, talks about his past

Vouching

writes the letter → Village gate unlocked

"Soup's hot if you're staying. Bowl's a copper, and don't go telling the patrol I said that. Mind the dog — she bites people who lie." — Tobias, first meeting

Who He Is

A former Village wagonmaster who lost his license over a debt and ended up on Beggar Street — but still has friends inside the walls. He runs a soup kitchen out of a mud-block alcove on the main square. His visible material tier (mud blocks — Tier 0, per Blocker #18) is a deliberate signal: this is what poverty looks like in concrete building terms. Tobias might also serve as the de-facto tutorial guide for the first ten minutes of play.

What it looks like

The actual planned visual style — chunky low-poly characters on a tilt-shift toy diorama, soft pastel palette, big-headed cartoon faces, miniature handpainted-tabletop feel. Strict Link's Awakening (Switch remake) aesthetic. Cute and inviting, not epic.

Mockups generated 2026-04-08 via gemini-3-pro-image-preview · Blocker #14 art lock

A vast medieval fantasy landscape with the rectangular kingdom visible as a small cluster in the center, surrounded by dense forest, farmland, rivers, mountains, and scattered bandit camps.
The Sandbox — vast overworld The kingdom is just the beginning. The wilderness is infinite. Forest, mountains, rivers, bandit camps — all explorable, all buildable.

Combat — the four classes in action

A chunky low-poly warrior swinging a longsword at two circling wolves in a tiny grass clearing diorama.
Warrior Warrior vs Wolves Sword, leather plate, the wolves of the eastern forest.
A chunky low-poly sorcerer casting an arc of blue lightning in a tiny stone courtyard diorama.
Sorcerer Sorcerer Lightning Cast Pointed hat, billowing robes, a clean cyan arc.
A bearded chunky low-poly smith hammering a glowing iron bar on a tiny anvil inside a small forge diorama, sparks flying.
Crafting Smith at the forge Hammer, anvil, glowing iron, the warm orange of a tiny hearth.

"Hammer falls. Iron bends. The world shifts a little. That's the entire game."

A tiny bustling village marketplace seen from above-and-tilted with three NPC stalls and two players bargaining.
Trade Marketplace Cabbages, swords, cloth bolts. Bargaining over coppers.

Gathering — fishing south, mining north

A chunky low-poly fisher with a bent rod on a tiny wooden dock with fish jumping out of the water, Beggar Street rooftops behind.
Fishing Beggar Street dock The cheapest income on the map. Just you and the fish.
A chunky low-poly miner with helmet and lantern swinging a pickaxe at a glowing iron ore vein in a tiny cave.
Mining North-mountains iron vein Pickaxe, lantern, the cool blue rock and a warm orange ore glow.
Four tiny bandit camps from left to right showing the upgrade ladder: Tent, Encampment, Outpost, Fortified Camp HQ — a single wide diorama.
Bandit Wastelands — Blocker #12 Camp upgrade ladder: Tent → Encampment → Outpost → Fortified HQ The four tiers of the parallel bandit kingdom, side by side.
A tiny pirate skiff approaching a small island at dusk with three chunky low-poly pirates on deck, signal fire on the island.
Maritime — Blocker #14 Pirate skiff at dusk Pirates are bandit camps that float. Same upgrade ladder, naval-flavored unlocks.

★ MVP-1 HEADLINE NPC ★

Tobias, a chunky low-poly old man with a kind face and gray beard, stirring a steaming pot at a soup kitchen on Beggar Street while a player approaches.
Tobias — the Connector Soup kitchen on Beggar Street Blocker #16 — the only named NPC at MVP-1.

Tobias is the canonical MVP-1 NPC — the entire alpha experience hangs on a single relationship arc with him. Bring him food, listen to his stories, help with errands, stay off the wanted list. Once his trust hits "vouching," he writes you a recommendation letter that unlocks Village access. That letter is a real in-world item — it can be lost, stolen, forged. The dawn announcement system stays disabled at Beggar Street tier and switches on at MVP-2.

"Soup's hot if you're staying. Bowl's a copper, and don't go telling the patrol I said that. Mind the dog — she bites people who lie." — Tobias, first meeting

All ten mockups generated 2026-04-08 via gemini-3-pro-image-preview · Link's Awakening Switch remake aesthetic locked per Blocker #14

Living Ecology

A 10-species food web running on energy-flow math. Players perturb it, the cascade plays out in real time, and a public Ranger's Ledger tells the village what's healthy and what's dying.

v0 Food Web — 10 Species

APEX PREDATOR HERBIVORE PRODUCER Mushroom N=800 Berry N=400 Insects N=∞ Grain farmed Rabbit N=600 Deer N=200 Salmon N=400 Songbird N=400 Chicken domestic per farm Fox N=80 Bear N=20 [apex] LEGEND predator → prey N = population (v0 default) 10-species v0; 54 in v1+

Predation edges show who eats whom. Pull one node and the cascade walks the chain.

The Math, Plain

Each species has population N, daily caloric demand c, caloric value per individual m, reproduction rate r, and a diet split p per prey type.

prey killed/day  =  (N_pred × c_pred × p) / m_prey
equilibrium      :  N × r  =  Σ (kills from all predators)

Worked rabbit equilibrium: 600 rabbits × 0.06 r/day = 36 births/day. 80 foxes × 2 cal × 50% rabbit diet = 80 cal ÷ 4 cal/rabbit = 20 kills/day. Positive drift, healthy buffer absorbed by environmental mortality.

Three Cascades the Engine Plays Out

CASCADE 1 — BERRY STRIP

player strips berries deer + rabbit drop foxes hungry village chickens raided farmer is angry · ranger gossips

CASCADE 2 — SALMON OVERFISH

salmon overfished bears switch to berries berries collapse rabbit decline → fox raids two-link cascade · slow burn

CASCADE 3 — DEER HUNT

hunters take deer hard wolves hungry (mid-tier eco) wolves test the road attacks on travelers caravans need guards

Three example perturbations and how they walk the food web. The simulation runs them deterministically.

The Ranger's Ledger

Public ecological readout posted at every village. Five health states, plain-language warnings from the ranger NPC, refreshed at dawn. Free for any player to read.

The Ranger's Ledger

Village of Aldermark · Dawn of Day 47 of Harvestmoon

HEALTHY
STEADY
DECLINING

"Bears have been spotted near the village."

CRITICAL

"Bananas have been picked clean."

EXTINCT

Mockup — actual readings driven by live EcologyState

A Day in the Life

The moment-to-moment game. The kingdom is the frame; this is what you actually do all day. Gather, craft, fight, sleep, repeat.

Nine Crafting Professions

Each category has its own workstation, its own recipe pool, and its own master. Discovery is the puzzle; production is the reward.

Smithing

workstation: forge

in: iron, wood. out: knives, swords, needles, fishhooks. Contraband alts: lockpick, garrote loop.

Carpentry

workstation: workbench

in: logs, planks. out: doors, simple chests, short bows, furniture. Doors are your first locked container.

Tailoring

workstation: loom

in: cloth, leather. out: shirts, travel cloaks, leather jerkins. The first armor a beggar can afford.

Alchemy

workstation: alembic

in: herbs, water, alcohol. out: bandages, healing salves, antidotes. Sleeping draught walks the contraband line.

Cooking

workstation: hearth

in: grain, meat, fish, herbs. out: bread loaves, rabbit stew, smoked jerky, ale kegs. Calories matter for combat.

Masonry

workstation: mason's table

in: clay, stone. out: bricks, wall sections, the village well. Camp upgrades route through here.

Scribing

workstation: scriptorium

in: leather, paper, ink, known recipe. out: recipe books, contracts. Books are physical — reading destroys them.

Gardening

workstation: garden bed

in: seeds, water, compost. out: herbs, vegetables. Slow loop, but it's the most reliable food source.

Fletching

workstation: fletching bench

in: wood sticks, feathers, iron tips. out: arrows, fletched spears, crossbow bolts. Ranged combat starts here.

Gathering Loops

Five hands-on professions feed the crafting tables. Each one talks to the ecology engine — gathering depletes species populations, and the Ranger's Ledger reports it at dawn.

Foraging

Mushrooms, berries, herbs, faerie berries. Slowest tap, most peaceful. The Ranger reports when a forager has stripped a patch.

Hunting

Rabbit, deer, boar, wolves, bears. Drops meat, hides, the occasional silver coin. Cascades through the food web — overhunt deer and the wolves come for the road.

Fishing

Salmon, mussels, pearl-mussels, the legendary Silver Salmon. Pacifist viable — fishing earns XP and rare drops on the same curve as hunting.

Mining

Iron, stone, clay, rare gems, Heartstone. Slow start but the supply chain for smithing, masonry, and camp upgrades.

Farming

Grain, vegetables, chickens. Tied to gardening + cooking. Predictable. Farmers feed villages and become councillors faster.

Every gathering action writes a buffer entry. Strip a berry patch and the Ranger's Ledger turns it yellow at dawn — Blocker #6, locked.

Combat Encounters

Three universal attack inputs across every weapon. Four optional class commitments — Warrior, Sorcerer, Rogue, Cleric. Jump and dodge are universal; classes tune the dodge weight and the signature ability.

Warrior

absorb · slow · highest HP

Weapon Mastery — +50% damage

Sorcerer

convert · fastest · lowest HP

One big spell — element-locked

Rogue

evade · fast · medium HP

Backstab — 3× from stealth

Cleric

mixed · medium · only healer

Greater Heal + Divine Shield

Three inputs

Light, Heavy, Special. Same three buttons across every weapon. Spear has the longest range and biggest special bonus — outside an enemy's reach, they can't hit you.

Jump & Dodge

Universal jump (~5 stamina). Class-tuned dodge: warriors heavy + slow, sorcerers blink-step, rogues nimble + cheap, clerics mid. Brief i-frames.

Damage floor

Minimum damage is 1 HP — nobody is invulnerable. Continuous-damage escalation over consecutive hits makes the peasant revolt mathematically possible.

Full deep dive in the Combat & Classes section below.

Sleep & Safe Haven

When you log off, your character stays in the world. Where they sleep is a wealth-gated decision. The poor sleep dangerously, the rich sleep behind locked doors.

Tier 1

Bedroll

free · ∞ capacity

5% mug risk · 30–60% inv loss

Tier 2

Inn Bunk

~5s/night · 10–20 capped

FULL protection

Tier 3

Guard Outpost

~10s/night · 5–15 capped

FULL protection

Tier 4

Owned House

gold investment

break-in only via key theft

Full ladder + bandit raid roll in the Safe Haven section below.

Safe Haven & Wealth Gradient

When you log off, your character stays in the world. Sleep is a wealth-gated economic motor — climbing up means literally sleeping safer.

Sleep States — Wealth-Gated Safety Ladder

← high risk · poor low risk · wealthy → Straw Pile Beggar Street default cost: free capacity: ∞ protection NONE 5% mug/night 30-60% inv loss Inn Bunk rented from NPC innkeep cost: ~5 silver/night capacity: 10–20 (FCFS) protection FULL char + inv safe inn = real business Guard Outpost guest bunk at watch station cost: ~10 silver/night capacity: 5–15 capped protection FULL guards repel raids political real estate Owned House your locked door at Village+ cost: gold investment capacity: 1 / bed marker protection FULL break-in possible only via key theft / smith

Four sleep states. Cost rises with safety. Capacity is limited at the higher tiers — "save me a bunk" becomes a real social ask.

Bandit Raid Roll

Runs every in-game night for any character in an unprotected sleep state. Deterministic per-night seed — no save-scumming.

Sleeping Body unprotected · in world night begins Raid Roll 5–15% by zone no roll hit Wakes Whole dawn · raid_avoided +0 roll hit Mugged in Sleep 30–60% inv loss passout → clinic

The wealth gradient pillar: beggar = high risk, working villager = medium risk, established player = low risk, wealthy owner = no risk. The first night in a new shard is dangerous on purpose — "I bought a bed" is a meaningful upgrade. Bandit raids on unprotected sleepers become the canonical wastelands gameplay loop.

Crafting & Discovery

3×3 grid + modifier slot + recipe books + shiny variants + activity streaks. Discovery is the puzzle, production is the menu shortcut. Any material in the modifier slot reinforces the output — Reinforced Stone Pickaxe, Salted Bread, and so on. Every gather profession is equally rewarding.

3×3 Crafting Grid + Modifier Slot

IRON stick stick

Iron top, stick middle + bottom = sword. Move iron to middle and add a stick = hoe. Position matters for shaped recipes. A 10th modifier slot (Extra box) reinforces the output — drop salt in it for Salted Bread, a whetstone for a keener blade.

Recipe Ambiguity → Alignment Hook

Some patterns make multiple things. The output slot becomes a toggle between possible outputs. Choosing the contraband output ticks Divine alignment toward Evil and, if witnessed, generates a buffer entry the council will see.

Pattern Outputs
iron + small wood Needle / Lockpick
iron + leather Belt / Slingshot
wood + cloth Bandage / Torch wick
iron + bone Fishhook / Garrote loop

Orange = contraband. The system tracks both what you make and whether anyone saw.

Recipe Book Lifecycle

Scribe Forges leather + paper + ink + known recipe Book Object tradeable · lootable apprentice 1 · master 20 resell intact read it Sold for gold knowledge stays bottled Recipe Learned ~30s read · book destroyed Forgery Risk high-skill scribes make books that don't work

Books are physical. Reading destroys them. Buying creates a real choice — keep it tradeable or read and lose resale.

Shiny Variants

Pokemon-style. Every species has a shiny rate. Shinies persist until killed — see one, run home for a friend, come back, it's still there. Some have hidden conditional spawn triggers.

Class Rate Reward
common (rabbit, mushroom) 1 / 100 rare tool
medium (deer, salmon) 1 / 500 recipe book
rare (boar, wolf) 1 / 1500 legendary item
apex (bear, lion) 1 / 5000 god-tier recipe

Rare Drops Everywhere

Every interaction has a small chance to drop something rare — fishing, foraging, mining, hunting, building. Fishing is as rewarding as deep mining. No grind path is mechanically inferior.

  • cut tree → tree sap, bird nest, "Heart of the Old Oak"
  • fish river → pearl-mussel, "Silver Salmon"
  • mine deep → rare gem, "Heartstone"
  • forage → rare herb, "Faerie Berry"
  • build → hidden cache, "Buried Reliquary"

Rate scale ~1/50 common · ~1/500 uncommon · ~1/5000 legendary.

Activity Streak Progression

Eight categories, five tiers each. Hit a category enough in a row, the multiplier climbs. 30-minute carry-over keeps multi-faceted players honest. Resets to 0 on death.

Activity 1–10
Casual
11–25
Focused
26–50
Devoted
51–100
Master
101+
Obsessed
Fishing 1.0×1.25×1.5×1.75×2.0×
Hunting 1.0×1.25×1.5×1.75×2.0×
Mining 1.0×1.25×1.5×1.75×2.0×
Foraging 1.0×1.25×1.5×1.75×2.0×
Crafting 1.0×1.25×1.5×1.75×2.0×
Combat 1.0×1.25×1.5×1.75×2.0×
Diplomacy 1.0×1.25×1.5×1.75×2.0×
Building 1.0×1.25×1.5×1.75×2.0×

Pacifist viable — a serial fisher hits 2× XP exactly like a serial warrior. Specialists rewarded, multi-class players preserved by 50% carry-over within 30 minutes.

Tool Durability (BOTW/TOTK-style)

Tools break after a fixed number of uses. Flint tier — cheap, snaps fast (20–50 uses). Higher material tiers are progressively more durable. Reinforcing via the modifier slot extends life. Breaking a tool mid-task is a resource decision, not a softlock.

Chunked Destruction & Fire

Buildings don't pop out of existence — they chunk apart, piece by piece. Damage the right part of a wall and specific sections detach and fall. Repair them with the original material before the parent collapses. Set them on fire.

Blocker #19 · Locked 2026-04-09

Sub-Chunk Model

Each Buildable is composed of N visually-separable child chunks, each with its own HP and collider. Damage routes to the specific chunk hit by the swing raycast — not the whole structure. When a chunk hits 0 HP it physically detaches, gravity on, destroyed after 5 seconds. When <20% of chunks remain, the whole structure collapses.

Straw bundle — 3 chunks
Mud block — 4 chunks
Wood plank wall — 5 chunks
Stone block — 6 chunks

Repair

Keybind R — hold near a damaged Buildable. Costs 1 unit of the parent's material per missing chunk, drawn from inventory. 1 chunk restored per 0.5 seconds while held within 2 m. Interrupted if the player takes damage. Only works if the parent hasn't fully collapsed — a fully demolished structure must be rebuilt from scratch.

Future hook: Carpenter/Mason NPC auto-repairs nearby buildings as a paid service.

Fire System

Straw and wood chunks carry a Flammable component. Torches and alchemist firebombs (Blocker #11) act as ignition sources — heat radiates per tick. Once temperature crosses the ignition threshold, the chunk catches fire, becomes its own ignition source, and starts burning down. Fire spreads through connected flammable chunks. Stone and mud chunks are firebreaks — immune. Water bucket extinguishes.

Burned-out chunks are lost — no log drop, only ash.

Why this matters for the wealth gradient: Repairs cost material. Replacing a stone chunk eats 1 stone — expensive. Poor players use straw and accept the burn risk. Rich players use stone walls as firebreaks. Abandoned structures lose 1 random chunk every 7 in-game days and naturally collapse over weeks. The game's visible material tier is also its visible wealth tier.

Combat & Classes

Mordhau-flavored timing combat layered with four v0 classes, jump + dodge, projectile deflection by parry, and a damage floor that lets a peasant mob bring down a knight.

Warrior

absorb · slow · highest HP

Signature: Weapon Mastery — +50% damage with chosen weapon

Block: Stamina (large pool). The "I'm in plate and bracing" class.

Sorcerer

convert · fastest · lowest HP

Signature: one big spell — Meteor / Frost Cone / Chain Lightning / Stone Fist (element-locked)

Block: Magic Shield (mana, small but efficient). 3 abilities, no rotation.

Rogue

evade · fast · medium HP

Signature: Backstab — 3× damage from stealth

Block: long dodge i-frames. Class-locked stealth, level-scaled detection.

Cleric

mixed · medium · only healer

Signature: Greater Heal — large single-target heal, only class with active healing

Block: Divine Shield (mana, blocks Physical AND Magical). Connects to medic profession.

Classless dabblers can pick ONE cross-class skill from each class — but never the locked signature. Classed = master of one lane, classless = able-bodied generalist.

Mordhau-Style Attack Inputs

Q swing left · E swing right · F stab · R block · T talk to NPC. Same inputs across every weapon. Each weapon interprets them in its own way. Range matters absolutely.

Weapon Q — Swing Left E — Swing Right F — Stab/Special Range Stab bonus
Knife swing L swing R stab 0.5 m+60%
Sword slash L→R slash R→L thrust 1.0 m+20%
Spear sweep L→R sweep R→L long thrust 2.0 m+80%
Axe chop L chop R overhead 1.2 m−50%
Hammer swing L swing R overhead crush1.0 m−40%
Bow quick shot aimed shot charged 3s 30 mn/a
Wand element bolt Lelement bolt Rcharged bolt 15 mn/a

Outside an enemy's weapon range, they can't hit you. Spear vs sword duels become positioning duels.

Damage Floor & Escalation

Minimum damage is 1 HP — nobody is invulnerable. Continuous-damage escalation makes the peasant revolt mathematically possible.

Lone level-5 attacker vs level-100 knight

4 3 2 1 HP hits 1–10 11–20 21–30 31+ cap consecutive hits without 10s gap

Knight regen outpaces 1 HP/hit at first. The longer the fight runs, the more damage stacks per swing.

Mob of 10–15 peasants vs level-100 knight

KNIGHT 10s reset never lands · escalation cooks

Numbers matter. The peasant revolt against the king is mechanically possible — coordinate enough hits, the floor + escalation does the rest.

Jump (universal)

Every class. ~5 stamina/jump. Can attack and block mid-air. Enables leap parries and high-ground bonuses.

Dodge (class-tuned)

Mordhau-style dash. Warriors heavy + slow, sorcerers blink-step, rogues nimble + cheap, clerics mid. Brief i-frames.

Projectile Deflection

Pure physics. Your weapon swing arc, during the existing 0.25s parry window, can deflect incoming arrows. No special button.

Strength + Agility cancel armor weight: a high-strength warrior in plate moves at normal speed, a low-strength warrior is slow. Stat training has tactical weight.

The Sealed LLM Council

The signature mechanic. Players never talk to the AI directly — they interact with NPCs through a fixed vocabulary of structured actions. Every action writes to a buffer. Every in-game day, the council deliberates and publishes its verdict.

Player Actions donate · trade · crime structured Action Buffers per-NPC, auditable every 4h LLM Council Claude Sonnet 4.6 45 NPC personalities sealed from player input Opus for high-stakes calls opinion deltas narrative script Dawn Announcement town billboard every in-game dawn No prompt injection surface · Players influence outcomes through game actions only

Players never talk to the LLM directly. They interact with NPCs through a fixed vocabulary of structured actions — donations, quests, trade, building, witnessed crimes. Every action writes to that NPC's daily action buffer.

Every 4 real hours, the council deliberates: buffers plus persistent NPC personality profiles go in, opinion deltas and a narrative announcement come out. The result is posted to the town billboard. It reads like minutes from a real village council — because it is.

Why this matters: There is no prompt-injection attack surface. No social engineering. No "trick the AI" exploit. Players influence outcomes only through actions the game already understands.

Auditability: The buffer is readable. If a player is unhappy with a council vote, the moderation team can read exactly which actions led to that opinion. This is dramatic transparency — most games hide their internal logic.

Village Billboard

Third Day After Harvestmoon · Village of Aldermark

On the eve of the third day after Harvestmoon, the village council gathered at Aldric's forge as is custom. Old Meredith spoke first, voice tight with worry: "The thefts at the eastern stalls have not stopped. Three of my onions, Marta's bread — small things, but they add up to a pattern."

Constable Iven nodded but reminded the council that the suspect, the new beggar called Marcus, has also been seen helping at Father Tomas's almshouse. "A man can be both," Iven said. "We watch, we do not yet judge."

The vote on whether to bar Marcus from the marketplace failed three to two. Father Tomas is to keep an eye on him, and Aldric will replace the locks on his back door regardless.

Example output — actual text generated by Claude Sonnet 4.6 at runtime

The Closed Economy

Two currencies, one closed loop. Every gold coin is accounted for from deposit to destruction.

S

Silver

Daily currency · finite daily mint

  • Enters the world from five capped sources (see below)
  • Each village and camp has a daily silver budget — refreshed at dawn
  • When a store runs out of either silver OR stock, it closes for the day
  • Closure forces players into direct P2P trade until dawn
  • Tier multiplies your silver liquidity by orders of magnitude
G

Gold

Real-money premium currency

  • Created only by real-money deposits (USDT on Solana)
  • Destroyed only by game-side fees and withdrawal
  • $100/week symmetric deposit / withdrawal cap
  • 10% maker's fee on gold state-service transactions
  • 5% withdrawal fee on crypto cash-out
Player Deposit USDT on Solana ≤ $100/week → Gold In-Game Gold property · state services p2p trades · king's treasury bribes · ransoms · rent closed · every coin tracked 10% maker's fee 5% withdrawal fee Revenue Sinks ~90% operator / ~10% king + USDT withdrawal ≤ $100/week · 5% fee USDT player wallet Gold in-world = lifetime deposits − lifetime fees − lifetime withdrawals

Silver — The Finite Daily Mint

Silver is the daily money of the realm, and there's only so much of it per village per day. The wealth gradient pillar lives or dies on this single rule.

Monster drops

Hostile creatures occasionally drop silver. Drop chance scales with creature tier. Hunting = income.

Animal byproducts

Some animals carry small silver in stomach or feathers when butchered. Rare flavor source.

NPC store buy-back

The main silver tap. Sell crafted goods, hides, fish, recipes back to villager NPCs. Bounded per village.

Quests & bounties

Council, ranger, guild and bandit-kingmaker quests. Story-driven, capped per quest.

Robbery

Stealing from players or NPCs. Redistributes existing silver — does not mint new.

Daily Silver Mint by Tier (placeholders — shape locked, numbers tuned at playtest)

10,000s 3,000s 500s 50s Beggar St. ~50s stay here = stay poor Village ~500s 10× Beggar liquidity Town ~3,000s 60× Beggar liquidity Castle Town ~10,000s 200× Beggar liquidity Bandit camp ~100–500s scales with camp tier ← rich player liquidity 200× a beggar's

A wealthy player can spend a few minutes selling junk and drain Beggar Street's entire daily silver budget — leaving the actual poor with nothing to sell to until tomorrow. This is the feature, not a bug.

Safety valve 1 — P2P trade

When the village stores close, players have to trade with each other directly. Emergent micro-markets, IOUs, debt loops and social capital all pop out of this single constraint. The shopless hours are when the real game happens.

Safety valve 2 — wastelands run

Bandit camps have their own (smaller) silver mints from raid loot and contraband fences. A daring poor player can risk crossing the wastelands to sell stolen goods for a better price — but they can be robbed in broad daylight on the way there or back. No witness penalty applies in the frontier.

Architecture

Five components, one coherent edge-native platform. Cloudflare Durable Objects replace the entire game-server stack.

Unity Client rendering · input · audio client-side prediction zero authoritative state WebSocket Shard Durable Object TypeScript / Rust-WASM authoritative world state tick loop 10-20 Hz physics · AI · ecology per-shard NPC roster DO storage (KV) one DO = one kingdom DO RPC LLM Council Worker Anthropic Claude every 4h per shard sealed from player input rate limiting · retry DO RPC Crypto Bridge Worker Solana RPC KYC / AML checks maker's fee accounting isolated from game logic Other Shards cross-shard movement DO-to-DO RPC Persistence Backbone R2 (object storage) shard snapshots · cold archival D1 (SQLite) cross-shard profiles · audit logs · gold analytics

Cloudflare Durable Objects give us one stateful compute unit per shard, holding authoritative game state. A single primitive replaces the entire game server stack: EC2 instances, load balancers, session management, cross-server state sync — none of it. Auto-failover. Auto-geographic distribution. Transactional persistence. Linear cost scaling.

The LLM Council is sealed from player input in a separate Worker — no prompt-injection attack surface by design, not convention. Crypto operations are isolated in their own Worker with KYC/AML, so the game can operate in subscription-only mode if required by any jurisdiction.

The team's bottleneck at scale is operational — content updates, balance tuning, customer support — not infrastructural. Cloudflare provisions underlying hardware as DOs are created.

De-Risking the Architecture

Two architectural unknowns. Two prototypes. Both built and typecheck-clean.

Risk A DO Performance

200 Players Per Durable Object

Can one Cloudflare Durable Object hold 200 concurrent players with a 15 Hz tick loop, combat, creature AI, and ecology within the CPU budget? The tick budget is 66.6 ms. If p95 latency stays under that with 200 clients and 200 background creatures, the architecture is validated.

prototypes/perf-do/

200-client benchmark against a local Wrangler DO. Simulates movement, combat, creature AI, ecology ticks, per-client view-culled broadcast end-to-end.

# Expected output
p50: 4.2 ms
p95: 9.1 ms
p99: 14.3 ms
PASS — 0 ticks over 67ms budget
Risk B LLM Output Quality

Sealed-LLM Council Quality

Can a structured prompt to Claude Sonnet 4.6 reliably produce both clean machine-parseable opinion deltas AND a dawn announcement that reads like real village political minutes — distinct NPC voices, specific events named, genuine reasoning on ambiguous cases?

prototypes/llm-council/

Cloudflare Worker against the Anthropic API. Six hand-written village NPC personalities. 20-entry realistic action buffer with mixed signals. Parses both narrative script and structured deltas from a single model call.

# Single call cost estimate
Input: ~3,800 tokens
Output: ~720 tokens
Cost: ~$0.02/call
Full shard: <$50/month

Both prototypes are built and typecheck-clean. Running them is the next gate before any production work begins.

Roadmap

Pair-mode workflow: Opus-class AI agents handle implementation, owner holds vision and final call on every meaningful decision.

Now Prototypes · Design doc · Pair-mode sessions Legal review initiated Months 1–3 Legal review · NPC content authoring One village, ~10 NPCs, food web map Months 4–9 v0 vertical slice build Closed alpha · 50-100 players Months 10+ Open beta with monetization · Town / Castle Wastelands frontier · Full NPC roster · Gods
Pair-mode workflow with Opus-class AI agents handling implementation. The owner holds product vision and final call on every meaningful decision — agents surface open questions, not guesses.

Status: Locked In

v0 design blockers, current state. Each one was walked in pair-mode with owner sign-off and recorded in DECISIONS.md.

#1 LOCKED

Combat lethality + hospital + jail

2026-04-07 · debt loop, dueling, keys-from-deeds

#2 LOCKED

Block / parry / stamina

2026-04-07 · Mordhau timing, passive regen

#2 amend LOCKED

Combat + 4 classes

2026-04-08 · jump · dodge · damage floor

#3 LOCKED

Action vocab + dual alignment

2026-04-07 · Witness Letters

#4 DEFERRED

KYC / AML provider

to go-live · alpha runs unregulated

#5 DEFERRED

Solana wallet model

to go-live · custody TBD

#6 LOCKED

Ecology + safe haven

2026-04-08 · 10-species + 4 sleep states

#7 PENDING

King-death vote mechanics

tier 2 · next pair-mode walk

#8 PENDING

Dawn announcement moderation

tier 2 · next pair-mode walk

#9 PENDING

Class commit vs skill loss

tier 2 · next pair-mode walk

#10 KILLED

Production cap intervals

replaced by #11 spawn-rate scarcity

#11 LOCKED

Crafting + drops + streaks

2026-04-08 · 3×3 grid + modifier slot + recipe books

#12 LOCKED

Bandit Kingdom = wastelands

2026-04-08 · many camps · 5-tier upgrade

#13 LOCKED

Silver = finite daily mint

2026-04-08 · 5 sources · forced P2P trade

#14 LOCKED

Maritime + compass layout

2026-04-08 · dock · islands · pirates

#15 LOCKED

50% withdrawal rate

2026-04-08 · $1 = 100 gold · 50% spread

#16 LOCKED

Tobias the Connector + trust meter

2026-04-08 · MVP-1 headline NPC + vouch letter

#17 LOCKED

Kingdom = vertical rectangle + infinite frontier

2026-04-08 · 4 tiers · chokepoint gates · regrowth

#18 LOCKED

Component-based building + tool-gated demolition

2026-04-08 · 7 materials · straw burns · stone is immune

#19 LOCKED

Chunked destructibility + repair + fire

2026-04-09 · sub-chunks · Flammable · IgnitionSource

MVP-1 Scope: Beggar Street + Tobias

MVP-1 ships only Beggar Street with Tobias the Connector as the headline NPC. The arc: earn his trust, get the vouch letter, unlock the Village gate. Combat, sleep, ecology, crafting, building, and the letter system are all live. Castle and the wastelands frontier are not built. Phased rollout: MVP-1 → MVP-2 (Village) → MVP-3 (Town) → MVP-4 (Castle) → MVP-5 (Wastelands).

The Frontier

Blocker #17 locked in the canonical world shape and the mechanics that give it pressure. A rectangle. Four tiers stacked south-to-north. Walls that players build outward into dense forest and wilderness — cleared by players, not pre-farmed. Land that rots, regrows, and waits for the next wave.

Blocker #17 · Locked

Top-down view of the rectangular Kingdom Sandbox world: four horizontal tier bands from Beggar Street at the south to the Castle at the north, with wastelands flanking both sides.
Canonical World Map · v1

The rectangle. Four tiers: Beggar Street, Village, Town, Castle. Wastelands on both flanks. Every player starts south. Progress is north. This map replaces world_map_v0 as the canonical reference.

Side elevation cross-section showing the four stacked tiers of the kingdom from beggar level at the bottom to the castle keep at the top, each tier visually distinct.
Side Elevation

The four tiers in cross-section. Chokepoint gates control movement between each band — the higher you go, the harder the gate is to pass without coin or vouching.

Wide panoramic view of the infinite horizontal frontier: an open wasteland stretching east and west beyond the kingdom walls, hinting at endless expansion territory.
Infinite Horizontal Frontier

The kingdom has a fixed north-south depth but expands infinitely east and west. When a shard fills up, the next chunk of frontier is already waiting.

Top-down view of players and the king building walls outward into the frontier, claiming new land block by block from the wastelands.
Wall Expansion

Both king and players can fund and build walls outward into the forest and wilderness. Players clear trees and mob camps to build — no farmland by default. New land inside the walls becomes kingdom territory — taxable, buildable, ownable. Guard patrol routes auto-extend to cover it. Bandits push back.

Abandoned land outside the walls slowly reclaimed by nature: saplings, weeds, and moss creeping over crumbling foundations over a 30-180 day decay cycle.
Ecological Regrowth

Abandoned land rots in stages: 30 days → weeds, 60 → saplings, 90 → young forest, 180 → climax ecosystem. Regrown land resets to wild-resource state — harvestable again but unbuilt. The land outlives every owner.

Blocker #17 — Locked Decisions

  • · Rectangle world shape — fixed north-south depth, infinite east-west
  • · Four stacked tiers: Beggar Street → Village → Town → Castle
  • · Tier chokepoint gates between each band (coin or vouching to pass)
  • · Wastelands flank east and west — bandit territory, no king authority
  • · Player + king wall construction expands into the frontier
  • · Ecological decay: 30 / 60 / 90 / 180 day regrowth cycle on abandoned land
A lone silhouetted explorer on a rocky outcrop looking out across vast fog-shrouded mountain ranges, with early-stage bandit camps and tent smoke in the middle distance hinting at new settlements.
Beyond the walls Infinite Horizon Every shard hits the edge of the map. The next one's already being founded.

Currently Building

Unity prototype — pair-mode implementation in flight. All 19 design blockers are locked. Below is what's actively being wired up.

As of 2026-04-09 · MVP-1 vertical slice playable end-to-end

MVP-1 Vertical Slice ✓ playable

The full headline loop runs in a single play session, no inspector touched. The trust meter is wired to inputs, the letter is a real inventory item, a Village Gate Guard accepts it via the dynamic give pattern, and the welcome banner closes the arc.

  • pick berries from bushes (existing pickup mechanic)
  • walk to Tobias on Beggar Street, press G to give one berry — trust climbs by 5 each
  • Tobias's dialog and subtitle change as trust crosses cold → wary → cordial → friendly → vouching (~18 berries from cold start)
  • at vouching, a recommendation letter is granted to PlayerInventory.hasVouchLetter — HUD shows Letter*
  • walk north to the wooden palisade Village gate at (0, 0, 14) — a KayKit Knight stands in the gateway and warns you he won't take bribes
  • press Shift+G to offer the letter directly (skips consumables) — the guard tears it up, the wooden plank disappears, the welcome banner runs for 5 seconds
  • walk north past the gate into the Village plaza at (0, 0, 24) — cobblestone tint, welcome sign, and two new citizens (Lyra the Apprentice, Kells the Wary) with their own dialog

In-editor speedrun: open the debug console (backquote) and run mvp1_speedrun — bumps trust to 100, grants the letter, teleports you next to the guard. Full walkthrough lives at docs/playtest-mvp1.md.

Next: a writing pass on Tobias's five dialog tiers, and the MVP-2 expansion of the Village plaza into a real tier with buildings + council + the dawn announcement system.

Sandbox-Dynamic Verbs ✓ pattern locked

Player verbs (give, talk, attack) are universal and target-agnostic. Any item is giftable to any NPC — berries, building materials, even Tobias's signed letter. Per-NPC consequences are subscribed listeners on a delegate chain; the first interested receiver claims the item. Key items round-trip back to the player when no listener wants them — you can't accidentally give a deed away. Future quest NPCs add their own match rules including secret conditions. Zero hardcoded if (npc == Tobias).

Chunked Overworld v1

Streaming chunk manager — 32×32m chunks, view distance 3, async coroutine load/unload. KayKit asset prefabs baked at editor time, spawned at runtime via ChunkManager. Coroutine-spread loading shipped; active wiring into the Beggar Street scene is the next ship.

Admin Console

yasirkula/UnityIngameDebugConsole via UPM. Toggle on F1. Five commands: spawn_berry, kill_entity, set_time, give_material, tp_player. Zero overhead when closed.

Weapon System

Melee raycast with per-frame attack windows, stamina drain, Mordhau-style parry timing. Chunk-aware damage routing for Buildables. Damage floor for sentient NPCs.

Beggar Street Layout

200×200m hand-authored Tier 0 zone. Tobias's mud-block soup kitchen, inn, patrol path, main square. Village gate visible + sealed in the scene.

ithappy Animals

KayKit + ithappy animal pack wiring — deer, rabbit, and wolf variants. Animator Controller, nav mesh agent, Damageable component, ecology tracking hooks.

Mock Network Layer

INetworkService + MockNetworkService + NetworkManager singleton shipped — offline-first impl fires synthetic welcome + entity_spawn so the rest of the client can pretend it's networked. LiveNetworkService is a documented stub waiting on the NativeWebSocket UPM dep.

# next ships, in order of leverage Tobias dialog writing pass · MVP-2 Village expansion (buildings + council) · NativeWebSocket install + LiveNetworkService wire-up · Inventory v2 (slot grid + weight) · Beggar Street visual contract polish · BuildableChunk + Flammable destruction pipeline

Interested?

Building this. Funding this. Playing this. Get in touch.

goosebot@xndr.io
GitHub: github.com/mrcsXndr/kingdom-sandbox (private — access on request)