DISCLAIMER: This fork just exists to pull in the latest changes from Demonized Modded EXEs, until the author (CnRJay) updates the project. I'm unlikely going to fix existing issues and such.
X-Ray Monolith: Next Gen is a WIP fork of the X-Ray Monolith Engine, designed specifically for heavy modpacks (like G.A.M.M.A.) that run hundreds of scripts. The primary goal is to provide maximum stability and memory availability.
This project introduces a modernized memory and threading architecture to break the 15-year-old limitations of the original X-Ray engine, virtually eliminating "Out of Memory" crashes during long sessions.
Tip
G.A.M.M.A. Users: This engine is Plug and Play! If you are playing S.T.A.L.K.E.R. G.A.M.M.A., all necessary dependencies (including 3DSS) are already configured. You are ready to play immediately after installation.
The latest release of the engine can be downloaded on the releases page.
- LuaJIT GC64 Implementation:
- Enables 64-bit pointers in Lua, allowing the game to utilize 10GB+ of RAM for scripts.
- Fixes the standard ~2GB limit crash in Anomaly.
- Intel TBB Integration:
- Replaces standard Windows memory allocator with Intel Threading Building Blocks (TBB).
- Reduces memory fragmentation and micro-stutters.
- Hybrid Multithreading:
- Upgraded systems to improve 1% lows and FPS in CPU-bound situations.
- Faster Load Times:
- Optimized file system and asset loading pipelines to significantly reduce time loading save games and level transitions.
- True PIP (Picture-in-Picture):
- Native engine support for dual rendering scopes increasing immersion.
- Requirement: Requires 3DSS (3D Shader Scopes) to function correctly.
- DLTX (Expanded LTX Support):
- Override sections without crashing.
- Support for
@[newsection]creation. - Advanced parameter manipulation (
>name = add,<name = remove).
- DXML: Allows Lua scripts to modify XML UI files on the fly.
- Shader Support: Full compatibility with Screen Space Shaders (SSS), Beef's NVG, and Shader Scopes.
- Debug Tools: Integrated LuaPanda support and ImGui extensions.
- Fixes: Includes fixes for animation smoothing, collision bugs, and the "1000 save" limit.
- OS: Windows 10/11 (1903 Update or newer)
- CPU: Supports SSE2 and newer instructions
- RAM: 8 GB+ recommended for heavy modpacks
- GPU: Support for Shader Model 3.0 or newer
- DirectX: 9.0c or newer
For Launching:
- Visual C++ Redistributable 2022 (All-in-One)
- S.T.A.L.K.E.R. Anomaly 1.5.3 installation
- 3DSS (3D Shader Scopes) (Included in G.A.M.M.A., required for other modpacks)
For Development:
- Visual Studio 2022 Community Edition
- Workload: Desktop development with C++
- Git
- Backup: Backup your existing
binfolder in your Anomaly directory. - Download: Get the Release archive from the releases page.
- Extract: Extract the contents (the
.exeand.dllfiles) into yourANOMALY/binfolder.- Note: Ensure the new
lua51.dllfrom this download is in the bin folder. The engine will not run with the standard Anomaly version.
- Note: Ensure the new
- Clear Cache (CRITICAL): Navigate to
appdata/shaders_cacheand delete the folder.- Failure to do this may result in a black screen upon loading a saved game.
- Launch: Run the game using the new executable.
The project is configured for a "One-Click Build" workflow in Visual Studio 2026.
- Open
engine-vs2022.slnin Visual Studio 2026. - Select the Solution Configuration (
DX11andDX11-AVX). - Select the Solution Platform: x64.
- Right-click Solution 'Engine' in the explorer and select Build Solution.
The build process will automatically compile LuaJIT with GC64 support, link TBB libraries, and output the final executables.
You can also use the provided batch script to build multiple configurations at once.
Run the following command in a terminal with access to MSBuild (or use the script directly if vswhere is installed):
.\src\batch_build.bat- Executables and PDBs:
_build/_game/bin_dbg/ - LuaJIT Library (
lua51.dll):_build/_game/bin_dbg/x64/Release/(orRelease-AVX)
Q: My RAM usage is very high (6GB - 10GB+). Is this a memory leak? A: No. This is intentional. The new allocator aggressively caches memory to prevent stuttering, and the GC64 Lua implementation uses more memory per object to ensure stability.
Q: The screen is black but I can see the HUD.
A: You did not delete your shaders_cache. Delete the folder in appdata and restart.
Q: I am crashing with LNK1120 or "Entry Point Not Found".
A: You likely have mismatched DLLs. Ensure you copied lua51.dll from the release zip into your bin folder and overwrote the old one.
We welcome contributions to improve performance and stability! Please follow these guidelines.
- Fork & Clone: Create a fork of the repository and clone it locally.
- Branching: Create a new branch for your feature or fix (e.g.,
git checkout -b fix/memory-leak). - Thread Safety (CRITICAL):
- Do NOT execute Lua callbacks inside TBB parallel loops (causes deadlocks).
- Do NOT write to global physics/sound states from worker threads without locking.
- Verify thread safety for any new threaded system.
- Ensure code compiles.
- Verify game launches and runs without freezing.
- Submit PR with clear description.
Contents of this repository are licensed under a custom GSC Game World proprietary license for non-commercial use. See the License.txt file for details.
- Original X-Ray Monolith: TheMrDemonized
- OpenXRay Team: OpenXRay
- Intel: TBB Library
- LuaJIT: Scripting engine
- True PIP: m22specner