Progress
Progress over time
The same numbers as a table
| Time | Named | Rewritten | Verified |
|---|
How it works, step by step
AI agents do the rewriting. A machine check, not an agent's opinion, decides when a function is finished. The quality page explains what that check covers, what it cannot see, and every problem known so far.
Measure the executable
Ghidra, a reverse-engineering tool, analyses the original program. Functions are counted, the compiler's own runtime and third-party library code is set aside, and class names are recovered from the type information the compiler left behind.
Queue the work
A script orders the functions from easiest to hardest and hands them out one at a time. Agents never choose their own.
Rewrite in Rust
An agent studies what the function does, with the most similar finished functions as reference, and writes a Rust implementation.
Compare against the original
The original function and the Rust version are run side by side in a small 32-bit test process, from the same inputs and the same starting memory. If their results, memory writes and outgoing calls agree, the function is accepted. If not, the agent tries again or hands it on.
Swap it into the running game
Accepted functions are loaded into the original game, each with its own on/off switch. If the game misbehaves, switches are flipped in halves until the faulty function is found.
Cut the original loose
When every function has a Rust replacement, the Rust code is built on its own, made 64-bit, and given a new renderer.
What is in the repository, and what never is
Committed
- Structures: fields, sizes, offsets, enums, virtual table order
- Symbols: names, addresses, signatures, hashes, class hierarchy
- Rust rewrites of the engine's behaviour
- Tooling, tests and documentation
Never committed
- Decompiler output or disassembly, edited or not
- C or C++ reconstructions of original functions
- Code copied from other reverse-engineering projects
- Game executables, data or assets
Buy the game
LibertyFlux is not a way to get Grand Theft Auto IV for free, and it never will be. Nothing here contains the game. To use it you need a copy that you paid for: buy it on Steam, from an authorised key seller, or from a retailer.
Pirated and cracked copies are not supported. This project will never distribute game files, keys, cracks or ways around the game's copy protection. The people who made the game should be paid for it.
Roadmap
| Phase | Work | Finished when | Status |
|---|
What the rewrite makes possible
None of this exists yet. These are the reasons for doing the work, and each depends on the phases above it in the roadmap. The pictures are concept images made for this page, not screenshots.
-

Concept image, not a screenshot. Hundreds of frames per second
The original ties parts of its physics, animation and scripting to the frame rate, which is why it misbehaves above 60. The rewrite runs the simulation at a fixed rate and draws as fast as the hardware allows.
Planned for phase 6.
-

Concept image, not a screenshot. Modern upscaling and frame generation
DLSS, FSR, XeSS and MetalFX behind one setting. The new renderer is designed from the start to produce the motion and depth information these need, which the original never did.
Planned for phase 7.
-

Concept image, not a screenshot. Path tracing
Light that bounces, reflects and casts soft shadows the way it does outdoors, in a city made of wet streets, brick and sodium lamps.
A stretch goal, after the new renderer exists.
-

Concept image, not a screenshot. Native on three platforms
64-bit Windows, Windows on ARM and macOS on Apple silicon, each as a native build with no emulation layer in between.
Planned for phases 5 and 6.
-

Concept image, not a screenshot. New gameplay and graphics
Once the engine is Rust that this project wrote, any part of it can change: new mechanics, denser streets, longer draw distances, and mods that reach parts of the engine no script hook can.
Planned for phase 7.
- Nothing extra to install. No .NET, no launcher, no Visual C++ or DirectX runtime packages.
- The game you already own. It uses the data files from your own copy and ships none of them.
- Old bugs become tests. The community's list of high-frame-rate bugs is the checklist the new simulation has to pass.
Planned platforms
| Platform | Graphics | Upscaling |
|---|---|---|
| Windows x64 | Vulkan, with Direct3D 12 optional | DLSS, FSR, XeSS |
| Windows on ARM | Vulkan | FSR |
| macOS on Apple silicon | MoltenVK, then native Metal | MetalFX |
Projects this builds on
The method is borrowed. These projects were studied for how they work, not for their code.
- Thief 3 decompilation: the work queue, attempt limits, and the rule that workers can only write to scratch space.
- gta-reversed: replacing functions inside the running game with a switch for each, and compile-time checks on structure sizes.
- Snowboard Kids 2 decompilation: letting a script pick the next function, and showing agents similar finished work.
- LibertyRecomp: written-up engine internals from the Xbox 360 version, and what a renderer must supply for modern upscalers.
- scrDbg: the script engine's layout on the current Steam build.
- IV-SDK and FusionFix: years of community knowledge about the game's classes and its frame-rate bugs.
Liberty City deserves a better program around it
The city, the writing and the physics still hold up. The 2008 PC port around them does not: it is 32-bit, it renders on one thread, and its simulation changes with the frame rate.
LibertyFlux replaces that program one function at a time, checks each replacement against the original, and keeps the game playing exactly as it did. When the last function is done, everything on this page becomes buildable.
Background: concept image, not a screenshot.