iw4L README

项目的 README,来自 github.com/vladtrc/iw4L。合并为一个 markdown 文件:README.md。

IW4L

IW4L is an open-source IW4-compatible engine, written in Rust with Bevy. Point it at an IW4-compatible installation you already own and it loads that installation's maps, models, textures and weapons. You can try implemented movement and combat on multiplayer maps, then inspect or change how those systems work.

Bomb planting in IW4L Tanker explosion in IW4L

What you can try

Explore maps, fight bots, and record and replay demos. Gameplay remains incomplete; expect missing behavior, bugs and desyncs. The asset readers also cover IW5, T5 and T6 formats.

APIs, configuration, caches and the wire protocol change between commits; multiplayer peers must run the same build.

Windows: prebuilt release

  1. Download iw4l-windows.zip from Releases and extract it into an empty writable folder. The archive password is t.me/contextrot.
  2. Launch iw4l.exe. It finds compatible IW4 data in your Steam libraries and creates a Modern Warfare 2.lnk shortcut next to itself. For an install outside Steam, create that shortcut to your IW4 data folder yourself.

For online play, put the .iw4l-server file you received from a server operator next to iw4l.exe. With it the game finds that master and updates itself on launch. Details: Windows guide.

Build and run

Install Rust through rustup and GNU Make. Build dependencies cover Linux's C/C++ toolchain and system libraries, and macOS's Xcode command line tools. Windows instructions cover building and arranging a portable folder.

You need your own installed IW4 multiplayer data. IW4L distributes no game assets and reads installations without patching or replacing their files. Caches, demos and logs go under iw4l-artifacts/; Linux settings use a separate configuration directory described in the run guide.

From the repository root:

cp .env.example .env
# Edit .env: set IW4L_GAMES to the folder containing your game installations.
make map mp_boneyard CMDS='wait world; spawn 0; force_match_start; bot add 3'

This builds the optimized play profile and starts a local match with three bots. force_match_start skips the warmup that otherwise freezes movement.

Inside the engine

Area Implementation
Assets Native FastFile readers convert game data into a shared intermediate representation.
Shaders Retail Direct3D 9 Shader Model 3 bytecode is translated to WGSL.
Rendering World geometry, models and effects feed one sorted draw-surface list.
Simulation Explicit server frame over Bevy ECS state; client prediction replays player commands using shared movement and weapon primitives.
Networking Custom UDP traffic; a QUIC master provides browsing and relaying. The host simulates the match.

Where to go next

This whole project is written by an LLM.

Acknowledgements and license

Thank you to all contributors for code, bug reports, testing and feedback. Special thanks to ju1cedr1nker and silvernote03 for QA testing weapons, maps, attachments and other gameplay features.

OpenAssetTools and its iw4x-x64 fork informed asset layouts; IW4x informed asset and protocol behavior; KisakCOD informed engine structure. Ghidra was used to inspect the original binaries.

Movement implementation history and source boundaries are recorded in its provenance note.

IW4L's source is licensed under Apache 2.0. Preserve required attribution and bundled font license texts when redistributing; see NOTICE. Original game assets and trademarks belong to their owners. IW4L is unaffiliated with them.

iw4L (vladtrc/iw4L)

正在搜索数据库…

1.2K ·GitHub
这是什么?IW4L 是一个用 Rust 基于 Bevy 和 wgpu 从零编写的使命召唤运行时。你把它指向你已拥有的现有 Modern Warfare 2 安装,它会利用逆向工程得到的磁盘数据格式,把该游戏的数据加载进自己独立的引擎。
这是零售版游戏的模组,还是一个全新的引擎?它是一个从零编写的引擎/运行时,不是应用到原始二进制文件上的补丁。它读取 MW2 的资产文件,但独立地重新实现了渲染、模拟和网络;零售协议、原始 ABI 和打过补丁的可执行文件都被明确排除在范围之外。
怎么构建并运行它?安装 docs/BUILD.md 中列出的系统软件包(Linux 上是编译器、ALSA、udev、X11/Wayland 头文件;macOS 上是 Xcode 命令行工具),日常运行用 profile.play 开发配置构建,发行版二进制文件则用 PROFILE=release。docs/WINDOWS.md 介绍了便携版 Windows 构建。
使用它必须已经拥有 Modern Warfare 2 吗?是的——把 IW4LGAMES 变量指向你现有的 MW2(或 MW3/Black Ops)安装所在的文件夹。IW4L 本身不附带任何游戏资产,而且它只读取这些文件,从不回写。
它稳定到可以正常游玩了吗?不能——目前还没有任何发行版,API、配置格式、缓存和网络协议在提交之间都会变化,所以所有人必须使用同一个构建。网络代码只用于事先约定好的内部联机测试,尚未用于公开大厅。
它能在哪些平台上运行?Linux、macOS(通过 wgpu 使用 Metal)以及一个便携版 Windows 构建。
它会自行向网络发送数据吗?不会——IW4L 不上报任何数据。诊断文件和缓存会留在你的磁盘上,除非你选择把它们附到错误报告中。
多人联网是怎么实现的?IW4L 使用自定义的点对点 UDP 线上协议,带有自己的增量压缩、可靠性和状态协调机制。基于 QUIC 的主服务器只负责帮各个节点互相发现,不转发游戏流量。
没有 DirectX 的情况下,原游戏的着色器怎么处理?零售版 D3D9 Shader Model 3 的着色器标记会被提前转换为 WGSL,因此运行时渲染完全不需要 DirectX。
这个项目实际上是谁写的?整个代码库由一个 LLM 编写,其构建过程包括用 Ghidra 对原始二进制文件进行逆向工程,并交叉参考 OpenAssetTools、IW4x 和 KisakCOD 等公开项目。
它能加载哪些游戏的资产?MW2 的区域文件可原生读取,MW3 和 Black Ops 的资产则会被转换为相同的内部 assetiw4 中间表示。
有哪些类似的项目?benilla, crosstl, luanti, ebiten, egui, engine, muguet, SkyCraft
作者
vladtrc
大小
10.8 MB
星标
1.2K
更新
提交Oct 16
时长
2个月
提交 · 90 天