🌱  a living garden · one HTML page

Habitat

A cozy garden you nudge, not a machine you operate. Moisture seeps through the soil, the seasons rewrite the world, and every plant, critter, and hybrid is data the game invents as it runs.

Real ecological simulation Three.js floating island Built on Fundamental No build, no accounts
Turn the season
The premise

It’s a simulation, not a control panel.

You don’t place tiles and watch a script play back. You tend a system that’s already running — and it keeps running whether you’re there or not. Three ideas hold it together.

The clock

One tick moves everything

A single clock advances the whole world at once — moisture drains, temperature drifts, daylight swings, plants grow or wilt, critters hunt, the season turns. Nothing waits its turn.

The rule

One law governs it all

Everything obeys suitability → vigor: how well a spot matches a plant’s genome decides how fiercely it thrives — or whether it quietly gives up. No scripted outcomes, just conditions meeting nature.

The world

Content is data, not code

New plants, decor, and creatures aren’t hand-built — they’re genomes the procedural builders read at runtime. That’s the trick that lets the garden breed hybrids and discover species that never existed.

How it works

A handful of small systems, all talking to each other.

None of these is a feature bolted on top. Each is a loop feeding the others through the same soil, air, and light — which is why the garden surprises you.

Water & soil

Moisture seeps down through three soil horizons and spreads to neighbors. Dig below the water table and groundwater floods in; raise the land and it drains.

Sun & season

Temperature and daylight gate what will grow. Four seasons rewrite the palette, the weather, and the very soil — sow the wrong thing in the cold and it won’t take.

Roots & rivals

Plants compete for light and room; weeds move in on neglect and choke a crowded bed. Pull them, or let a tired bed rest and the ground recovers on its own.

Pollinators

Bees and butterflies ride a real force field between blooms, carrying pollen that fertilizes what they touch — and, when the right flowers meet, crossbreeds it.

Weather you feel

Rain, frost, and snow settle on the plants and the ground; storms knock pollen loose; a hard cold snap can freeze a pond solid until the thaw.

A whole food web

Bunnies forage, a fox hunts the bunnies, an owl and a hawk strike from above, herons fish the ponds. A live predator–prey web — with a night chorus when the light goes.

Under the hood

The whole world runs on one clock and one rule.

Nothing here is scripted to happen at a set moment. Every behaviour emerges when the clock pushes some condition across a line. Here is the machine, part by part.

The clock

A single tick moves the entire world

One World.tick(dt) advances in-game time, batched to about eight times a second off the render path. From that one clock everything cascades — the sun arcs and the sky recolours, temperature swings day-to-night and across seasons, moisture climbs and drains through the soil, plants grow or wilt, animals wake, hunt, and sleep, weather rolls through.

None of it is on a timer. It happens because time crossed a threshold. That’s why walking away is legitimate play: the garden keeps living without you, and you rejoin a world that moved on. The whole game is one quiet loop — observe, nudge a condition, wait, discover what emerged, nudge again.

suitability = temp × moisture × soil
clover0.00
grass0.00

The rule

Everything alive obeys one law

For any organism on any tile, three conditions — temperature comfort, moisture, and soil quality — multiply into a suitability score between 0 and 1. Each tick, that thing’s vigor drifts toward how suited it is relative to its rivals on the same tile. High vigor spreads into the neighbours; low vigor declines and dies, freeing the ground. Competition is just two suitabilities compared.

Apply that one rule everywhere and it is the gameplay. Clover beats grass in a rich, moist bed (about 0.83 to 0.60) and loses in heat or drought. Weeds are the same rule inverted — they prosper in poor, neglected soil and wither the moment you enrich it. There is no win condition; there is a system seeking balance, and your job is to tilt the conditions until it lands where you want.

topsoilsubsoil · rootssubstratum water table
Water & soil

Water moves through three living layers

Every land tile carries three stacked horizons. Rain, snowmelt, and your watering can land in the topsoil, which loses water to evaporation and percolates the rest down. Below it, the subsoil is the root zone — where plants actually drink, and where suitability is mostly read. At the bottom the substratum relaxes toward a groundwater level set by the tile’s height against the water table: dig low and groundwater floods in; raise a hill and it drains — and when the deep layer saturates, it lifts water back up by capillary rise.

You never open a moisture meter to see this. The game renders the column as three horizons that darken as they wet and pale as they dry, so you read the water in the ground itself.

Pollen

It’s energy — and nothing is minted from nothing

A healthy bloom banks a little pollen each tick from good conditions — more if it carries many florets. That reserve is what it spends to reproduce: to self-seed, to fund clover’s takeover of a lawn, to set a hybrid where two species meet. Wind and rain knock banked pollen loose into the air (so a storm becomes a collection window), bees turn it into honey, and when you sweep the field with a net you draw from the reserves of nearby blooms — capped by what they’ve actually released.

Because it’s conserved, you can read a flower’s reserve in the drifting swarm: a full bloom crowds with motes, a spent one thins. No bar, no number — the field shows you.

The genome

Every organism is data — five kinds of gene

Nothing in the world is a hand-drawn sprite. Each plant is plain data in five groups. Form is categorical — stalk, rosette, branching, or vine — and picks which body it wears. Morphology is the continuous stuff: height, petal and floret counts, leaf and fruit size. Pigment is colour. Life-cycle sets annual, biennial, or perennial, plus growth stages and the temperature band it tolerates. Ecology covers whether it blooms, takes shade, self-seeds, and how fast it spreads.

Because the simulation reads that schema generically, anything with a valid genome just works — it grows, competes, gets eaten, and reproduces with no new code. The genome is the API.

Crossbreeding

When two cross, each gene inherits its own way

A single cross rolls one blend factor and applies it gene by gene, by the rules on the left: Mendelian coin-flips for the categorical genes, blending-with-mutation for the continuous ones, an RGB blend for colour, and a rare doubling of spread for the occasional leap — then a clamp that culls the unviable. The result is heritable variation with regression to the mean, plus the odd saltation — exactly enough for selective breeding to surface something rare.

And you rarely trigger it by hand. Pollinators and the pollen field carry pollen across the garden; where a mature bloom sits beside a different blooming species in dense pollen, it sets a hybrid seed on a neighbour on its own. A lush, varied, well-pollinated garden throws new species; a still monoculture doesn’t. The studio below is the deliberate version of that same cross — try it.

Why it’s different

Most garden games ship a catalogue. Habitat ships a grammar.

Because every living thing is a genome the game reads at runtime, the world doesn’t just grow — it invents. Three moves take you from a fixed set of seeds to species no one authored.

01
Genomes, not sprites

Every species is a recipe

A small set of traits — form, color, habit, timing — that the builders interpret into a mesh, re-rendered across its whole lifecycle, season, and weather.

form:stalkpetal:6hue:ambercycle:annual
02
Crossbreeding

Pollen writes the next generation

Carried between blooms, pollen lets two plants parent a hybrid that inherits — and mutates — from both. The Dex keeps the real family tree.

parent A+parent B→ hybrid
03
AI discovery

Describe it, and it’s real

Tell the courier what you’re after and the game mints a brand-new genome to match — playable, breedable, and catalogued alongside everything else.

“a fern that glows”→ new species
Try it — live

Grow a genome. Then cross two.

This is the same idea the game runs on: no plant is drawn by hand. Change the traits and the builder redraws the creature from data — then breed two into a hybrid that inherits from both.

Form
Bloom color
Petals / fronds6
Vigor62%
Cross:A —×B —
The engine underneath

Built on Fundamental.

Habitat runs on @fundamental-engine/three — a reciprocal field runtime where elements bend an invisible physics field, and the field’s local density bends them back. It began as a way to make interfaces feel physical; Habitat is what happens when you hand it a world.

The same field that drifts pollen along the wind also steers the critters and decides which blooms breed. Habitat is the engine’s garden — built alongside it, in lockstep, to show what a field-native world actually feels like to live in.

the field is the game engine vendored, no-build IIFE pollen · breeding · critter steering
Go tend it

The island is floating. It’s waiting for a gardener.

Open a tab, dig a pond, sow a row, and let a season pass. It plays fine in a minute — and keeps unfolding for far longer.