In the weeks leading up to the FIFA 2026 World Cup, I heard the first televised stadium wave was at Mexico ’86 in the Azteca Stadium. So I thought, what if 40 years later, people could recreate the same idea with their phones? Thousands of screens lighting up in sync, creating all kinds of cool shapes and patterns across the bowl.
I had seen something similar at Coldplay concerts, with people wearing flashing wristbands, but not yet with phone screens, even though they require no extra hardware and can produce richer effects than a single flash.
So I decided to build it and now writing about what it takes to make it work in a real stadium, without wristbands, app installs or a reliable network connection. I’ll walk through the systems problem underneath that idea: shared time, shared content, position, and surviving a network that will not cooperate.
The challenge
Imagine 10 devices forming one color wave across a room, or why not, 60,000 across a stadium bowl.
Each device has its own clock. Each reaches the server over a different network path. Some join late, some lose packets, and some go offline and come back. If the effect is spatial, each device also needs to know where it sits relative to the others. Otherwise, every screen can only flash the same color at the same time and there is no wave to move.
For the effect to work, the system needs 3 things:
A shared sense of time
A shared program
A shared understanding of position
The program describes what content should appear over time, and a client here is simply a browser tab running on someone’s phone.
Many designs quietly depend on a fourth thing: a live network connection at the moment of presentation.
In a stadium, that fourth dependency is the weak one. Tens of thousands of phones share a handful of cell sites, and the network degrades exactly when the crowd is most active, which is exactly when you want the effect to fire.
So the real requirement is stronger than low latency: once a client has joined, it must keep displaying the correct output even if the network disappears entirely.
Clocks drift and packets stall
There are two naive ways to build this, and each one fails on its own terms.
The first is to trust the clocks. Send every phone the program ahead of time, let each one fire the effects using its own wall clock, and skip live coordination entirely.
The problem is that device clocks disagree more than people expect. A phone’s clock comes from a quartz oscillator and no two oscillators run at exactly the same rate. Also temperature and age change that rate further, so devices left alone will drift apart.
Operating systems correct for this with NTP, the Network Time Protocol, which periodically asks time servers on the internet for the current time and nudges the local clock toward it. That helps, but over the public internet NTP typically lands within tens of milliseconds under good conditions, and phones sync rarely enough that errors of whole seconds are common in practice.
Maybe a few seconds of error sound tolerable for most software, but at 60 frames per second, even a small clock difference can put two phones many frames apart while both believe they are on time. Wall clocks can also jump, because an NTP correction can step time backward or forward, and any playback logic that assumes time moves smoothly forward breaks when that happens.
The second approach is to trust the connection. The server decides what each phone should show right now, the network delivers that decision, and the client paints whatever it receives.
Now the clocks don’t matter, but a new problem appears. Every screen redraws itself in a render loop, running roughly 60 times per second asking one question, what should I paint for this frame, and in this design the answer to that question has to arrive over the network.
The live connection has become the definition of “now,” and that is a fragile place to put it because packets take different paths, delays vary, and connections drop. If one phone receives “turn yellow” 80ms before the phone beside it, the wave looks uneven as it moves through the crowd. If a third phone misses the message entirely, it freezes while everyone around it moves on.
Rendering locally
The fix is to combine what each naive approach got right: distribute the program ahead of time like the first approach, but replace blind trust in each device’s clock with an estimated shared clock, and keep the network out of the frame decision entirely.
Once a client has all three pieces, every frame becomes a local computation:
output = render(sharedTime - origin, program, position)The network’s job is to deliver those inputs and occasionally update the clock estimate, but it never decides what an individual frame should show.
Each of the 3 things from the challenge gets resolved in its own way, so let’s take them one at a time.
Shared time
A single server timestamp is not enough to establish a shared clock. The packet carrying it spends an unknown amount of time in transit, so by the time it arrives it is already stale by exactly that unknown amount.
The standard fix, the same basic idea used by NTP, is a ping-pong exchange that produces four timestamps:
The client sends a ping and records the send time,
t0The server receives it at
t1The server replies at
t2The client receives the reply at
t3
Those 4 numbers contain enough information to separate network delay from clock disagreement. The round trip took t3 - t0, minus the time the server spent preparing its response, t2 - t1.
If we assume the trip to the server took about as long as the trip back, then the server’s timestamps should land in the middle of the client’s timestamps. How far off-center they land is the clock offset.
That offset tells the client how far its own clock is ahead of or behind the server’s. By adding it to the client’s current time, the client gets an estimate of the shared time:
const offset = ((t1 - t0) + (t2 - t3)) / 2;
const sharedTime = Date.now() + offset;Each client calculates its own offset, so their raw clocks may disagree while their estimates of the shared time stay close together.
In practice the trip out rarely takes exactly as long as the trip back, so any single sample is noisy. The client takes several samples and averages only the fastest ones, since those are the least likely to have spent time waiting in network queues.
It then repeats the exchange every so often while connected, so drift gets corrected before it builds up.
Shared program
A program describes the effects that should appear over time. For a simple looping wave, it might look like this:
{
"duration": 8000,
"effect": "wave",
"colors": ["#FCD116", "#003893", "#CE1126"],
"direction": "left-to-right"
}Every client runs the same program. At any given moment, it uses the shared time and its position to decide which color its screen should show. Phones farther along the wave show a different color, even though they are all following the same instructions.
The program is easy to distribute because it is just data. When a client joins, it downloads the whole program along with the time origin, the shared timestamp from which the program is measured.
What cannot be downloaded once is the current point in the loop because time keeps moving. So each client has to calculate that from the shared clock:
const phase = ((sharedTime - origin) % duration + duration) % duration;Suppose the origin is 12:00:00.000, the loop lasts 8 seconds, and the shared time is 12:03:20.400. That means 200,400 milliseconds have elapsed. Dividing that into 8-second loops leaves a remainder of 400 milliseconds, so every client that agrees on those inputs is 400 milliseconds into the loop.
A late joiner does not need a replay. It calculates the current phase and starts there.
Position
In this case, position needed no clever calculation. The fan enters their seat during onboarding, and the phone uses that location to determine which part of the wave to display.
A wrong seat produces the spatial equivalent of bad timing: the phone may be perfectly synchronized but still show the wrong color for where it is.
What I could validate without a stadium
Since I don’t have sixty thousand phones, I tested the system in two ways.
First, I used unit tests that randomized clock offsets, network latency, and asymmetric upload and download delays across many runs. Those tests checked whether the ping-pong estimator still converged under messy conditions.
Then I built a swarm harness that opened a hundred browser tabs on one machine, each running the real client against the real server. Because the tabs shared one reference clock, I could measure protocol desync without mixing in differences between physical device clocks. The harness randomized seat positions so the clients covered different parts of the wave.
I also tested a smaller set of real phones over Wi-Fi and cellular, which exposed browser-specific issues such as background timer throttling.
Once a client had synchronized its clock and downloaded the program, it could lose the network and keep rendering from its cached program, clock offset, and local clock. The limit is that an offline client cannot receive a new program or an unpredictable live cue.
The constraint I couldn’t engineer around
A friend who went to an actual World Cup match and tested the app reported back what no harness could have told me: under full stadium lighting, phone screens wash out and are difficult to see from across the bowl. Even worse, during play, people are focused on the match, which makes asking them to follow instructions and hold up their phones practically impossible.
In fact, FIFA did something similar during the halftime break, using phone flashes synchronized with music. The flashes were easier to see, and the break gave people a chance to actually take part in that kind of activity.
So the app worked, but the idea did not hold up under real life conditions. The limiting factors were photons and attention, and no amount of software could fully solve either one.
Where this works
This approach works when the future can be described ahead of time, clients can render it locally, and some small synchronization error is acceptable. It is the wrong tool when clients need to mutate shared state or when the next action is unknown until a live event happens.
The idea did not survive a World Cup match in progress, but it could be a better fit for art installations, concerts, ceremonies, or any gathering where the lights can go down and the crowd is there to make every screen part of something bigger.






