hn.today

Decompiled Battlefield 1942 running on the browser

levels.io6 points0 comments
Screenshot of Decompiled Battlefield 1942 running on the browser

A developer has decompiled the shareware demo of Battlefield 1942 and made it playable in a web browser, including multiplayer. The project tackles a game with no existing open-source engine or prior browser port to build on; an earlier attempt six months ago stalled. A new effort using Claude Code, powered by Opus 5.5, produced a working version that players can try online.

The process involved disassembling the game’s x86 machine code to identify roughly 57,000 functions, translating those functions into about 100,000 lines of C, and compiling the result to WebAssembly with Emscripten. Because the original game relied on around 300 Windows and Direct3D functions, these also had to be replaced with equivalents using OpenGL and WebGL 2. The developer then built a network stack that connects the browser game to a multiplayer server over WebSockets. The account presents the project as a striking example of AI-assisted reverse engineering and porting, while acknowledging the creator could not explain much of the generated low-level code. Players are invited to test the demo and report bugs.

Read on levels.io0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.