Skip to content
Future SliceFUTURE SLICE / Deep Reads
Back to articles

Replay, Sound, and Servers: Engineering Battle Drones’ Multiplayer

Battle Drones’ replay and multiplayer features exposed different kinds of engineering constraints: cross-browser numerical differences, uncomfortable audio, and the operational cost of adding a relay server. Follow the reported design changes and what the evidence does—and does not—establish.

Editorial note · AI-assisted

AI-assisted original explainer; sources are listed at the end. Worked examples and exercises were not run unless marked as tested. Diagrams are AI-generated. The cover is an editorial photo.

Based on Simon Willison’s October 20 and October 28, 2026 accounts of Battle Drones.

Laptop displaying code beside books
Photograph · Dawit / Unsplash

Key points

  • Battle Drones’ replay feature depended on deterministic simulation: tiny cross-browser differences in standard trigonometric functions reportedly caused games to desynchronize.
  • The project tried audio messages between nearby devices to avoid operating a persistent game server, then added a stateless WebSockets relay after the audio approach gave a player a headache.
  • These accounts show how a low-infrastructure design can meet practical limits; they do not establish broad compatibility, long-term reliability, or independently verified operating costs.

The engineering problem: keep two versions of a match in step

A real-time strategy game can appear to be one continuous experience to a player, but replay and multiplayer expose a harder engineering requirement: the game must agree on what happened and what happens next.

In his October 20, 2026 account, Simon Willison describes Battle Drones as a browser game developed through repeated coding-agent iterations. One feature let players record a match as JSON and replay it. That kind of replay is easier to support when the simulation is deterministic: given the same starting conditions and actions, it should produce the same sequence of game states.

Willison reports that the replay feature encountered a specific cross-browser problem. Chrome and Safari returned slightly different results for calls such as Math.sin() and Math.cos(). Those small differences could accumulate enough to desynchronize a replay. The project replaced those calls with custom versions to make the simulation’s calculations consistent.

This is a useful engineering lesson: determinism is not just a property of the game’s rules. It can depend on the numerical operations and runtime environments used to implement them. A replay that works on the developer’s machine is not, by itself, evidence that the same match will reproduce everywhere.

Two approaches to multiplayer

The project also explored a way to connect nearby devices without a conventional game server. Willison had previously built a proof of concept for sending game information between phones using audio. For Battle Drones, he describes using a measurement tool to check the available bandwidth between devices before implementing an audio modem. The October 20 account says he tried the approach with laptops, iPhones, and iPads and that it seemed to work well. At that point, the multiplayer system was intended for devices within microphone range.

The design fit a particular goal: keep the game as static HTML and JavaScript, avoid operating a server, and let nearby devices exchange game state directly through sound. But a technical link that works is not automatically a comfortable user experience. In the October 28, 2026 account, Willison says that playing the audio-based multiplayer version gave his wife a nasty headache. He added a warning and then built online multiplayer as an alternative.

The account says he tried WebRTC but could not establish a connection between two of his own devices, even on his own Wi-Fi network. He then had a coding agent build a simple, stateless WebSockets relay server. The server relays connections without storing game state. Willison estimated that a single Fly.io shared-cpu-1x instance that scales to zero would cost no more than $2.19 per month if it stayed hot and served connections continuously. That is his estimate under the stated scenario, not a measured bill or a general price guarantee.

The shift matters because it changes the constraint rather than eliminating it. Audio avoids hosting but brings a sound-based interaction that may be unpleasant. A relay introduces an operated service and a deployment dependency, even if it is designed to be small and stateless.

VISUAL NOTE
Selected document slices and their neighboring context enter a transparent reading window.
AI-generated concept illustrationFrom demonstration to evidence

Evidence and decisions

Engineering decision or claimWhat the accounts reportTrade-off or limit
Make replay reproducibleSmall differences in Chrome and Safari trigonometric results caused desynchronization; the project substituted custom implementations.This addresses the reported source of divergence, but the accounts do not provide a cross-browser test matrix or quantify replay reliability.
Try audio for nearby multiplayerA bandwidth probe preceded an audio modem; Willison says it seemed to work with laptops, iPhones, and iPads.This was a nearby-device approach, and the later account reports a headache from the high-pitched sounds. It is not evidence of comfort or accessibility for all users.
Replace audio with online relayAfter WebRTC failed to connect Willison’s two devices on his Wi-Fi, a stateless WebSockets relay was built.The game now depends on a server and its deployment, despite the stated goal of avoiding ongoing server operations. The source gives an estimate, not audited costs or service-level results.
Keep match records portableThe account describes copying JSON from a completed match and feeding it to the replay feature.A portable record helps rewatch a match, but the source does not establish compatibility guarantees across future game versions.

These are project reports from the developer, not an independent evaluation. The described device trials are not a systematic compatibility study; the accounts do not specify network conditions, sample sizes, or sustained-load results. Likewise, the cost figure is conditional on the stated instance and usage scenario. It should not be read as a universal cost of online multiplayer.

What transfers to other projects

The clearest transferable idea is to treat replay, synchronization, and player comfort as separate requirements. Deterministic calculations can help make recorded actions reproducible. They do not guarantee that a network connection will be available, that two devices will stay synchronized under real conditions, or that the chosen communication channel is pleasant to use.

A second lesson is that avoiding infrastructure has its own costs. Audio was an inventive way to try direct communication without running a server, but its user experience became a reason to add a relay. The relay, in turn, creates an operational responsibility. The right choice depends on which constraint matters most: hosting, compatibility, ease of connection, or the experience of people playing.

The sources do not describe a general architecture for production multiplayer, nor do they establish security properties, reliability targets, or how the relay behaves at scale. Battle Drones is best read as a documented sequence of practical choices and revisions, not as a ready-made blueprint for every game.

EXPLAINED IN SLICES

From demonstration to evidence

  1. Claim

    What exactly is being claimed?

  2. Scope

    Tasks · conditions · access

  3. Evidence

    What can be reproduced?

Editorial diagramKeep a demonstration, a proposed test and measured results separate. Record missing evidence before drawing a deployment conclusion.

References

Our verdict

Battle Drones’ multiplayer story is a useful engineering case study because it shows a real constraint changing the design: numerical differences complicated replay, audio offered a serverless experiment but caused discomfort, and a relay provided another route at the cost of operating infrastructure. The reports support those specific decisions and outcomes—not a claim that the resulting system is universally reliable, comfortable, or inexpensive.

Share this articleXSubscribe with RSSThe Weekly Slice
Was this useful?
Loading likes…

Original references

The October inflection point for vibe game developmentsimonwillison.net · Oct 28, 2026Reference 1Battle Drones—a vibe coded RTS with audio-based multiplayersimonwillison.netReference 2