Claude Code ports Half-Life 2 natively to Mac and iPhone in two days

kanapitsas · reddit · 2026-11-10

Developer kanapitsas used Claude Code (mostly Opus 5.5) to statically recompile Half-Life 2 (plus Episode One/Two and Lost Coast) to run natively on Apple Silicon, going from first commit to playable on iPhone in under two days.

The recompiler from his Portal 2 port translates the Linux x86 code to C, then compiles for ARM64. Day 1: Claude added per-game profiles, SSSE3 instructions, missing Linux imports, bridged the newer Steam SDK, fixed unfiltered textures (macOS OpenGL lacks sampler objects), and got HL2 running on Metal via the Portal 2 Direct3D 9 bridge. Day 2: performance, Metal by default, and an iOS build with touch controls.

The project is open source (source-recomp) with an installer app that finds your Steam games and builds them on your Mac (10-20 min per game). Requires owning the games on Steam; no game files included; unofficial and unaffiliated with Valve.

Original post →

More from coding & agent

coding & agent channel →