Inspiration

Traffic lights in most cities depend on a central control system. If that system or its network goes down, every junction falls back to a fixed timer. Traffic backs up, and ambulances, fire engines and police cars lose time sitting at red lights. Neptune North's challenge was to design systems that work together without a central hub and keep working when communications drop. We thought traffic signals fit that well. We pictured a city's traffic flow as an orchestra with no conductor: many small red and green light local decisions adding up to something coordinated.

What it does

Greenwave is a browser-based 3D simulation of a city grid in which every junction runs its own traffic lights. Each one can only see its own sensors (how long the queue is on each approach) and messages from the junctions right next to it. There's no shared global state and no central controller. Green waves: junctions tell their neighbours what's coming, for example "a group of cars reaches you in 12 seconds". The neighbour times its green to match, so platoons of cars flow through several junctions without stopping. Emergency corridors: an emergency vehicle sends a priority request that passes hop by hop along its route, ahead of it, and clears a green corridor. Resilience: you can cut any link between junctions, or all of them. A cut-off junction falls back to its own queue sensors and to "hearing" a siren within a short radius, so the emergency vehicle still gets through. Safety: every junction enforces one rule locally at all times. It never shows two conflicting greens. You can pick the emergency vehicle's route on a setup card, press Enter, and watch it cross the city. Colour-coded dots show messages moving between junctions: yellow for car platoons, and magenta for the emergency vehicle. A finish card reports the journey time for central, fixed and Greenwave implementations.

How we built it

We wrote the simulation in plain JavaScript and used three.js for the 3D city view. Each junction runs in its own Web Worker, so the junctions can't share memory and can only talk to their neighbours through messages. Each junction's decisions come from a small, self-contained "brain" that keeps the lights safe and gives green to the busiest direction. To compare against today's systems, we also built fixed-timer and central-controller versions.

Challenges we ran into

  • Proving the junctions really are independent. "Decentralised" is easy to say and easy to fake. Moving each junction into its own worker, and writing tests for that isolation, took repeated restructuring.
  • Being honest about what neighbour messages buy. Turning messages on cut stops per car by about 25% in our tests. Against fixed timers, though, Greenwave wins on emergency-vehicle time and average wait, not on stops: fixed timers make fewer but longer stops. We framed the pitch around what the data actually showed.
  • Getting the physics right. Cars froze inside junctions, ran past stop lines and bunched up. We fixed these one at a time. Acceleration is still instant, which is a known simplification.
  • Moving from 2D to 3D late in the weekend.
  • Making the display understandable to someone seeing it for the first time. This led to the message key, a "?" explainer on each board and start/end markers on the route.

Accomplishments that we're proud of

  • No central brain to fail. With every link cut, the emergency vehicle still gets a clear path in Greenwave because junctions fall back to the siren.
  • Safety is enforced locally, so no combination of messages or failures can produce conflicting greens.
  • The coordination is real. Each junction runs in a separate worker, and green waves form from purely local decisions.
  • The demo is reproducible from a fixed seed, and the code is backed by tests.
  • It's a polished 3D visual that makes invisible messages between junctions visible.

What we learned

  • Coordination doesn't need a coordinator. Short, local messages are enough for city-wide behaviour like green waves to appear.
  • Designing for failure first makes a system simpler. Once every junction can survive alone, losing a link is just a temporary state, not an emergency.
  • Pure, testable logic sped up iteration. Keeping the brain separate from rendering and threading let us change visuals freely without breaking behaviour.

What's next for Project Greenwave

  • More realistic driving: realistic acceleration, turning traffic and pedestrian phases.
  • Real street layouts instead of a regular grid, using open map data.
  • Testing against recorded traffic data rather than generated traffic.
  • Smarter messaging: forecasting further ahead than one hop, handling several emergency vehicles at once, and resisting spoofed or faulty messages.
  • A path to real hardware: running the brain on low-cost controllers at real junctions, alongside existing systems, as a resilient fallback layer.
Share this project:

Updates

Submission history