← Playground

Controlled Chaos

No traffic lights, no lanes, no right of way. Each scooter knows only what is directly in front of it, and slows down rather than stopping. Nobody is coordinating anything.

I moved to Ho Chi Minh City in 2014 and it took me about a year to understand the traffic. Scooters weaving across every lane, no visible rule, and somehow nobody dies at the intersection. There's an unwritten rhythm holding it together.

This is that, in about a hundred lines of JavaScript. Every rider follows three rules: hold your heading, slow down if something is close ahead, and drift sideways if you can see a gap. There is no central controller and no plan. Order is what's left over after two hundred selfish agents avoid each other.

Turn Politeness to zero and it becomes a pile-up. Turn it up and everyone crawls. The interesting part is the middle, which is roughly where the actual city sits.

Why this exists. It was very nearly the whole website. I proposed it as the main concept and then talked myself out of it — it's a beautiful image for the decade I've spent in the south, and it says nothing about the twelve years before that. So it ended up here instead, which is the correct size for it.