nolfsrc README

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

No One Lives Forever, built from source

Source code and a build for The Operative: No One Lives Forever (Game of the Year Edition, PC, 2000/2001): every executable and DLL of the game -- the LithTech 2.2 engine (lithtech.exe, server.dll, the Direct3D renderer d3d.ren), the NOLF.exe launcher, the NolfServ.exe dedicated server, ltmsg.dll, sres.dll and the three game DLLs -- compiled from the source in this repository with the original 2000-era compilers.

The main menu UNITY headquarters Misfortune in Morocco: the rooftops of Marrakech Misfortune in Morocco: a guard in an alley, with his shadow Berlin by Night Unexpected Turbulence: on board the plane The Dive: a room with a fireplace Alpine Intrigue: a village in the German Alps

The modern build at 1920x1080: the Direct3D 9 renderer with antialiasing, model shadows, 32-bit textures and 16x anisotropic filtering.

The engine source in src/engine/ is a reconstruction: Monolith never released it, so it was written to recompile to the retail machine code. The game code in src/game/ is Monolith's own NOLF Source Code v1.003 release, which predates the Game of the Year Edition: the GOTY changes to it, reconstructed from the retail GOTY game DLLs, are made in place and marked GOTY:, and the modern build's changes sit inside #ifdef NOLFSRC_MODERN blocks. See docs/LICENSE_NOTES.md for what is whose.

This project, and its modern build in particular, is not made or supported by Monolith Productions.

No unchanged game data is included. The build takes the game's data (and the Miles and Bink sound/video runtime, the only binaries not built from source) from the retail Game of the Year Edition, which the build installs from your own images of its two discs (bring your own: see below). There are two exceptions, both committed in assets/ (assets/README.md): a small set of retail data files that the modern build changes (about 2.6 MB: bug fixes, and changes as a mod makes them), which go into its nolfsrc.rez; and the retail art and text that our binaries are compiled with (about 0.5 MB: the icons, the launcher's splash bitmap and sound, the dedicated server's wizard bitmap, the console font, and the Game of the Year strings and credits). The modern build replaces that runtime with open-source builds from ext/: OpenMiles for Miles, and our own Bink player on FFmpeg.

Progress

How much of each binary compiles to exactly the bytes of the retail game is in progress/README.md, with how it is scored.

Build

You need Linux with Docker, the submodules, and your own images of the two discs of the Game of the Year Edition (Europe):

  1. Fetch the submodules: git submodule update --init (or clone with --recurse-submodules). ext/toolchains/ is the compilers (about 560 MB, see ext/toolchains/README.md); ext/tools/ is the build's helpers and the reconstruction tools and guides; ext/openmiles and ext/ffmpeg are the modern build's open-source middleware (about 130 MB), and ext/nolf1-modernizer the NOLF Modernizer, two of whose models the modern build uses (about 60 MB); ext/lithtools is our LithTech tools, whose lithrez packs the game's nolfsrc.rez.
  2. Put your two disc images in isos/ (a .iso, a .bin with its .cue, or a .zip of one; a hard link is good: ln <image> isos/), or set NOLF_ISOS=<directory>. The first build installs the game from them into out/retail/ and checks every file. See docs/BUILDING.md, "What you need".
  3. Run
make            # -> out/nolf-legacy-release/ and its -private / -public .tar.gz
                #    (about 3 minutes; the first time, also the docker image
                #    and the retail game's install from your images)
make test       # optional: plays two levels under Xvfb with scripted input
make debug      # optional: the same game with symbols and debug logging,
                #    in out/nolf-legacy-debug/
make modern     # optional: the game with the retail bugs fixed, in
                #    out/nolf-modern-release/ (both: docs/BUILDING.md, "Variant builds")
make progress   # optional: how much of it matches the retail binaries

make help lists the other targets. docs/BUILDING.md explains the build in detail.

Play

See docs/INSTALL.md. What the modern build changes is listed in CHANGELOG.md; to play a build of your own, see docs/BUILDING.md.

Contributing

The remaining work is functions that are written but not yet byte-identical, and functions not written yet. ext/tools/guides/ explains the method, from reading the retail machine code to the compiler quirks that decide the last few bytes; make progress (after make) shows where things stand and catches a change that breaks a function that matched before. The CI has no retail game: it builds the four variants and their public archives without it, and checks the build against hashes that make progress-update records (make ci; see progress/README.md and docs/BUILDING.md, "The CI build"). It cannot find new matches, so run make progress-update with your disc images before you send a change.

Credits

This project builds on the work of others:

The modern build reimplements the Modernizer's changes rather than copying its code (docs/MODERN.md, "Rules for this work"); of its assets, it uses the two seasonal menu models.

nolfsrc (nolffan/nolfsrc)

game-preservation
Searching Database…

What is this?This repo reconstructs the full source code for The Operative: No One Lives Forever (Game of the Year Edition, 2000/2001) and builds every executable and DLL of the game, including the LithTech engine, from that source using the original 2000-era compilers.
Is this the official Monolith source code, or a reconstruction?The game code in src/game/ is Monolith's own official NOLF Source Code v1.003 release (with GOTY changes reconstructed on top), but Monolith never released the engine itself, so src/engine/ is a from-scratch reconstruction written to recompile to the exact retail machine code.
What do I need to build and play it?You need Linux with Docker, the toolchains/ submodule (about 560MB of period-correct compilers), and your own disc images of the retail Game of the Year Edition, which the rez/ submodule installs from redump images fetched via archive.org.
Is the whole game already byte-identical to the retail binaries?Not yet - the project tracks how much of each binary compiles to exactly the retail machine code, currently about 84.4% of all code across the engine, server, renderer and game DLLs; the rest is written but not yet byte-exact.
Does it run natively on Windows, or only through Wine on Linux?The build toolchain targets Linux with Docker and Wine, but the finished game can also be installed natively on Windows by dropping the retail disc images onto windows-install.bat, and it runs on Steam Deck via Proton without extra winetricks setup.
What's the long-term roadmap for this project?The plan is byte-for-byte compatibility with the retail game for preservation first, then folding in the NOLF Modernizer patch, fixing bugs uncovered during reverse engineering, and eventually porting the renderer from Direct3D 7 to Vulkan for native cross-platform play without Wine.
Does the modern build support game controllers?Yes, it supports Xbox-style (XInput) pads, including Steam Deck's mapped controls, with configurable look speed, dead zones and custom button bindings in Options > Controls.
Why is music silent when playing the legacy build on Wine?The retail game's music uses DirectMusic, which Wine only implements partially, so its built-in DirectMusic can't load the music styles; you need to install Microsoft's own DirectMusic into the Wine prefix (the modern build bundles this automatically).
What is the NOLFSRCMODERN define for?It's the preprocessor flag that wraps all of the modern build's extra fixes and features, so a plain make build still produces output matching the original retail bytes exactly while make modern enables the improvements.
Creator
nolffan
Size
168.5 MB
Stars
121
Updated
CommitNov 16
Age
1mo
Commits · 90 Days