How Volos Works
A living city in a block of jelly: waves, traffic, flights and seasons, all running in the browser
Volos is a small world set inside a block of jelly. A container ship crosses an open sea between two ports. A bridge joins one of them to a factory town. Behind it rises a downtown with a park, a river, a school and a glacier lake under the mountains, and on the far shore an airport sends planes in and out. Nothing in it is a recording. Every boat, truck, taxi, plane and wave is worked out live, frame by frame, in the browser.
It is one HTML file with no libraries and no downloaded assets. Every building, tree and vehicle is generated by code when the page loads, and it draws with WebGPU, the browser's modern graphics interface. These notes walk through how the main pieces work.
A world inside a block of jelly
The whole scene sits on one block of terrain, cut away at the sides so you can see the coloured layers of rock beneath. The block itself is soft. Tip it by dragging its side and everything inside leans and wobbles together, because the renderer applies one shared tilt-and-squash transform to every vertex before drawing it.
The ground is a single height map covering the whole block: quays, hills, a river bed, mountains. A uniform grid would need about 700,000 triangles to keep the shorelines and peaks sharp, so the mesh is adaptive. Flat patches such as the sea floor, the city plain and the airfield merge into large squares, and small triangles are kept only where the ground actually bends. That one change cut the scene from about 880,000 triangles to about 380,000.
The sea
The water is a shallow-water simulation: a grid of about 134,000 cells, each holding a water height, with the flow between neighbouring cells stored on the edges between them. Each frame, gravity pulls high water toward low water, the flow moves the water, and a little viscosity smooths away grid-scale ripples. The grid steps forward at 120 Hz, and it only walks the parts of each row that are actually wet, because most of the block is dry land.
The ship and boats push their hull shape down into the water as they move, which raises a bow wave and leaves a wake. Dragging your finger across the sea does the same thing. To shade it, the renderer refracts the scene behind the water, darkens it by how deep the water is, and works out caustics, the bright wobbling patterns on the sea floor, by bending light through the surface and measuring where it bunches up.
Ports, cranes and a ship that keeps its own timetable
The ship runs a timetable written as a small state machine: unload at the home port, cast off, sail the route, berth at the far port, load, sail home. The crane picks a container from the fullest stack, trucks queue for it and reverse into the warehouse bays, and a delivery van runs a round of the post office, the supermarket and the hospital. One-way traffic rules on the loop road keep the trucks from meeting head on.
The far port is the home port turned half a circle around the middle of the sea. One description of the quays, warehouse and town is drawn twice: once as it is, and once rotated 180 degrees. The two ports always line up across the water and cost the design work of one.
Traffic that behaves like traffic
Downtown, taxis drive two loops through a street grid. Each one follows the car ahead using the Intelligent Driver Model, a standard way of simulating traffic. Every car has a speed it would like to drive at and a safe gap that grows with speed, and it accelerates or brakes smoothly to keep both. Cars slow down for bends, and their brake lights glow when they slow.
Seven junctions have traffic lights on one shared 14-second cycle: green, amber, then red in each direction. The car logic and the lamps on screen read the same clock, so the lights you see are the ones the cars obey. On amber, a car stops only if it can do so comfortably, as real drivers do. A test drives the traffic for minutes of simulated time and checks that no two cars ever overlap and that nobody runs a red.
The airport
The airport's layout follows real airport design: a runway with its number painted at each end, a parallel taxiway, a turn-off for arriving planes, an apron with four gates, and the usual colour code of lights. Runway edges are white, the landing threshold green, the far end red, and taxiway edges blue.
Three airliners cycle through a full day. Each one is pushed back, taxis out, holds short of the runway, takes off, raises its gear, climbs out across the sea and leaves the map. Later it returns on the approach path, lands, turns off and taxis to its gate. A small air traffic control system keeps this safe with locks: only one plane may use the runway at a time, only one may move on the apron at a time, and a departing plane waits at the hold line until it is cleared. At the gate a turnaround plays out on a timetable. Crew walk out, a belt loader reaches the cargo door, a baggage train loops round the wingtip, and a fuel truck parks ahead of the wing. Everything drives home before the tug pushes the plane back.
A few things are bent for the sake of the picture. The runway is much shorter than a real one, and planes descend at about six degrees instead of the real three, so a whole landing stays in view.
Seasons
The weather moves through summer, autumn rain, winter and a spring thaw. Each season is a set of targets: how much rain, how much snow, how much ice, how bright the sun. The world drifts toward them smoothly. Rain dims the light, ripples the water and makes the streets glossy. Snow settles on every upward-facing surface above the waterline.
In winter the sea freezes, but only once the ship is safely in port, and it cannot leave until the thaw. The ice forms as floes that grow and join, and on the way out it breaks back into floes. Once the ice is thick, skaters come out on the sea, on the glacier lake and on a rink in the park, and they head home as it melts.
Built to be tested
All the behaviour lives in a simulation core that knows nothing about graphics, so it also runs without a browser. Automated tests run hours of the world in seconds. They check that the ship never runs aground or hits a quay, that cars never overlap or run a red light, that two planes never share the runway or come too close on the ground, that ground crew vehicles never touch a plane, and that the sea never freezes with the ship at sea. Most of the bugs in Volos were caught this way, before anyone saw them.
Try it
Volos runs in any browser with WebGPU. Take the short tour when it opens. Then try a few things: drag across the sea, tip the block, call the ship in, switch the season to snow and wait for the skaters, or zoom in on a gate while a plane is being turned around.