Two brothers spent 11 years reverse engineering Wing Commander, and now it has co-op in the browser

Wing Commander Together runs the DOS space combat game in a modified DOSBox in your browser and lets two pilots fly as wingmates over WebRTC, using a room code and your own copy of the game.

AI-drafted from 4 sources. This story was written with AI from the outside reporting listed under Sources, and checked by automated tools before it went up. The originals have the full detail.

As children, danielrh and brother Patrick played Wing Commander two to a ship: one steered while the other handled the lasers and afterburner. They wanted to fly as wingmates instead. A write-up by danielrh, last updated on 4 November 2026 and shared on r/retrogamedev the same day, explains how that took eleven years, and the result can now be played in a browser.

Finding the ship in 640K

The project began on 4 October 2015, with the game running in DOSBox. The idea was that the game's whole memory fits in under a megabyte, so if the bytes holding the player's and the wingman's positions could be found, network packets could steer the wingman. The first step was to fly into empty space until everything else had despawned, then compare memory dumps taken while stopped and after moving. That narrowed a megabyte down to 132 candidate bytes and then to the address holding the ship's position. Velocity, and later the right, up and forward vectors, followed, all kept in arrays of 64 slots per ship. The camera sits in slot 0x3D, which the write-up suspects was a programmer's joke.

Making the game act

Writing to memory alone could not produce laser fire or missiles, so the brothers had to call the game's own functions. They overwrote a no-longer-needed text string, "Loading WING COMMANDER", with a small trampoline of machine code. Their modified DOSBox pushes the current position on the stack, jumps into that code, calls the game function and returns to where the game left off. The game's Borland overlay loader crashed at random until the trampoline was made to look like a proper Borland function, which took from October to December 2017 to work out.

The network protocol arrived in August 2017: TCP with protobuf messages, with the leader sending every ship's position every frame plus fire events, despawns and damage. Explosions, missiles and autopilot followed in 2018. In 2019 they found where mission victory is tracked by copying the whole 64K data segment across the network and cutting it in half again and again until 80 bytes were left. In 2020 they hooked the game's comm text, so players can type messages that show up as the wingman talking on the cockpit display.

The hard part was sharing it

The game was playable by October 2020, but asking friends to find an old copy, build a strange version of DOSBox, swap public IP addresses and open firewall ports was too much, and the code sat mostly idle on GitHub. This year the project was revived with lobbylink, a small Go lobby server that connects players peer to peer over WebRTC using a shared room code, with a TURN relay for players behind strict firewalls. The write-up says an LLM was used to set up the build scripts that compile DOSBox for the browser with emscripten and to add optional voice chat.

To play, you take the GOG installer for Wing Commander, drop it into the page so it is stored in the browser, enter a room code and launch. The game itself is not supplied. The browser version is at fireflyk64.github.io/dosbox and the modified emulator's code is on GitHub.

Sources

Image: Image: danielrh

More news from Gaming World