mw2-recompiled

mw2-recompiled is a port of Call of Duty: Modern Warfare 2 for Windows and Linux that recompiles the game's code and translates its graphics for PC.

README

Modern Warfare 2, recompiled

Call of Duty: Modern Warfare 2 (2009) for the Xbox 360, recompiled for Linux and Windows.
The game's code is recompiled ahead of time, and its console graphics are translated for PC as it plays.
No game files are included. You need your own disc.

Download the latest release
— or —

The multiplayer menuFour players in split screen on Afghan

Features

60 fps or more; up to 4K, 16:9, 16:10 or 4:3; 1 to 4 players in split screen; Steam invites; online play, opt-in; PC custom maps (beta)

  • Campaign and multiplayer, with split screen for up to four controllers.
  • Online with friends: private matches and system link, through Steam invites or on your local network.
  • Sharper than the console: any window size or fullscreen; drawn at 720p, 1080p, 1440p or 4K, in 16:9, 16:10 or 4:3 (down to 640x480 for a CRT TV); antialiasing up to 8x; 16x texture filtering; sharper shadows; wider field of view.
  • Your profiles: set your rank and prestige, unlock everything, open any mission.
  • Custom maps (beta): maps made for the PC game, converted by the launcher.
  • Xbox 360-style controllers, with rumble.

Not supported: ranked playlists, matchmaking without a server, and keeping a match going when its host crashes or loses the connection.

Requirements

You need
Gamean ISO of the Xbox 360 disc, version 1.0.557: the USA/Europe or the Spanish one. The launcher checks it and downloads title update 6 itself.
SystemLinux or Windows, 64-bit, with a processor that has SSE4.2 (Intel since 2008, AMD since 2011)
GraphicsVulkan 1.2
Disk8 GB
Controllerrequired to play; the keyboard covers the menus

Install

  1. Download it for your system from the releases, and extract it anywhere.
  2. Install: start mw2-launcher, choose INSTALL GAME and pick your ISO. The game is copied into game/ and updated to title update 6.
  3. Play: PLAY CAMPAIGN or PLAY MULTIPLAYER. (mw2-sp and mw2-mp start the game directly.)

The launcher

Screen
PROFILESrename yourself or switch profile; set the multiplayer rank and prestige; unlock everything; open the campaign's and Special Ops' missions
GRAPHICSfullscreen, aspect ratio, resolution, stretching, antialiasing, texture filtering, shadows, frame rate limit and field of view (below)
NETWORKhow the multiplayer reaches other players: NONE (this PC only), LAN, SERVER or STEAM (below)
MAPS (beta)ADD MAP converts a map made for the PC game (IW4x). It then shows in a private match under BONUS MAPS. PC GAME points at your copy of the PC game, which such maps borrow pictures and sounds from; it is found on Steam by itself. Some maps don't convert yet, and some that do don't play.
MODSinstalls a curated mod (BROWSE), adds one from its zip file or web address, and turns mods on or off; online, a copy with mods plays only with players who have the same ones (docs/mods.md)
CHECK FOR UPDATESinstalls a newer release over this one
REPORT A BUGruns the game once with its log kept, writes a report and opens a new issue with your system filled in
GraphicsAs on the consoleAlso
FULLSCREENF8 in the game
ASPECT RATIO16:916:10, 4:3
RESOLUTION720p1080p, 1440p, 4K, or their 16:10 sizes (faster graphics cards); 640x480 to 2880x2160 in 4:3
STRETCHoff, black bars on a screen of another shapeon, the picture fills it (for a CRT TV)
ANTIALIASING2x4x, 8x, off
ANISOTROPY1x to 4x2x to 16x at least (sharper ground and walls at a slant)
SHADOWSconsole2x, 3x, 4x (smoother shadow edges; faster graphics cards)
FPS LIMIT60higher, or none
FOV65up to 120

Keyboard

KeyDoes
arrows, Enter, Escd-pad, Start, Back
Z X C VA B X Y
Q Ebumpers
F8fullscreen
F6invite friends
Homethe guide (the controller's Guide button): what you are playing, friends, quit

Online

Everyone runs mw2-mp from the same release, with the same NETWORK chosen in the launcher.

Steam. With Steam running, the game shows as Spacewar. SYSTEM LINK lists the games every Steam player hosts, worldwide, and anyone can join yours. For a game among friends, host PLAY ONLINE → PRIVATE MATCH and choose Invite friends (or press F6): it lists your Steam friends who are playing. Your friend accepts in Steam's chat while their game is running. Other players see your Steam name. Without Steam running, it plays as LAN.

Server. Everyone on the same server sees each other's games in SYSTEM LINK, can join each other's private matches, and finds games together with FIND GAME, from anywhere. Whoever hosts a match plays in it. Enter the server's address and password under NETWORK; nobody but the server's owner needs to open a port. To run one, see docs/relay.md.

LAN. SYSTEM LINK finds games on the network by itself. In a private match, the lobby's Invite friends invites everyone on the network; start the others with MW2_LAN_ACCEPT=1. Two copies of mw2-mp on one PC can play a system link match, each with the controller that chose SYSTEM LINK in it.

Everyone must have the same release: the launcher updates it. Another release's games don't show in SYSTEM LINK, and joining one says Server is a different version.

Playing online safely

The known security bugs in the game's 2009 network code are fixed (docs/security.md). It is still old code: play online only with people you trust.

  • Steam: anyone on Steam can join a SYSTEM LINK game you host, and can reach your game while you host one. While you look for games in SYSTEM LINK, any game listed there can answer. Otherwise the game ignores traffic from anyone not in your lobby, and a private match is always among friends.
  • Server: anyone on the server can join your games. The server sees all the traffic; the other players don't see your address.
  • LAN: anyone on the same network can reach the game.

Settings

What the launcher sets is kept in a file named .env beside the executables, one setting per line. Environment variables work too.

Setting
MW2_FULLSCREEN=1FULLSCREEN
MW2_RENDER=<w>x<h>, MW2_SCALE=<2 or 3>ASPECT RATIO and RESOLUTION
MW2_STRETCH=1STRETCH
MW2_MSAA=<n>, MW2_NO_MSAA=1ANTIALIASING
MW2_ANISOTROPY=<2 to 16>ANISOTROPY
MW2_SHADOW_SCALE=<2 to 4>SHADOWS
MW2_FPS_LIMIT=<n>FPS LIMIT; 0 is no limit
MW2_FOV=<65 to 120>FOV
MW2_MODS=<folder>[:sp|:mp],...MODS: the mods that are on, folders in mods/ beside the executables, each for the campaign, the multiplayer or both
MW2_NO_AUDIO=1no sound
MW2_LOG_FILE=mw2.logkeeps the log, to attach to a bug report

Saves are in saves/ beside the executables.

Developers

Building, the source layout and how the runtime works: docs/building.md, docs/runtime.md, docs/switches.md and the rest of docs/.

License

GPL-3.0-only (SPDX-License-Identifier: GPL-3.0-only). It covers this project's own code: the runtime, tools, patches and build files. It grants nothing for the game: Activision's code and data, and the Rust generated from the game's executables, are not part of this repository and not under this license.

No game code or data is included; the builds only run with files from your own disc. Not affiliated with Activision, Infinity Ward, Microsoft or Valve.