Menu

Why Streaming Coordinates at 60 FPS Failed: How Deterministic Angular Damping Saved Our 15-Phone Party Game in Flutter

DEV Community·Mert Koc·12 days ago
#c9RgpUV5
Reading 0:00
15s threshold

When every phone receives every animation frame, network traffic starts driving the experience. We wanted the network to agree on what happened, while each device handled drawing locally.

A bottle spin looks simple: apply force, watch it rotate, wait for it to stop. Put that spin on fifteen phones at once, though, and it becomes a distributed-systems problem disguised as a party game.

Our first instinct was to synchronize the visible motion. If the bottle’s angle changes every frame, why not send the new angle over a WebSocket 60 times per second?

Because “send every frame” makes the network part of the animation loop.

The Cost of Synchronizing Pixels

At 60 frames per second, one spinning bottle can produce 60 state updates each second. Each update needs to be encoded, sent, received, decoded, and applied. A server that fans the updates out to fourteen other phones has to deliver those updates repeatedly, too.

The raw number of bytes is only part of the cost.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.