This document defines the long-term platform direction for OpenQ4 and how SDL3 + Meson are used to get there.
- First-class support on modern desktop operating systems:
- Windows
- Linux
- macOS
- First-class support for modern 64-bit desktop architecture:
- x64 (
x86_64)
- x64 (
- Keep original Quake 4 gameplay/module behavior compatible while modernizing platform and build layers.
- Primary actively validated build target: Windows x64.
- Build system: Meson + Ninja.
- Dependency model: Meson subprojects/wraps.
- Platform backend direction: SDL3-first (legacy Win32 backend is transitional only).
- Language baseline target: C++23 semantics (
vc++lateston current MSVC Meson front-end). - Toolchain baseline direction: MSVC 19.46+ (Visual Studio 2026 generation), with compatibility fallback permitted during migration.
- As of March 30, 2026, Linux defaults to the SDL3 backend and keeps
-Dplatform_backend=nativeas a fallback path. - Steam Deck support is delivered through the explicit
OpenQ4-steamdecklauncher/profile, not hardware auto-detection. - When both
WAYLAND_DISPLAYandDISPLAYare available, the Steam Deck launcher prefers XWayland by exportingSDL_VIDEODRIVER=x11unless the user already set an SDL video driver.
- SDL3 is the default backend path and the portability layer for:
- window lifecycle
- input event handling
- context/window interop glue
- New platform-facing work should prefer SDL3 abstractions first.
- Platform-specific code should be isolated under
src/sys/<platform>/when SDL3 cannot cover a requirement directly.
- Meson is the canonical build system going forward.
- External dependencies should be consumed via Meson dependency resolution and subprojects/wraps.
- New build logic should be host-aware and architecture-aware, with x64 as the active compatibility baseline.
- Meson configuration defaults to
cpp_std=vc++latest(C++23-targeting mode on MSVC). - Meson currently adds
/Zc:strictStrings-on MSVC to preserve compatibility with legacy string-literal usage while the codebase is modernized. tools/build/meson_setup.ps1prefers VS 2026+ (major 18) when present; strict minimum enforcement can be enabled with-Denforce_msvc_2026=true.
- Keep Windows x64 stable with SDL3 default backend.
- Keep Linux on the SDL3 backend by default and retain
nativeas the rollback path while validation broadens. - Incrementally wire macOS build/source selection and validation into Meson.
- Promote Linux and macOS to first-class once they pass consistent compile/link/runtime validation loops.
- Linux now uses a real SDL3 runtime path when
-Dplatform_backend=sdl3is selected, and that is the default Linux configuration as of March 30, 2026. - macOS still maps
platform_backend=sdl3to native platform sources until its SDL3 runtime path is implemented. - This keeps one backend vocabulary across platforms while allowing Linux to validate the shared SDL3 stack directly.
- Clean configure + build in Meson.
- Engine initializes and reaches map/session startup with stock Quake 4 assets.
- Core input, rendering, audio, and networking paths work without platform-specific content hacks.
- Regressions are tracked in docs and fixed in engine/platform code, not with asset overrides.