Skip to content

Repository files navigation

# RR2NW

Community continuation and preservation project for *Русская рулетка II:
Закрытые планеты* / *Russian Roulette II: The Next Worlds* by Logos.

The repository contains an approximately 18 January 1999 source snapshot. It
is not the retail source tree: the historical release date is 26 March 1999,
while the currently verified official Russian CD was mastered on 27 May 1999
and contains substantial later content changes.

Original files were provided by developer Svyatoslav Obraztsov (Suavik) with
permission from Logos. Original attribution and [License.txt](License.txt) are
preserved.

## Current direction

Version 1.0 is Windows-first:

- modern reproducible CMake build;
- stable operation on current 64-bit Windows 10/11;
- complete official retail campaign parity;
- no required CD mount, legacy setup, Intel RSX, dgVoodoo or disabled OS
  protections;
- compatible saves, deterministic replay foundations and crash diagnostics;
- external data-driven mod packages.

The first shipping executable may remain modern x86. Native Windows x64,
Linux, macOS and multiplayer follow after Windows 1.0.

The project uses a **modernization-first** plan. Automated manifests, retail
diffs and clean fixtures are the initial reference gate; PCem/Windows 98 manual
testing and a completed Watcom rebuild are not prerequisites for beginning the
modern port.

See the detailed [Windows-first roadmap](docs/Roadmap.md) and
[documentation index](docs/README.md).

## Current status

The current `develop` frontier produces a modern MSVC Win32 `rr2nw.exe` that
loads all nine May retail Levels from an installation or mounted CD, constructs
the recovered gameplay/service graph and renders the real textured scene. The
software path owns and clears the 640x480 frame, supports all twelve submitted
polygon families, perspective textures, Gouraud shading, haze, transparency,
the retail `DITH.DTH` texel-offset mode and palette-driven dynamic lights.

`Vehicle.Default` owns live input, physics and camera state. The admitted graph
also includes Taxi/F1 transitions, cockpit panels, primary fire and Bullet
effects, People, Tank/Cannon and the first Commander/TankGroup mission chain.
Initialization and teardown are transactional, diagnostics publish renderer and
gameplay evidence, and the normal Debug/Release suite currently contains 60
tests. Twelve admitted owner/reference phases, deterministic Vehicle controls,
LCN1 continuation and eight atomic RR2SLOT1 files now survive a destroyed and
recreated Level. One explicit schema-1 data-pack can overlay declared retail
resources through `--mod-dir`; its complete byte identity is bound to saves.
Retail-save import, broader manual campaign acceptance and final visual parity
remain open; Linux/macOS and multiplayer remain post-1.0 work.

Use [the Windows retail acceptance guide](docs/ManualAcceptance.md) to select a
Level without editing `game.cfg`, sweep all retail Levels or record a manual
driving/Alt-Tab result. The first data-pack contract and example are described
in [the modding guide](docs/Modding.md).

### Earlier M1 integration notes

Milestone M0 is complete: deterministic manifests, source/retail diff, stable
parity IDs, PE inspection, a verified read-only retail fixture, private Windows
state capture and a bounded launch observer are implemented and tested. M1 is
active: the first design-library boundary and both legacy script libraries now
build and execute under MSVC Win32. The eight-object Arena kernel archive also
builds, with its event-state transport covered by an executable contract. The
complete Arena storage archive and its low-level save backend now build and
round-trip state as well. The core `SimulationContext` is now executable, and
the first two-object object-base boundary (`Route`) compiles and runs without
Supervisor or renderer stubs. Fountain branch serialization and pool recovery
also build independently of the renderer, while the complete recovered
`Fountain.cpp` is held as a warning-free compile gate. Vehicle static state now
round-trips through the real save backend, and all four recovered Vehicle
translation units form a strict warning-free compile gate. The first bounded
Win32 `rr2nw.exe` now starts without the legacy installer, validates an explicit
read-only retail data directory and records a deterministic pre-content marker;
the recovered gameplay runtime and level-ready gate are still open.
The first link-dependency tranche now builds the real config parser and Player,
executes `ICarrier`/`IArtefact` carry behavior, and compile-gates the complete
Artefact source. A diagnostic link probe reduced Vehicle's unresolved surface
from 77 to 53 symbols. The second tranche executes the real MPROJ tree/heap,
Level attributes and bounded DebugMap mission/input boundary, while the full
DebugMap is a warning-free compile gate. Its dependency tranche reduced the
probe to 39 symbols. The following tranche compiles the complete Arena physics
unit, executes the original angle/sphere/dynamic collision algorithms and
moves god-mode storage behind a shared owner. The probe now exposes 34 symbols,
then falls to 26 after connecting view projection, haze/terrain waterline,
ZAV scene/viewport and the 40 script-viewpoint slots. Complete recovered
`MOVINGOB.CPP` and `VESSEL.CPP` compile gates plus a bounded scene/Vessel
runtime boundary then reduce it to 22. Scene and Vessel draw dispatch now link
and execute without opening graphics; the remainder is concentrated in
panel/graph, Hardware/briefing/timing, Taxi and RSX services.

The reviewed aggregate baseline is in
[reference/reports/m0-baseline.json](reference/reports/m0-baseline.json); full
retail/install manifests remain local and ignored.

## Modern build foundation

The first M1 slice uses Visual Studio 2022/MSVC and deliberately targets Win32:

```powershell
cmake --preset windows-msvc-x86
cmake --build --preset windows-msvc-x86-debug --parallel
ctest --preset windows-msvc-x86-debug
```

This currently builds the recovered math, tagged-filesystem and assertion
aggregates, all 14 translation units in the legacy script compiler/runtime
libraries, all eight objects from `kernelw.lib` and the complete Arena storage
archive, plus the first two objects from `obasew.lib`'s Route module and the
complete Fountain object with its renderer-independent state boundary. It also
compile-gates all four Vehicle objects and links their renderer-independent
state boundary. CTest covers ABI/PRNG/vector/matrix behavior, tagged-file
nested round-trip, legacy config parsing and clean truncation rejection,
compilation/execution of a minimal script in the
original bytecode VM, Arena event payload/label-registry state, and read-only
save-file round-trip with clean truncated-payload rejection. It also executes
`SimulationContext` object/event lifecycle and Route geometry/static-state
serialization, Fountain branch serialization and reconstruction of its
2,000-entry free list, Vehicle static-state save compatibility, and the shared
carrier lifecycle/save boundary. It additionally executes MPROJ tree/data/
project state, all Level attribute defaults/bindings and DebugMap's bounded
mission pool plus Hardware subscription protocol. It is not yet the game
executable or a completed M1 milestone. The suite also locks the Win32
`SBumpDef` ABI (120-byte Release and 128-byte Debug layouts) and executes
legacy angle interpolation, sphere timing, cubic coefficients, dynamic
collision response and god-mode state. The view-state contract covers legacy
projection scales and clip rays, haze/waterline defaults, ZAV pointer ownership
and all 40 script-viewpoint slots without creating a window or renderer. The
scene contract also executes moving-object visibility dispatch, Vessel shield/
weapon bonus arithmetic and the original encoded message bytes while keeping
the disabled legacy sprite/laser raster bodies explicitly outside this gate.
The normal build also produces `rr2nw.exe`; its automated launch contract uses
a synthetic nine-level fixture and verifies that startup does not alter data.

An original retail Level can be selected without changing its `game.cfg`:

```powershell
& ".\build\windows-msvc-x86\Release\rr2nw.exe" --data-dir "X:\path\to\retail\nw" --start-level "Level.03N"
```

The executable reads retail content in place and writes diagnostics to the user
log directory (or an explicit `--diagnostics-dir`). It does not modify the
selected retail root. See [ManualAcceptance.md](docs/ManualAcceptance.md) for
the automated and interactive evidence contracts.

## Verified baseline findings

- Published runtime snapshot: 1,403 files.
- Official May retail data directory: 6,768 files.
- Common paths: 1,287; exact: 937; changed: 350.
- 181 of 237 common `.SCI` files and 47 of 57 `.SC` files differ.
- Retail adds the absent `Level.07N` runtime directory.
- The verified retail `nw.exe` executes code from a data-only PE section; on a
  DEP OptOut system this strongly correlates with the repeated modern-Windows
  `0xc0000005` crashes. Release builds must fix the layout and must not require
  disabling DEP.

Details and acceptance rules are in [RetailParity.md](docs/RetailParity.md),
[ReferenceBuild.md](docs/ReferenceBuild.md) and
[BehaviorDecisions.md](docs/BehaviorDecisions.md).

## Historical build note

The original tree expects:

- Turbo Assembler;
- Watcom C/C++, most likely 10.6;
- `angel.exe`/`angelmasm.exe`;
- a `C:\nw` source path in several BAT/make files;
- `disgnwr.make` to build `designwr.lib` because its original makefile was
  missing from the recovered archive.

This toolchain remains an optional reference lane. The active product target
is described in [Architecture.md](docs/Architecture.md).

## Data and distribution

The conservative 1.0 package will ship the modern engine, tools, validator and
example mod. A data importer will read an original CD or existing installation
without modifying it. Retail media, retail EXE, DirectX/RSX installers, user
saves and crash dumps are not committed by default.

See [DataProvenance.md](docs/DataProvenance.md) and
[ReleaseProcess.md](docs/ReleaseProcess.md).

About

Russian Roulette II: The Next Worlds

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages