Making a Generated World Feel Lived In: Clutter, Houses, Cats and Townsfolk
Generated maps are tidy, and tidy looks empty. How two thousand crates were placed by rules, houses got roofs worth looking at, cats got names, and 66 townsfolk got daily routines, all without sending a single packet.
"Mostly low poly flat boxes" #
By day five every map had a town, roads, landmarks and monsters. Walking through them, the human put the problem plainly:
Can we add some more stuff, clutter like boxes and so on, to make the world more populated and lively. Right now buildings are mostly low poly flat boxes. No character.
Generators are good at placing the important things: roads, houses, NPCs, spawns. They're bad at the unimportant things that make a place look used: the crate by the back door, the cart nobody unloaded, the laundry line. Those are exactly the things a level designer adds by hand in the last weeks. We had a generator and a day. The answer came in four parts, each its own agent: a building detail pass, a clutter kit with automatic dressing, ambient animals, and later more and better townsfolk, drawn as sprites.
Houses with character #
The houses came from the Blender pipeline as clean low-poly shapes. The detail pass rebuilt them with what the eye looks for in East Asian architecture: tiled roofs with visible courses, timber frames on the walls, eaves, porches, window lattices, and trade signs on shops. Weathering (darker roof edges, grime at the foot of walls) is painted into vertex colours rather than textures, so every building in the game still shares one material. That matters for the GPU budget,1 The performance post has the story of why. and it means a new house style costs nothing at runtime.
The kit now has five house styles plus a tall house, a teahouse, a shop, a storehouse, a granary, a farmhouse and a guard tower, and each comes in regional variants: desert, snow, swamp and ember. The map data still just says "a house, 7 x 6 m, here", and the game scales the model to the footprint.
Clutter by rules, not by hand #
The clutter kit is 53 models (crates, barrels, sacks, carts, market stalls, racks, nets, laundry, benches,
planters, a noodle stand) from the same kind of Blender script. Placing them is the interesting part.
tools/mapgen/dressing.py is called by every map generator, and its central idea is in its docstring:
How it reads as lived in, not scattered: every placement is a VIGNETTE (a small hand-made group: a crate stack with a sack against it, two barrels and a bucket, a woodpile, a bench with a planter...) set against a wall or a road edge, turned to it, with a little jitter. Each building ROLE has its own vignettes per wall: a smithy gets coal, racks and firewood; a farm hay, a cart, a trough and a fenced plot with a scarecrow; a dock fish racks and nets.
Random scatter looks random. Small authored groups, placed by rules, look like someone put them there. The rules are checked for every item as an oriented box: never on a road's walkable width, in water, inside a building or on a mountain, never in front of a door or in a gatehouse passage, never near a portal. If the first item of a group breaks a rule, the whole group is dropped, so you never get half a woodpile.
The dresser has a small vocabulary: dress a building by its role, a street edge, a market lane (two rows of stalls on an arc round a square), a food court (a noodle stand, tea tables under parasols), a camp (cook fire, bedrolls, crates, a banner), and the space behind an NPC (a stall behind a merchant, keeping their talk spot clear). The result is 2,129 placements across the maps, 918 of them in the Vale. They're drawn in batches per model and 48 m chunk with one shared material, so a dressed town costs about as much as an empty one.
Animals, and petting them #
Animals came next: cats, dogs (huskies in Frostpeak), chickens, goats, oxen, donkeys, a camel in the desert, frogs and herons by the water, and flocks of birds, gulls, crows, butterflies and fish. The Vale alone has 115 animal and flock entries. They're driven by small schedules with personality in the data: cats sit, groom and nap in sun spots and on doorsteps; dogs sniff about, lie by doors and trot after a nearby player for a few steps; chickens peck and scatter when you run through them; birds take off when you get close and land on roofs and fences.
Cats and dogs can be petted (press F). Your character kneels (a pet clip was rendered for the sprites), the animal reacts, a heart pops up, and you get a small buff called Content: 2% movement speed for five minutes. Two achievements count it, "Friend of Cats" and "Good Dog!". Every town has named pets: Mochi, Lady Plum, Old Bao and Tofu in the Vale, Kuma and Snowball the huskies in Frostpeak, Cinder and Bellows at the forge camp, Wick, alone in the Shadowlands. It's the cheapest feature in the game and possibly the most liked.
Townsfolk with routines #
The Vale started with a few static NPCs and some townsfolk. A towns pass and a later NPC pass brought the count to 43 NPCs (merchants, the blacksmith, the four grandmasters, quest givers, Gate Keepers) and 66 townsfolk across the maps. Townsfolk aren't quest machines; they're there to make a town feel inhabited. Each one has a routine, a loop of stops with an activity and a duration: idle, work, sweep, farm, sit, chat, play, music, look. Old Marta sweeps the square. Two people meet by the well and have a conversation: lines alternate every 4.5 seconds once both have arrived.
"Did you hear? Old Marta saw a Shadow by the well last night." "Marta sees Shadows in her porridge."
They also have lines when you talk to them and barks when you pass, which can depend on your level, your school, or how far you are in the main story. Old Marta, before the finale: "Mud. Always mud." After it: "The shard sang all night. My knees stopped aching. Don't tell anyone."2 The story post covers progress-gated dialogue.
Three maps were deliberately left without a town. The Ember Wastes, the Hellmouth Rift and the Shadowlands keep only a gate camp with a few people, a fire and a dog or a cat. A lived-in world also needs places that aren't.
From capsules to people #
For five days the NPCs were coloured capsules. The human had grown fond of them ("Not sure why I like the capsules so much. Somehow they grew on me. But I guess we have to replace them right?") and asked for "NPCs with different sizes, clothing and colour". They became sprites, rendered from the same character sheets as the player with seven NPC outfits and five hats. Named NPCs have fixed looks; townsfolk pick theirs from a regional palette with a random seeded by their id, so the same person always looks the same on every machine, and the desert's people dress differently from the Marsh's. Sizes and builds vary: a stocky or slender stretch of the card, and heights from 0.86 (an apprentice) to 1.14 (the Iron Fist grandmaster). The HD-2D post has the pipeline; a video memory test keeps a busy square (the Vale's 33 NPCs and townsfolk plus 30 passers-by) at 92.7 MB of sheets, inside a 128 MB budget.
None of it goes over the network #
All of this is presentation. Townsfolk, animals and flocks are built on every machine from the map data and run from the wall clock (the same 36-minute day as the sky) and a seeded hash, so every player sees the cat on about the same doorstep without any synchronization. There's no spawn, no sync and no collision. The architecture rule from CLAUDE.md is strict about it: "nothing may depend on where they stand."
There is one exception, and it's small: petting is a real action, so the server checks it, loosely, against where the animal's schedule says it should be (an 18 m "leash"), and relays the reaction to other players. Reactions that only concern you (a dog following you, chickens scattering) happen on your machine only, and then the animal walks back to where its schedule says.
Takeaways #
- Place vignettes, not items. Small authored groups placed by rules read as lived in; scattered single props read as noise.
- Make rules that drop whole groups. Half a woodpile is worse than none.
- Detail in vertex colours, one material. Character without a draw-call or descriptor cost.
- Presentation can be deterministic. A clock and a seed let every machine agree on where the cat is without a packet.
- Give the cheap features names. A named cat you can pet costs almost nothing and makes a town somebody's home.
What's next #
The last post is about the weapons at the end of the road: the Fullmoon weapons, the +9 upgrade gamble, and why their final steps never fail.