Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MiniQuake3

License: GPL-2.0-or-later Language: MiniLang Platform: Windows x64 Status: playable preview

MiniQuake3 is an unofficial Windows x64 port of the Quake III Arena engine to MiniLang. Its goal is to preserve the original game's behavior, data formats and virtual-machine interfaces while moving engine ownership into MiniLang.

The sole maintained branch is main.

The current playable path runs the original ui, cgame and qagame QVMs against the MiniLang engine. Small native bridges provide Windows services, rendering, audio and accelerated bytecode dispatch. It is a working preview, not a finished replacement for every Quake III configuration or mod.

Important

MiniQuake3 does not include Quake III Arena game data. Supply your own legally obtained installation containing baseq3/pak0.pk3. Do not commit or redistribute the original PK3 archives with this repository.

Screenshots

q3dm0 — the live game path, with the original world, weapon and HUD

MiniQuake3 rendering q3dm0 with the original weapon and HUD

Original main menu q3dm1 arena
The original Quake III main menu running in MiniQuake3 MiniQuake3 rendering q3dm1

These are real 1280×720 engine frames, captured directly from the renderer and stored as lossless PNGs. They are not desktop crops, upscaled previews or generated artwork. Click an image to open it at full size. Capture commands, source and binary hashes, renderer details and test limits are recorded in the capture manifest.

Highlights

  • Original game presentation: the Quake III main menu, in-game HUD, view weapons and models, driven by the original QVM modules.
  • MiniLang engine systems: PK3/DEFLATE loading, BSP geometry and collision, visibility, shader processing, client/server state and VM syscall handling.
  • Local arena play: player movement, weapons, pickups, movers and bot integration exercised with original retail maps and game modules.
  • Two rendering paths: a native OpenGL consumer for MiniLang-owned render batches and a software-rendering fallback.
  • Desktop integration: keyboard and mouse input, configurable bindings transferred from the menu into a match, and continued operation when no audio output device is available. Bindings and archived settings persist across launches.
  • Evidence-oriented development: original-source comparisons, compiled contracts, retail probes and reproducible screenshot captures.

Project status

Playable preview; active development. The project contains extensive engine and subsystem implementations, but source coverage is not the same as complete behavioral parity.

Area What has been demonstrated
Windows build Native EXE, Windows bridge DLLs and the three original QVM modules build with the published MiniLang 1.3.9 compiler.
Normal startup Starting MiniQuake3.exe without arguments opens the original main menu using data beside the executable. Selecting an arena shows its Retail levelshot, connection status and match rules while the map loads.
Retail game logic Bot/player and scoreboard contracts have passed on q3dm0 and q3dm1. All 30 Retail arena BSPs complete a 30-frame Windows/QVM smoke test; all 32 named Retail bots pass a 120-frame command probe on q3dm1. Scope and limits
Graphical execution The 6,000-frame Retail q3dm0 combat replay on the RTX 5080 reached 83.6 FPS. The longest frame fell from 107 to 54 ms. Frame-time and CPU profile
Extended bot combat In three alternating 3,200-frame Retail q3dm1 pairs, caching larger impact-mark batches raised the median from 66.96 to 84.59 FPS and cut P99 from 68 to 43 ms. A further bounded per-face cache yielded 92.71→96.31 FPS and P99 41→33 ms against that version; gameplay counters matched. Cause and limits
Specular pass audit Static lightingSpecular passes now update in one native batch call. In two 3,200-frame Retail bot-combat pairs on the RTX 5080, the mean render phase fell from 3.95/3.93 to 3.24/2.99 ms and P99 from 46/44 to 42/41 ms. Total FPS varied, including one lower candidate run; other CPU spikes remain. Measurements and remaining work
Sky pole and current frame times Retail sky cloud UVs now use Quake III's cloud-sphere formula and parsed sky height; a q3dm1 zenith capture no longer shows the square tile. Direct polygon expansion improved an isolated 250,000-triangle test from 78 to 16 ms. Raising the concurrent GC threshold to 128 MiB cut q3dm0 slow frames in a 3,200-frame bot replay, but P99 remained 33 ms on q3dm1 and varied from 37 to 43 ms on q3dm0 across system loads. Checks and limits
Combat memory and recurrent stutter A 6,000-frame Retail bot replay held its committed heap at 368 MiB after asset loading; GC cycles and changing Cgame, geometry and draw costs coincide with slow frames. Retained entity/light queues remove repeated array copies but have no proven full-game FPS benefit. A 256 MiB GC experiment consumed 128 MiB more memory without reliable overall gain; the 128 MiB setting remains. Profile and limits
Collision query performance A Retail q3dm15 QVM profile observed trap_LinkEntity host time fall from 2,099 to 110 microseconds per call after BSP query storage changes. The run's average frame work fell from 27.85 to 18.87 ms; real-time simulation trajectories can differ. Measurements
Missing audio device Initialization errors are caught; the menu and game continue without sound.
Audit core corrections Strict original-source gates, wall-clock menu timing, honest frame percentiles, routing-cache bookkeeping and shared snapshot decoding have passed targeted Windows regressions and a full build.
Loading, Q3DM4 fog and local motion Match loading reuses the configured fullscreen menu window where compatible; BSP fog boundaries are excluded from render geometry; local matches present bot snapshots with an interpolation interval. Alternating 2560×1440 Q3DM4 bot replays passed, with substantial host-load variation. Checks and limits
Local server worker Local bot AI and server ticks run on a bounded worker while the prepared 3D frame is drawn. In two 600-frame Q3DM4 three-bot pairs, work P95 fell from 19/20 to 17/17 ms; FPS varied. Moving, paused-menu and fog Retail replays passed. Checks and limits
Worker follow-up audit Q3DM4 profiles isolate world drawing, scene drawing and worker wait. Empty retained material passes no longer update shaders or raster state, and shader update failures reach the caller. Alternating three-bot replays show no reliable overall FPS gain from this small change. Measurements and limits
Detailed smoothness audit A 75 ms local presentation buffer removed measured Cgame clock stalls in the Q3DM4 motion replay, at about 25 ms extra bot presentation latency. Long combat still has draw, geometry and GC-associated slow frames; VSync changes frame pacing. Graphics restart now restores retained GL textures. Measurements, fixes and limits
Empty scene-pass audit Q3DM4 entity views now skip empty fog and projected-light batches and share one view vector across shader passes. Retail and hardware replays pass; the measured phase savings did not produce a reliable total-FPS gain. Comparison and limits
Q3DM4 worker profile and bot routes Late slow frames often wait for the bot worker, particularly item-goal selection. Reusing the map's precomputed within-area travel times reduced the measured item-selection trap median from about 4.1 to 3.1 ms and preserved Retail AAS travel times. Two paired 3,200-frame replays did not establish an overall FPS or P99 gain. Profile and comparison · Full frame-time table
Frame-paced GC evaluation MiniLang 1.3.15's gc_frame_step lowered Q3DM4 work P99 at small grants but made the heap grow to 1–2 GiB. Follow-up 15–20 ms grants stabilized memory with no reliable frame-time gain. The shipped 1.3.9 compiler and unrestricted concurrent GC remain pinned. Measurements and reproduction
Four-path Q3DM4 profile Per-view geometry, worker-thread QVM traps, Cgame traps and optional GPU timer queries now have replay diagnostics. In a 3,200-frame three-bot run, GPU interval P95 was 1.87 ms while many CPU spikes coincided with GC pauses. A larger MD3 cache reduced misses but did not improve end-to-end FPS. Measurements and limits
Protocol 68 remote client A separate original dedicated server has accepted the headless MiniLang peer over UDP, including gamestate, snapshots, input acknowledgement and reliable chat. See network scope and restart acceptance for the current tests and limits.
Compiler contracts A complete inventory of 12,618 internal function signatures and an instrumented Retail call profile guide a measured, incremental typing and inlining pass. The current typed hotpaths have isolated A/B and differential evidence; most functions remain dynamic. First evaluation · Second evaluation · Third evaluation · Renderer predicates · Binary32 hotpaths
Desktop lifecycle and persistence The Windows host routes local map, restart, menu and Retail tier-cinematic commands, consumes the post-film nextmap command, and saves bindings, archived settings and single-player scores to baseq3/q3config.cfg.
Broader compatibility Longer interactive sessions, multiplayer interoperability, hardware-specific behavior and complete 1:1 parity still need acceptance testing.

The historical hosted Windows screenshot runs used software rendering and do not establish hardware-accelerated performance or audible playback. Capture I/O is also enabled: screenshot-run timings are not gameplay benchmarks. Earlier screenshots are evidence for their recorded revision, not a new graphical acceptance of the audit changes.

The audit corrections and validation scope, retail startup report, parity audit, behavior audit and port plan track the wider project. Historical measurements refer to their recorded compiler, source revision, machine and workload; they must not be treated as results for every current build. The stricter source mapping inventory is not a completion percentage: ABI mappings, native implementation, productive integration and behavioral acceptance are distinct claims.

Quick start

There is no versioned MiniQuake3 release yet. Use the source build below, or a verified test-build archive. A build contains the engine and QVM modules, not the proprietary game archives.

Place your original pak0.pk3 and any installed update archives alongside the executable in baseq3:

build/
├── MiniQuake3.exe
├── *.dll
├── baseq3/
│   ├── pak0.pk3
│   └── pak1.pk3 ... pak8.pk3   # only the updates you actually have
└── qvms/
    ├── ui.qvm
    ├── cgame.qvm
    └── qagame.qvm

For example, from the repository root in PowerShell:

$Quake3Root = "C:\Games\Quake III Arena"  # your existing installation
New-Item -ItemType Directory -Force .\build\baseq3 | Out-Null
Copy-Item "$Quake3Root\baseq3\pak*.pk3" .\build\baseq3\
& .\build\MiniQuake3.exe

On startup, MiniQuake3 checks for pak0.pk3 directly next to the EXE, then in its baseq3 subdirectory, then on inserted Quake III Arena CDs. It reads the PK3s from the first usable location and applies the normal package priority. If none of the locations contains usable game data, a Windows error dialog tells you where to place the files. Use the QVMs produced by the build.

MiniQuake3 saves q3config.cfg in baseq3 next to the EXE and creates that folder on the first save if needed, including when PK3s are loaded from CD.

Building

Builds, tests and release packaging run locally using the commands below. This repository does not use GitHub Actions.

Fresh checkout: published compiler

Requirements: Windows x64, Git, Python 3.10 or newer, and Visual Studio / Build Tools with the Desktop development with C++ workload and the Windows SDK. Both x64 native bridges and the original x86 QVM build tools are used. A working OpenGL driver is recommended for playing.

git clone --recursive https://github.com/MiniLangProject/MiniQuake3.git
cd MiniQuake3
python scripts/build_release.py

For an existing checkout, initialize the original-source submodule first:

git submodule update --init --recursive

build_release.py downloads the pinned MiniLang 1.3.9 Windows package, checks both the package and compiler SHA-256, rebuilds the native bridges, and builds the engine and original QVMs. The compiler and standard library are isolated under build/toolchains/; the historical artifacts/toolchain/ and docs/reference/toolchain.json are not overwritten. Build input hashes and logs are retained under build/.

The first build needs internet access for the compiler package. Game data is not needed to compile and is never downloaded by this build script. The name build_release.py describes the published-compiler build path, not a claim that MiniQuake3 itself is a finished release.

Historical frozen toolchain

Existing development setups with the exact frozen compiler and standard library can continue to use:

python scripts/build.py

That path verifies artifacts/toolchain/ against the historical toolchain profile. Those local artifacts are deliberately not tracked in Git. A fresh checkout should use the isolated published-compiler path above rather than regenerating the historical manifest with unrelated compiler inputs.

Default controls

Action Default input
Move W, A, S, D
Look Mouse
Attack Left mouse button
Zoom Right mouse button
Jump Space
Crouch Ctrl or C
Select weapon 1 through 9
Previous / next weapon [ / ]
Scoreboard Hold Tab
Chat / team chat T / Y
Menu Esc
Toggle fullscreen Alt+Enter

Controls provides rebinding and mouse settings, including the default inverted vertical axis. Setup → System → Graphics applies Video Mode, Fullscreen, GL Driver, GL Extensions, Color Depth, Lighting, Geometric Detail, Texture Detail, Texture Quality and Texture Filter on Apply. vid_restart recreates the OpenGL window so driver and pixel-format changes take effect while decoded textures stay cached. The runtime uses a borderless fullscreen window if the graphics driver cannot switch to the selected display mode. Live mode changes scale the QVM's existing logical viewport to the new surface. The legacy 3dfxvgl driver is loaded when installed; otherwise the game returns to system OpenGL and resets r_glDriver to opengl32. A requested 16-bit color/depth format may be unavailable on modern GPUs; the selected format is reported back in the corresponding Cvars. Disabling GL Extensions disables optional renderer features including anisotropic filtering and VBO use, while core OpenGL remains available. Lighting switches regular world surfaces and common lightmap shader pairs to BSP vertex colors; custom shader effects retain their authored stages. Geometric Detail rebuilds curved patch geometry from r_subdivisions. Texture Quality requests 16-bit RGBA4 or 32-bit RGBA8 GPU textures. Controls, archived settings and single-player placement use the local baseq3/q3config.cfg beside the executable. Enter /fps in the active game's console to toggle the original Cgame FPS counter in the upper-right corner. The command name is fps; the leading / is needed there because unprefixed console text is sent as chat. The setting persists as cg_drawFPS. Server chat also appears over gameplay for eight seconds, independently of the shorter general console notifications. For display-synchronized presentation, enter /r_swapInterval 1; vid_restart. Use /r_swapInterval 0; vid_restart to restore uncapped presentation. Hardware OpenGL uses 4× anisotropic texture filtering by default when the driver supports it, improving surfaces viewed at an angle. Enter /r_anisotropy 1; vid_restart to disable it or select up to 16 to increase it; the renderer clamps the request to the driver's limit. After an ordinary single-player arena win, wait for the podium and awards sequence, then click Next at the bottom right to start the next arena. On the postgame screen, two Down-arrow presses followed by Enter select the same action. Tier-completion cinematics instead open level selection.

Multiplayer, demos and mods

  • Join through Multiplayer or enter connect 192.0.2.10:27960 in the in-game console, substituting your server address. The Windows client supports IPv4 protocol-68 servers. Pure Baseq3 joins require matching local PK3s with 1.32-compatible client QVMs. Early CD-only QVMs use an older ABI. The client does not download missing packages.
  • Use Demos to play a .dm_68 recording in baseq3/demos (or the active mod's demos directory). The console command is demo <name>.
  • Put each mod in its own directory beside baseq3 and select it in Mods. From the console, use set fs_game <directory>; fs_restart. Mods can supply assets and Quake III 1.32 QVMs, and use their own q3config.cfg. Native DLL mods, Pure mod servers, demo recording and Timedemo on the Windows path remain open.

Tests and verification

Published-compiler smoke tests

After building and supplying build/baseq3/pak0.pk3:

python scripts/test_default_launcher.py
python scripts/test_default_exe_startup.py
python scripts/test_desktop_video_retail.py
python scripts/test_desktop_session_retail.py --data-root build --published
python scripts/test_desktop_cinematic_retail.py --data-root build
$env:MQ3_BUILD_TOOLCHAIN = "release"
python scripts/test_singleplayer_bot_retail.py --data-root build
python scripts/test_all_retail_levels.py --data-root build
python scripts/test_all_retail_bots.py --data-root build
Remove-Item Env:MQ3_BUILD_TOOLCHAIN
python scripts/build_release.py --source tests/singleplayer_bot_retail_probe.ml --output singleplayer_bot_retail_probe.exe
& .\build\singleplayer_bot_retail_probe.exe .\build\baseq3\pak0.pk3 .\build\qvms q3dm0
& .\build\singleplayer_bot_retail_probe.exe .\build\baseq3\pak0.pk3 .\build\qvms q3dm1

These are focused startup and retail-logic checks, not the full acceptance suite. The no-argument startup test intentionally closes the menu after observing it; it is not a manual playthrough or a normal menu-exit test. The single-player bot script also checks that Crash attacks without the player firing and that the original scoreboard still lists both clients. The arena test checks all 30 Retail maps over 30 frames each; the bot test spawns all 32 Retail profiles and checks active commands over 120 frames each.

Audit core regressions

python scripts/test_audit_inventory.py -v
python scripts/test_parity_inventory.py
python scripts/build_release.py --source tests/audit_timing_lru_contracts.ml --output audit_timing_lru_contracts.exe
& .\build\audit_timing_lru_contracts.exe
$env:MQ3_BUILD_TOOLCHAIN = "release"
python scripts/test_aas_routing_cache.py
Remove-Item Env:MQ3_BUILD_TOOLCHAIN

The original-source gate requires the pinned, clean submodule; missing reference files cannot produce a passing result. The routing comparison uses its documented scenario model. These checks do not measure GPU performance.

Regenerate the README screenshots

The capture script uses the existing MQ3_CAPTURE framebuffer export, so a small desktop cannot clip the image or hide part of the HUD:

python -m pip install Pillow
python scripts/build_release.py --source tests/singleplayer_graphics_replay.ml --output singleplayer_graphics_replay.exe
python scripts/capture_readme.py

This captures the main menu and two arena views, checks that each replay finishes, and writes PNGs plus provenance to docs/screenshots/. Raw capture files and logs stay under build/readme-captures/. Only rendered screenshots and metadata belong in Git, never the underlying retail assets.

Full development suite

With the exact historical frozen toolchain already installed:

python scripts/verify.py --data-root build
# Additional collision, patch and movement differential gates:
python scripts/verify.py --data-root build --extended

Many legacy gates invoke scripts/build.py themselves. A successful published-compiler screenshot run does not mean this entire frozen-toolchain suite was run, nor does it prove binary identity with an older build.

Repository layout

Path Purpose
src/ MiniLang engine, client/server, gameplay, VM, renderer and platform logic
native/ Source-owned Windows, rendering, audio, networking and VM bridges
tests/ Compiled contracts, original-source comparisons and retail probes
scripts/ Build, verification and capture tools
docs/ Subsystem documentation, parity audits, evidence and screenshots
Quake-III-Arena-original-source/ Pinned id Software source submodule and original QVM tools
PORT_LEDGER.json Detailed original-to-port source and symbol mapping
build/, artifacts/ Ignored local outputs and toolchains; not source distributions

Documentation

Updating the API reference

MiniDoc runs in strict mode through minidoc.toml: missing API summaries, parameter/return contracts, license headers, and summary-quality warnings fail the command. Use MiniDoc 0.4.9 or newer for indexed relation-graph rendering on this large source tree. Keep MiniDoc and MiniLangCompilerML as sibling checkouts and run:

$SourceRevision = git rev-parse HEAD
..\MiniDoc\build\minidoc.exe --config .\minidoc.toml --revision $SourceRevision
python docs/verification/verify_minidoc.py --revision $SourceRevision

On Linux, use ../MiniDoc/build/minidoc --config minidoc.toml --revision "$(git rev-parse HEAD)" and run the same Python verifier. Add --check to MiniDoc to validate without rewriting the generated HTML and Markdown. The Python verifier checks both output manifests, local links, anchors, search-result targets, and complete HTML/SVG/JSON files. Commit source documentation changes and their regenerated reference pages.

The current coverage and consolidation report records the combined source and its generated reference. It separates comment coverage from semantic review: a comment on every declaration does not prove that every description is correct. Source contracts and generated pages must continue to be reviewed against their implementations.

Some historical engineering documents are still in German. This README is the English entry point; the detailed reports retain their original evidence and revision-specific limitations.

Related projects

MiniQuake brings the original Quake engine to MiniLang; MiniQuake2 targets Quake II. All three belong to the MiniLang project, alongside the self-hosted compiler.

Legal and licensing

MiniQuake3 is independent and is not affiliated with or endorsed by id Software, Bethesda Softworks or ZeniMax Media. Quake III Arena names and game assets remain the property of their respective owners.

Quake III-derived port code is distributed under GPL-2.0-or-later. See LICENSE, NOTICE.md, each file's license notices and the original-source submodule for retained upstream and third-party terms. The external MiniLang compiler and standard library retain their own licenses. Original game data is not included or relicensed by this project.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages