iw4L README

The project's README from github.com/vladtrc/iw4L. As one markdown file: README.md.

IW4L

IW4L is a Call of Duty runtime written from scratch in Rust, on bevy and wgpu. Point it at a copy of MW2 you already own and it loads that install's data into its own engine.

The on-disk layouts came out of reverse engineering the original binaries and reading public technical references.

This whole project is written by an LLM.

Status

No releases yet: you build it from this tree. Nothing here is stable either — the API, the config format, caches and the wire protocol all change between commits, so everyone in a session needs to be on the same one. Expect bugs and desyncs.

The network side is for arranged playtests among people who already agreed to play; it has never been vetted for lobbies full of strangers. IW4L sends nothing home, and diagnostic files sit on your disk until you attach them to a report.

Architecture

assets MW2 zones read natively; MW3 and Black Ops land in the same asset_iw4 IR.
shaders Retail D3D9 SM3 tokens translated to WGSL, so no DirectX at runtime.
rendering One sorted drawsurf list; only the tess emitters fork per surface type.
physics Fixed 17 ms step on its own accumulator. Framerate changes nothing about how a body falls.
simulation One TickInput → sim::step → Snapshot funnel for server, prediction and replay.
network Custom p2p wire over UDP: deltas, reliability, reconciliation. A QUIC master only introduces peers.
platforms Linux, macOS (Metal) and a portable Windows build.

Retail protocols, the original ABI and patched executables are out of scope. IW4L clients talk to IW4L clients.

Game data

IW4L_GAMES points at the folder holding your game trees. No assets ship in this repository or in any release, and IW4L is unaffiliated with the rights holders of the original games.

Those trees are read only. IW4L never patches them, swaps files in them or writes anything back; caches, settings, demos and logs land in iw4l-artifacts/ next to the IW4L binary.

Build and run

System packages first: docs/BUILD.md (Fedora / Debian / Arch — compiler, ALSA, udev, X11/Wayland headers; macOS — Xcode command line tools).

cp .env.example .env          # IW4L_GAMES — folder containing the game trees
make map mp_boneyard          # run a map
make map mp_boneyard CMDS='spawn 0; wait 2s; quit'
make help                     # every recipe

Live runs use [profile.play], a development build with optimizations turned on. PROFILE=release builds the real release binary. docs/WINDOWS.md covers Windows.

Documentation

Implementation notes live under docs/, one short file per area. Start at docs/INDEX.md.

file about
docs/BUILD.md system packages per distro, macOS, Windows cross prerequisites
docs/RUN.md running the game, console scripts, commands and traps
docs/PERF.md Perfetto tracing and performance analysis
docs/RENDER.md rendering pipeline
docs/MAP-LOAD.md map loading and asset installation
docs/ENTITIES.md simulation data flow and entity taxonomy
docs/SIM-STEP.md simulation step architecture
docs/ANIM.md animation system
docs/WINDOWS.md portable Windows build
docs/DEPLOY.md release, publishing and deployment
docs/MASTER.md running your own master server

Contributing and support

A personal, experimental project. Bug reports are welcome and get no promised fix date. CONTRIBUTING.md says what a useful report contains and how changes get reviewed; security reports go to SECURITY.md.

Acknowledgements

IW4L ships none of the code below. It was read against all of it.

License

IW4L is licensed under the Apache License 2.0, and NOTICE holds the copyright notices, the licences of the projects above and the bundled fonts. That licence covers IW4L's own source code. Call of Duty, Modern Warfare, Black Ops and the related assets, trademarks and intellectual property belong to their respective owners.

iw4L (vladtrc/iw4L)

Searching Database…

1.1K ·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, luanti, ebiten, egui, engine, muguet, tidewater, SkyCraft
Creator
vladtrc
Size
10.5 MB
Stars
1.1K
Updated
CommitOct 16
Age
1mo
Commits · 90 Days