HN
Today

Show HN: After a decade of reversing, I got co-op working in DOS Wing Commander

A decade-long personal quest culminates in multiplayer Wing Commander, showcasing the extreme dedication required to reverse-engineer classic DOS games. The author's journey, combining meticulous memory probing with modern WebRTC and AI tooling, delivers a nostalgic dream to the browser, proving that some passion projects simply refuse to die.

200
Score
29
Comments
#10
Highest Rank
16h
on Front Page
First Seen
Nov 4, 8:00 PM
Last Seen
Nov 5, 11:00 AM
Rank Over Time
28101011151617161513141719172023

The Lowdown

For over a decade, brothers Daniel and Patrick Horn pursued a singular, ambitious goal: to transform the beloved DOS classic, Wing Commander, into a cooperative multiplayer experience. What began as a childhood fantasy of flying together evolved into a deep dive into reverse engineering, painstakingly dissecting a 640KB game state to inject new life into an old favorite.

This epic undertaking involved several key stages:

  • Initial Memory Reconnaissance (2015): The journey began by identifying critical memory locations for player and wingman coordinates within the game's 64KB data segment, using memory snapshots and movement analysis.
  • Advanced Data Mapping (2016): Directionality proved trickier, requiring more sophisticated diffing tools to pinpoint vectors for rotation and velocity, including a delightful programmer's Easter egg involving a '3D' camera slot.
  • Function Injection (2016-2017): Realizing direct memory writes were insufficient for complex actions, the team devised 'trampolines' – code snippets written into unused memory regions – to hijack and invoke original game functions, like firing weapons.
  • Networking & State Sync (2017): A custom TCP-based (later WebRTC) protobuf protocol was developed to synchronize game state, transmitting ship positions and events while managing object ID mappings across different clients.
  • Refining Game Mechanics (2018-2019): Further work focused on animating explosions, missiles, autopilot, and meticulously reverse-engineering mission victory conditions through binary bisection of the data segment.
  • Final Touches & Modern Deployment (2020-2026): Communication text was hooked for in-game chat, and most recently, the project leveraged WebRTC, Emscripten, and a custom lobbylink server, with AI assisting in build scripts and voice chat integration, to make the game easily playable in a browser.

This project stands as a monumental testament to persistence and ingenuity, breathing cooperative life into a single-player legend and making it accessible to a new generation of players (and nostalgic veterans) without the archaic setup hurdles.

The Gossip

Retro Reverse Revelations

Many commenters expressed awe and appreciation for the author's decade-long dedication to the project, recalling their own fond memories of Wing Commander. There's a strong sentiment that this kind of deep, passionate technical exploration is exactly what makes Hacker News valuable, with several users simply sharing their enthusiasm and admiration for the achievement.

Hacking History & Cheating Chronicles

The discussion quickly turned to the historical context of memory manipulation, drawing parallels between the author's reverse-engineering techniques and old-school game hacking or 'cheating.' Commenters recounted using tools like Cheat Engine, WozMon, or even physical computer magazines to find and alter game variables in early console and PC games, highlighting the 'arms race' between developers trying to prevent cheating and players finding new ways around restrictions. The author himself chimed in with examples from SimCity and Star Trek: Armada 2.

AI's Agile Assistance

A significant point of discussion was the author's use of AI in the project's final stages. While the core reverse engineering was a manual, decade-long effort, AI was employed for tasks like configuring build scripts for Emscripten, porting the networking stack to WebRTC, and adding voice chat. Commenters appreciated this pragmatic use of AI, seeing it as a tool that enabled the final polish and accessibility rather than replacing the human's deep technical work.

Technical Tidbits & Future Frontiers

Some comments delved into specific technical aspects or proposed future directions for the project. Questions arose about the choice of WebRTC data channels for voice vs. dedicated streams, while other users shared details of their own similar reverse-engineering endeavors on Wing Commander. The author also discussed the potential for applying this approach to other classic games like Privateer or the X-Wing/TIE Fighter series, though noting the challenge of user adoption for older titles.