This document covers technical details for advanced users and developers: compatibility status, file layout, configuration cvars, asset validation, build dependencies, versioning, and the SDK/game library structure.
For installation and a feature overview, see the README. For building from source, see BUILDING.md.
- Prey Compatibility Status
- Game Directory Structure
- Asset Validation
- Advanced Configuration
- SDK and Game Library
- Dependencies
- Versioning
This status reflects compatibility with official Prey (2006) assets, not binary interchangeability with proprietary retail DLLs.
- ✅ Project Rebrand Completed — Meson project metadata, staged binaries, VS Code launch settings, and documentation use OpenPrey naming throughout
- ✅ Prey Install Discovery —
fs_basepathauto-detection targets Prey registry/App Paths/uninstall metadata and known legacy install roots; Steam/GOG assumptions removed - ✅ Unified Game Module Loader — Engine builds and stages a unified
game_<arch>module underbasepr/for both SP and MP paths - ✅ Companion Repo Tooling — Sync/build tooling targets
OpenPrey-GameLibsand supports both Meson-wrapper and legacy VC-solution layouts - ✅ Official PK4 Layout Validation — Engine startup rejects missing or modified required base-pack layouts when
fs_validateOfficialPaks 1is enabled - ✅ Cross-host Meson Support — Source selection, dependency wiring, and nightly packaging cover Windows, Linux, and macOS hosts
- ❌ Stock-asset SP/MP Smoke Validation — Default staged launch flow is still being verified across single-player and multiplayer startup cases
- ❌ Prey Gameplay Bring-up — Active
src/Preygame-library integration and runtime verification continue during the migration - ❌ Particle and FX Compatibility — Doom 3 / Prey-era particle behavior and dependent runtime paths still need restoration and parity checks
- ❌ Cross-host Runtime Validation — Windows remains the deepest runtime-validation path while Linux/macOS map validation is extended
- Full Campaign Completion — The project does not yet claim end-to-end single-player completion against stock assets
- Multiplayer Parity — Multiplayer compatibility remains under active validation
Current follow-up work is tracked in TODO.md and docs-dev/release-completion.md.
.install/
├── OpenPrey-client_x64 # Main executable (.exe on Windows)
├── OpenPrey-ded_x64 # Dedicated server (.exe on Windows)
├── OpenAL32.dll # (Windows) optional bundled runtime
└── basepr/
├── game_x64 # Unified game module (.dll / .so / .dylib)
├── glprogs/
├── guis/
├── maps/
├── materials/
├── script/
└── strings/
- Single-player: loads
game_<arch>frombasepr/ - Multiplayer: loads the same unified
game_<arch>module - Legacy compatibility:
gamex86/gamex64aliases are still accepted during migration
OpenPrey automatically validates your Prey installation at startup to confirm the required official base packs are present and unmodified.
How it works:
- Engine scans the detected
base/pack set - Chooses the required layout to validate against:
- Classic retail naming (
pak000.pk4...pak004.pk4) - Consolidated retail naming (
pak_data.pk4,pak_sound.pk4,pak_en_v.pk4,pak_en_t.pk4)
- Classic retail naming (
- Refuses to continue if required packs are missing or do not match the expected checksums
Configuration:
fs_validateOfficialPaks 1(default) — enable asset validation- See docs-dev/official-pk4-checksums.md for the full checksum reference
r_screen -1— auto-detect current display (default)r_screen 0..N— select a specific monitorlistDisplays— list available monitor indices in the consolelistDisplayModes [displayIndex]— list available exclusive fullscreen modes for a display
r_fullscreen 0|1— windowed vs fullscreenr_fullscreenDesktop 1— desktop-native fullscreen (default, recommended)r_fullscreenDesktop 0— exclusive fullscreen (usesr_mode/r_custom*)r_mode -2— request native desktop resolution for fullscreen mode selectionr_borderless 1— borderless window whenr_fullscreen 0
r_windowWidth/r_windowHeight— window size when running windowedwin_xpos/win_ypos— window position (updated automatically when you move the window)- Agent and CI validation runs should always force
+set r_fullscreen 0
See docs-user/display-settings.md for the full display reference.
fs_basepath— detected Prey install root (auto-discovered)fs_homepath— writable user pathfs_savepath— save/config/log path (defaults tofs_homepath)fs_game— active game directory (basepr)fs_cdpath— locked runtime overlay path; use.install/as launch dir for testing
- Valid
fs_basepathoverride if set via cvar or command line - Current working directory
- Windows registry install entries (vendor keys, App Paths, uninstall metadata)
- Known legacy CD-era install roots (
Human Head Studios/Prey,2K Games/Prey,Games/Prey)
If your Prey installation is not auto-detected, launch with:
OpenPrey-client_x64 +set fs_basepath "C:\path\to\Prey"
Recommended local validation loop:
- Launch from
.install/in windowed mode:.\OpenPrey-client_x64.exe +set fs_game basepr +set fs_savepath ..\.home +set logFile 2 +set logFileName logs/openprey.log +set r_fullscreen 0
- Inspect
.home\logs\openprey.logafter each run - Fix warnings and errors in engine/game/parser/loader code before resorting to content-side workarounds
Build automation helpers:
tools/build/meson_setup.ps1auto-detects and initialises the Visual Studio developer environmentcompile -C builddirauto-runssetup --wipeif the build directory is missing or invalidtools/build/openprey_devcmd.cmdis available as a reusable MSVC developer shell
OpenPrey's game code is derived from the Prey Software Development Kit and maintained in the companion OpenPrey-GameLibs repository. Canonical edits for SDK/game-library work belong there first; src/game in this repository is a synchronized mirror used by the Meson build, with additional src/Prey and src/preyengine sync paths brought in as needed for compatibility work.
The SDK is subject to the original Human Head Studios EULA, which permits non-commercial modification for use with a legitimate copy of Prey, but prohibits commercial exploitation and standalone redistribution of the SDK-derived code. For complete terms, see EULA.Development Kit.rtf in the OpenPrey-GameLibs repository.
- Default companion repo location:
../OpenPrey-GameLibs tools/build/meson_setup.ps1syncs the companion repo beforesetup,compile, andinstallOPENPREY_BUILD_GAMELIBS=1triggers an additional companion build-and-stage pass duringcompiletools/build/build_gamelibs.ps1supports both Meson wrappers and the legacysrc/PREY.slnlayout- Stage targets:
builddir/basepr/and.install/basepr/
| Library | Version | Purpose |
|---|---|---|
| SDL3 | 3.4.0 | Cross-platform window, input, and display management |
| GLEW | 2.3.4 | OpenGL extension loading |
| OpenAL Soft | bundled Windows package | 3D audio rendering |
| stb_vorbis | 1.22 | Ogg Vorbis audio decoding |
All dependencies are resolved through Meson subprojects and wraps. No manual dependency installation is required on Windows; Linux requires system development packages (see BUILDING.md).
OpenPrey uses semantic base versions from meson.build and appends an explicit build track:
stable— release builds, e.g.X.Y.Zdev— default local builds, e.g.X.Y.Z-dev+gabcdef12nightly/beta/rc— pre-release labels, e.g.X.Y.Z-nightly.20260330.1+gabcdef12
The base version is bumped manually in meson.build when advancing to the next release line; track labels, iterations, git metadata, and resource build numbers are generated automatically by the build system (tools/build/meson_setup.ps1 / tools/build/meson_setup.sh).