iw4L README

The project's README from github.com/vladtrc/iw4L. As one markdown file: 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)

Searching Database…

1.2K ·GitHub
What is this?IW4L is a Call of Duty runtime written from scratch in Rust on Bevy and wgpu. You point it at an existing Modern Warfare 2 install you already own, and it loads that game's data into its own independent engine using reverse-engineered on-disk layouts.
Is this a mod for the retail game or a brand-new engine?It's a from-scratch engine/runtime, not a patch applied to the original binaries. It reads MW2's asset files but reimplements rendering, simulation and networking independently; retail protocols, the original ABI and patched executables are explicitly out of scope.
How do I build and run it?Install the OS packages listed in docs/BUILD.md (compiler, ALSA, udev, X11/Wayland headers on Linux; Xcode command line tools on macOS), then build with the profile.play development profile for day-to-day runs, or PROFILE=release for the release binary. docs/WINDOWS.md covers the portable Windows build.
Do I need to already own Modern Warfare 2 to use it?Yes — point the IW4LGAMES variable at the folder with your existing MW2 (or MW3/Black Ops) install. No game assets ship with IW4L itself, and it only reads those files without ever writing back to them.
Is this stable enough for regular play?No — there are no releases yet, and the API, config format, caches and wire protocol all change between commits, so everyone must be on the same build. The netcode has only been used for arranged playtests among people who agreed in advance, not for public lobbies.
What platforms does it run on?Linux, macOS (via Metal through wgpu), and a portable Windows build.
Does it send any data over the network on its own?No — IW4L sends nothing home. Diagnostic files and caches stay on your disk until you choose to attach them to a bug report.
How does the multiplayer networking work?IW4L uses a custom peer-to-peer UDP wire protocol with its own delta compression, reliability and reconciliation. A QUIC-based master server only helps peers find each other and does not relay game traffic.
How are the original game's shaders handled without DirectX?Retail D3D9 Shader Model 3 shader tokens are translated ahead of time into WGSL, so the runtime never needs DirectX to render.
Who actually wrote this project?The entire codebase was written by an LLM, built from reverse engineering the original binaries with Ghidra and cross-referencing public projects like OpenAssetTools, IW4x and KisakCOD.
Which games' assets can it load?MW2 zones are read natively, while MW3 and Black Ops assets are converted into the same internal assetiw4 intermediate representation.
What are similar projects?benilla, crosstl, luanti, ebiten, egui, engine, muguet, SkyCraft
Creator
vladtrc
Size
10.8 MB
Stars
1.2K
Updated
CommitOct 16
Age
2mo
Commits · 90 Days