SF-CODE

Infinite Games · an evolving L-system world · build LS-11 Slow Motion

Infinite Landscape

Drive a cartoon monster truck through a side-on world that never ends. Every cloud, ridge, tree, building and blade of grass is grown from a few rewriting rules. Mature forms seed mutated offspring and old ones wither, your exhaust makes them multiply, and on every layer a small food web of creatures eats, plants, pollinates and builds, whether you're there or not.

Start drivingPlay the tutorial
Try it

Grow a form, one generation at a time

Pick a layer to see one of the forms that grows there, and step through its generations. Each generation rewrites every symbol by its rule, so the drawing gets more detailed each time. Press Mutate to change one rule the way the game does. Some mutants look better, some fall apart.

Layer
Generation
0
Rules
The idea

Plants written as sentences

The biologist Aristid Lindenmayer invented L-systems in 1968 to describe how algae grow, cell by cell. Start with a short string, the axiom, and rewrite every symbol at once using its rule. Repeat, and a few characters turn into thousands.

ω X X → F+[[X]-X]-F[-FX]+X F → FF

The turtle reads it

To draw the string, a turtle walks through it. F steps forward drawing a line, + and − turn by the angle δ, [ remembers where it is and ] jumps back. Brackets are what make branches.

One grammar, many looks

The same rule can be a mountain or a coastline depending on the angle. Koch's 1904 snowflake rule makes a ridge at 60° and a row of sharp Cesàro peaks near 85°, and Koch-derived curves locked to 90° make city blocks.

Evolution with no goal

When a form matures it drops seedlings whose rules are copied with small changes: a turn flipped, a step added or removed, a branch grafted or pruned. Each form claims ground about as wide as it is, and a seedling only takes root if enough of its patch is free. Some forms carry a gene that lets them squeeze into crowded ground, at the cost of a shorter life. Nothing is scoring them: crowded stretches simply fill with the tolerant, open ones with the long-lived.

The world

Five planes, back to front

The landscape is made of five layers that scroll at different speeds, like a stage set: the further back, the slower. Each ground plane is a band of solid, rolling earth that hides the layers behind it, and its forms grow on top of its hills. Most forms are ordinary, but now and then a giant towers over its layer, tiny colonies huddle together, and clearings leave forms standing alone. The truck can drive all five layers, clouds included. Each layer has its own predator.

How to play

Drive, seed, defend

Drive
→ shifts up through three gears. ← shifts down to N, where the brakes hold you even on a slope, then into reverse. X stops at once. Top gear over a crest and you fly.
Exhaust
On by default. A puff that drifts over a form makes it drop a mutated seedling, if there's room. Idle beside a form to work on it. E turns it off.
Fire
Space (or the Fire button) shoots along the layer. A shot destroys the first thing it meets. Shots heat up the ground where they land. Hit a predator enough and it explodes: the blast takes the forms around it and scars the ground for a couple of minutes.
Creatures
Three species per layer plus the hawk, each with a temperament toward you and a role in the ecology. Skittish ones flee and never touch you. Passive ones ignore you (a rolling boulder can still hit you). Territorial ones defend their patch if you linger, fire nearby or shoot them. Aggressive ones come for you: bulldozers on sight, hawks when the ground is hot. Heat only changes how they treat you; they feed, breed and nourish the land regardless. Three hits wreck the truck; it's patched up a moment later. There's no game over.
Ecology
O opens sparklines for the last 10 minutes: forms, lineages, diversity and crowding tolerance on each layer, and every species' population, so you can watch a rabbit boom bring the hawks.
Layers
↑ and ↓ hop between layers, all the way up to the clouds, or tap a layer in the legend.
Growth
Pause the world, or run it at 4× or 16× to watch generations rise and fall.
Inspect
The bottom line shows the form beside the truck: its rules, angle, generation, size, crowding tolerance, lineage and how many mutations it carries.
Touch
Tap right or left of the truck to shift gear that way, swipe up or down to change layer, and use the Stop, Exhaust and Fire buttons. The + and − buttons zoom.
Ground
The earth under each layer is a slowly changing fractal (Julia, Burning Ship, Tricorn and Celtic sets) coloured the way Fractal Explorer colours them. It keeps a record: rain and nourishing creatures make it glow, blasts and bulldozers leave scars that fade over a couple of minutes, and every finished generation sends a pulse through it. The ⛰ button or G picks Living, Calm (still) or Flat, and a palette per layer, including any palette from Fractal Explorer's library.
Music
Landscape Radio: upbeat folk, ukulele, acoustic and hip hop instrumentals by Joystock, opening with "Sunrise Awakening". The ♫ button or M turns it on or off; the line under the title shows what's playing.
Tutorial
Runs the first time you play, one step at a time. Press H to replay it, or use the tutorial button above.
Credits

Music

Landscape Radio plays these tracks while you drive. The first opens every session; the rest shuffle.

Music by Joystock - https://www.joystock.org

Works on phone or desktop, in light or dark. Build LS-11 "Slow Motion".