Traffic Intersection Sim

Colorful cars flow through a four-way intersection controlled by a traffic-light state machine that cycles between north-south green, east-west green, and brief all-red clearance phases. Each car checks the light for its direction and either keeps moving at its set speed or slows to a stop at the line if its approach is red, so traffic queues and releases in waves without collisions.

Live Stats
Cars passed:0 Light phase: Cars waiting:0 Car speed:1.00x Cycle duration:5.0s
Controls