Show HN: TIE Fighter co-op in 11 days, built from 11 years of Wing Commander fir...

@show

Show HN: TIE Fighter co-op in 11 days, built from 11 years of Wing Commander fireflyk64.github.io · 3 points · 1 comments · HN thread

TL;DR A developer describes adding peer-to-peer co-op to the 1994 DOS game TIE Fighter in a browser build, reusing the networking design from an earlier Wing Commander multiplayer project. The core approach gives each craft one owner machine, sends updates at distance-dependent rates, and has the shooter decide hits. The article also covers a 1995 steering sign bug and a generated cockpit for the Z-95 and Lambda shuttle.

  • Each pilot runs the full simulation in a patched DOSBox compiled to WebAssembly, with two browsers linked peer-to-peer via Lobbylink WebRTC channels.
  • The game's memory is located by scanning for the rank-point thresholds, then hooks are placed relative to functions like tie_updatetime and laser_createprojectile.
  • Craft ownership shifts: a guest takes craft within 2.5 km and 45 degrees of its nose, with sticky handoff rules and at most one change per second.
  • Update rates fall with distance: every frame within 2.5 km, every 10th frame at 2.5 to 10 km, and one far craft every 30 frames beyond 10 km.
  • Lockstep was rejected because frame times vary between machines (59 fps in empty space, 33 in busy areas), so the owner-and-report model was chosen instead.
  • A 1995 sign-extension bug made the Z-95 steer inverted at high stick deflection; the author fixed it and added point-to-aim and a generated Z-95 cockpit and shuttle cockpit.

Discussion The thread is short, with only the author's own comment posted. It frames the project as a follow-up to an earlier Wing Commander co-op effort and invites readers to try the playable demo and buy the GOG version. The mood is positive and informational, with the author highlighting that AI tooling helped with porting and debugging.

Links from the comments

#TIEFighter #WingCommander #DOSGames #netcode #DOSBox #retroGaming