Breakable Rowhome Walls in a Pixel Art City

Every rowhome in Philadelphia Fiefdom can be broken into, a section at a time. Its walls are made of sections, each one bay wide and one storey tall. Hit one and it cracks, then starts losing bricks, then opens up, and what's inside the wall shows in the break: single bricks and the wall's thickness, timber studs behind plaster, rebar in concrete. Whatever's left hanging with nothing to hold it up falls.
Last time I wrote about walking into buildings through the door. This is the other way in.
What's a wall made of?
A wall is a grid of sections, one per bay per storey. Each section is a small grid of chunky voxels, each 8 pixels across and 10 pixels high, and each voxel has a few points of damage it can take: whole, cracked, broken, gone. A section only starts keeping track once it's been hit. Until then it's not a grid of anything, just a plain wall drawn like every other building.
Each section is one of three materials, and each breaks its own way:
- Brick breaks as bricks. The mortar cracks first, then cracks run through the bricks, then bricks fall out one by one, and you can see the wall's thickness round the hole. Damage spreads along the courses.
- Plaster on a stud wall cracks, then falls away. Behind it are timber studs, snapped where the damage is worst. Damage spreads up the studs. On a load-bearing wall, the plaster falls off to the brick behind it.
- Concrete cracks, then chips away to its stone. Inside is rebar, and the rebar doesn't break. Damage doesn't spread at all.
What falls out lands as rubble that matches the wall, down to the plaster shards and strips of lath from a stud wall. It drops from where each piece was and then lies there.

Why not just use voxels everywhere?
Because the city doesn't look like voxels, and it shouldn't. Bay windows and angled walls are drawn true, at their real angles. A whole section is a smooth box drawn by the same shader as everything else. Only a section that's been hit is rebuilt, on a lattice of bricks, and even then the damage is blended between the middles of its voxels, never drawn as their squares. So a broken wall reads as broken brick, not as a stack of cubes.
What makes a section fall?
After every hit, each storey works out what's still holding up what. Anything left with nothing holding it up falls as rubble.
Some things hold. A load-bearing section never breaks all the way through. The frame can break, its corner piers, upper floors, roof and base, but broken concrete leaves its rebar, and the rebar still holds what it held. Ring beams never break at all. So a house never comes down in one go, and the ground floor never goes.
Before
AfterWhat can break a wall?
- A sledgehammer. It's the tool for the job, and you start with one stowed. A brick section takes three blows to break, a plaster one two, a concrete one three.
- A car. Drive into a house hard enough and the impact breaks the wall, and the faster and heavier the car, the more it breaks. The city's own drivers are too careful to do it.
- Not fists. Punching, bats, thrown things and fire don't break walls.
Doors and windows break too. A hollow-core door goes in two blows, a wooden one in four, a steel one in eight. A window's glass breaks on the first blow, and the whole window falls out once the wall round it is gone. Furniture inside doesn't break, for now.

Can every house really break?
Yes. All of the city's houses, over 27,000 of them, can be broken. They just don't pay for it until they need to.
A house is set up to break at the moment it's hit: the instant a sledgehammer swing or a car reaches it, the game builds its sections. A house that's set up but never actually damaged is let go again. A house that's been hit keeps a log of every blow it took, so when you leave and come back later, it's rebuilt from that log and the hole's still there.
The rebuilding work doesn't happen on the main thread. Each wall is meshed in the background, and swapping the new mesh in has a tight budget each frame. The swap also waits a few frames, so it happens under the dust cloud instead of in plain sight. On a Steam Deck, that brought the worst frame's cost of breaking a wall from 4.5 ms down to 1.6 ms.
Does it work with friends?
It does. Every house has a log of its blows. The host decides where each blow lands and adds it to the log, and every player's game applies the same blows in the same order. So everyone's wall breaks the same way, brick for brick, and each guest checks its walls against the host's to make sure. A friend who joins later starts from the walls as they stand.
I tried flying brick chips for a while. They slowed things down and didn't look great, so the dust and the rubble do that job now.
Quick answers
Can you knock a whole house down? No. You can open walls, floors and the roof, but the ground floor and the frame's rebar always stand.
Do the holes stay? Yes. They come back from the house's log when you return.
Can you punch through a wall? No. You need a sledgehammer, or a car.
Follow along
Philadelphia Fiefdom is an online sandbox set in Philadelphia. Last time was walking into buildings. Next I'll get into something much quieter: the fishing minigame I'm building now. Join the playtest list to play it early, or come say hi on Discord (opens in a new tab).