Procedural Houses in Minecraft

A generator that analyses the terrain and builds a house to fit it.

Running this in Minecraft on a patch of land procedurally generates a house that fits the environment, wherever it happens to be. It analyses the terrain, finds a suitable flat area, and, room for room, grows a multi storey house from there, choosing a style and filling in roofs, windows, fences, a garden with plants and animals. Solo project for the Modern Game AI course at Leiden University, built on top of the GDPC library.

Generated Minecraft house
Nestled among the trees in a forest.
Generated Minecraft house
The cottage palette, dark timber and peaked roofs, on a riverbank.
Generated Minecraft house
The cozy palette, warm birch tones, a cluster of rooms beside the water.
Generated Minecraft house
The elegant palette, refined dark wood behind a garden fence.
Generated Minecraft house
The modern palette, grey stone and concrete, set by a river.
Generated Minecraft house
The rustic palette on a hillside, with a fence and a few animals.
Generated Minecraft house
The same generator dropped into a desert, adapting to the badlands.
Generated Minecraft house
And in a snowy biome, building straight onto the white terrain.
Generated Minecraft house
A taller build tucked into a dense jungle.
Generated Minecraft house
Inside a finished house, with lanterns, a window and a ladder between floors.

Links · 📄 Report

How it works

The generator starts from a heightmap of the pre-designated area and searches across its entire land for a spot that is at least six by six blocks of flat, dry ground, avoiding water, lava and ice. Once it has placed a room, a recursive search looks around it for the next room and keeps going until there is no space left, so the blueprint follows the shape of the terrain rather than a fixed plan. Each room gets a random architecture, one of five palettes, up to four floors, a choice of roof styles, windows, ladders between floors, a perimeter fence, and some foliage and animals.