levelsio 用 Claude Code 将 Battlefield 1942 移植到手机浏览器
levelsio 把 Battlefield 1942 搬进手机浏览器了,Claude Code 写的图形层把 DirectX 翻译成 WebGL,还能随便改分辨率,挺硬核。
开发者 levelsio 宣布将 Battlefield 1942 移植到移动端网页,iPhone 和 Android 可直接在浏览器里多人联机游玩。Claude Code 构建了一个独立图形层,把游戏的 Direct3D(DirectX)指令翻译成 WebGL,夹在游戏机器码和浏览器之间,因此分辨率可以任意调整。由于游戏原本不支持竖屏,部分画面内容(如手臂或车身下方)会被裁切。
I managed to port Battlefield 1942 to mobile web too
So now it's playable as full multiplayer on iPhone and Android from their browser! 🤯
Claude Code built its own graphic layer that translates Direct3D (DirectX) instructions to WebGL, sitting between the game's machine code and the browser, which means we can change the resolution any way we want!
Only issue is you get some stuff cutting off (like the arms below or inside vehicles) because the game was never meant to run in portrait mode of course!