Browser-Based Co-op for Wing Commander via Reverse Engineering
A decade-long project enables multiplayer DOS gaming through browser-based WebRTC and memory manipulation.
1Eleven Years of Reversing
The project began in 2015 with a hypothesis that the full game state of Wing Commander resided within a 64k data segment. By utilizing vbindiff for memory organization analysis, the developer mapped entity positions and orientations. This manual reverse engineering effort spanned over a decade to achieve functional cooperative gameplay.
2Memory and Entity Mapping
Detailed memory analysis revealed specific structural quirks, such as the camera being located at entity index 0x3D. The team treated this as a deliberate 3D joke by the original developers. Identifying these memory addresses was critical for synchronizing game states across different clients during the multiplayer sessions in the browser environment.
3Overcoming Borland Overlay Crashes
Patrick, the developer's brother, identified that the Borland overlay loader consistently triggered game crashes. The solution required creating a custom stub that mimicked a legitimate stack frame to satisfy the loader's requirements. This technical workaround was essential for stabilizing the game engine before implementing the browser-based networking and peer-to-peer communication layers.
4Browser Port and WebRTC
The project leverages a DOSBox modification to run the game directly in a web browser. Peer-to-peer connectivity is managed through WebRTC, which also facilitates integrated voice chat for players. The system does not host any original game files, requiring users to provide their own legal copies, such as the GOG version.
5Role of Generative AI
While the core reverse engineering was performed manually, the team integrated LLMs to assist with the recent browser port and WebRTC implementation. These tools continue to support ongoing development tasks. This hybrid approach demonstrates how modern AI can accelerate the integration of legacy software into contemporary web-based networking and communication frameworks.
6Deployment and User Requirements
To initiate a session, users drag their local setup.exe file into the browser interface. The system then processes the binary to enable the multiplayer environment. This architecture ensures that the project remains compliant with copyright standards by avoiding the distribution of proprietary game assets while enabling modern cooperative play features.
7Technical Constraints and Synchronization
Maintaining synchronization for a DOS-era game requires precise state management. Because the original game was never designed for network play, the developers had to intercept and broadcast memory changes in real-time. This mechanism ensures that all participants experience the same mission events, ship positions, and story progression during their cooperative flight sessions.
8Legacy Software Preservation
This project highlights the potential for reviving classic titles through browser-based emulation and modern networking protocols. By combining deep memory analysis with WebRTC, the developers have successfully extended the lifecycle of a DOS classic. Such efforts provide a blueprint for future community-driven preservation projects targeting complex, single-player legacy software architectures.