Hexenwail
Hexenwail is a PC port of HeXen II with a modernized GL 4.3 renderer and gamepad support.
- Type: PC port
- Game: HeXen II
- Runs on Windows and Linux
- By hexenwail
- Latest release 0.8.0-beta.r35, 2026-11-22
- Source: https://github.com/hexenwail/hexenwail
- Website: https://hexenwail.github.io
README
Hexen II: Hexenwail
New worlds await! (Wheel of Karma, by Inky)
Latest Release | Report a Bug
Just as Ironwail took sezero's QuakeSpasm and modernized its renderer, Hexenwail does the same for Hexen II.
Raven Software released the Hexen II source code in 2000. Hammer of Thyrion (2004–2018) by O. Sezer became the definitive cross-platform engine. uHexen2 continued the work with graphical enhancements and mod support — notably Shanjaq and Inky's contributions. Hexenwail (2025) began when Storm over Thyrion shipped without a buildable Linux client, and grew into a full GL 4.3 modernization.
Hexenwail does not include any original game assets; a valid copy of Hexen II is required and can be purchased from GOG or Steam. You need data1/pak0.pak and data1/pak1.pak. Raven's free three-level 1997 demo also runs: scripts/get_demo.sh (or nix run .#get-demo) downloads and verifies it for a native build, and the web launcher offers it on first run. For Portal of Praevus, add portals/pak3.pak; it is auto-included when you launch with -game modname / -mod modname (use -noportals to opt out), and is toggleable from the Mods menu.
Just want to try it?
Play it in your browser — nothing to install. The page fetches Raven's free November 1997 three-level demo (13 MB, from archive.org) on your first visit and drops you at the start prompt; add your own data1 (the files button, or drop it on the page) for the full game. It keeps working offline after the first load and installs to the home screen on iOS and Android.
The free three-level demo Raven released in November 1997 runs on Hexenwail, and a fetch helper ships beside the executable in every release. Unpack the release, then from that directory:
| Linux | ./get_demo.sh |
| Windows | get_demo.cmd (double-click, or run from cmd) |
| Flatpak | launch it — you'll be offered the download when no game data is found |
| Nix | nix run .#get-demo -- /path/to/hexenwail |
In a source checkout the scripts live in scripts/ instead, and nix build .#demodata is the declarative equivalent — it puts a hash-verified data1 in the Nix store, playable with nix run . -- -basedir ./result/share/hexenwail.
Each downloads hexen2demo_nov1997-linux-i586.tgz (13 MB) from the uHexen2 project, verifies it against a known SHA-256, and installs only its data1 directory. Nothing is overwritten if you already have game data. You can also fetch that tarball by hand and copy its hexen2demo_nov1997/data1 next to the executable — the scripts do nothing more than that. We don't host or relicense that data — see assets/demo/README.md for its provenance and terms.
The demo covers the first three levels; copying data1 from a GOG, Steam or disc installation over it unlocks the full game.
See USAGE.md for external textures, Steam Deck setup, and mod configuration.
Which version should I use?
Lineage: Hexen II by Raven Software, published by id Software (1997) → engine source open-sourced under the GPL (2000) → Anvil of Thyrion Linux port (Dan Olson & Clément Bourdarias) → Hammer of Thyrion / uHexen2 (O. Sezer, 2004–2018; final release 1.5.9 on 2018-06-06) → Shanjaq's additions → Hexenwail (2026)
There are three living branches of the Hexen II engine, depending on what you want to play:
- Vanilla & upstream maintenance — Hammer of Thyrion / uHexen2, sezero's
mainbranch. The reference cross-platform engine: the most faithful to the original release and the best base for general play and ongoing portability work. - Classic community mods (Shanjaq era) — Shanjaq's fork through its final
uhexen2-r6303.zipbuild. This is the engine many mods in the active Hexen II Discord community were built and tested against, so it remains the safest choice for that catalog of content. - Steam Deck & modern systems — Hexenwail (this project). A GL 4.3 / SDL3 modernization with gamepad support, render scaling, display presets, and Flatpak packaging, aimed at current hardware while staying mod-compatible.
Platforms
| Platform | Renderer | Packaging | Status |
|---|---|---|---|
| 64-bit Linux / SDL3 | OpenGL 4.3 | Nix, Flatpak, AppImage, tarball | Supported |
| 64-bit Windows / SDL3 | OpenGL 4.3 | ZIP (cross-compiled from Nix) | Supported |
| Web / WASM (Emscripten) | WebGL2, or the classic 8bpp software rasterizer | PWA, deployed to GitHub Pages | Supported — play it in a browser |
| 64-bit Linux / SDL3, GLES tier | OpenGL ES 3.0 (the WebGL2 path, natively) | Nix (.#gles), built in CI | Build from source |
| Dedicated servers | — | Nix: .#h2ded (Hexen II), .#hwsv (HexenWorld), .#h2ded-win64 | Supported |
On Linux, the AppImage is one file: chmod +x it and put it in your Hexen II folder (beside data1/), or keep the game data in ~/.hexen2/data1/; --get-demo fetches the free demo. It needs the same desktop libraries as the tarball (X11 or Wayland, OpenGL, audio). nix build .#appimage builds it.
On Windows, run hexenwail.exe. You can extract the ZIP into an existing Hexen II directory without replacing vanilla glh2.exe; keep the bundled DLLs and gamecode/ beside hexenwail.exe.
Planned:
| Platform | Renderer | Status |
|---|---|---|
| Flathub listing | OpenGL 4.3 | Not started |
| Android / SDL3 | GLES3 | Not started — builds on the WASM/GLES render path |
Features
Rendering
- Full GLSL 4.30 core pipeline — zero immediate mode, zero fixed-function
- Reversed-Z depth buffer via
ARB_clip_control(gl_reversed_z) for precision at distance - Lightmap atlas, batched world draws, hardware-instanced alias models
- Unified-shader brush entity batched dispatch (
r_brush_inst, default on) — same compiled program as world surfaces so within-shaderinvariant gl_Positioncovers coplanar joins - MSAA, FXAA, anisotropic filtering
- Dynamic lights stop at the wall they stand against (
r_dlight_occlusion, default 2 on desktop and 1 on WebGL2 and the software renderer; 0 is vanilla, which lit both sides of every face): a light behind a face's plane no longer lights it, on every renderer. On the CPU light path (GLES/WebGL2, the software renderer,r_lightclusters 0) a light also no longer lights a face or a model it cannot see past a wall (r_dlightvis_dumpshows what each light sees). On desktop withr_lightclusters 1,r_dlight_occlusion 2adds cube shadow maps for the nearest lights, per pixel on the world and on models (r_shadow_maxlights8,r_shadow_resolution128,r_shadow_filter1 = hardware PCF,r_shadow_updates2 maps redrawn a frame, a still light's map kept;r_shadowinfolists them andr_shadow_debug 1unwraps one on screen);r_shadow_casters 2lets models cast into the maps too (Quake MDL, MD3 and MD5 meshes; a model never shadows the light it carries), and the Display presets set a shadow tier each, 64 texels for the retro looks up to 512 with model shadows for Ultra; Options > Display > Misc > DLight Occlusion switches Off / Walls / Shadows (Shadows withr_lightclusters 1) - Entity contact occlusion (
r_ssao1-3, off by default): vkQuake's XeGTAO port, darkening the world only where a monster, item or door stands on it, since the world's own corners are already in its lightmaps - Render scale (25–100%), retro dithering mode
- Display presets: Faithful / Crunchy / Retro / Clean / Modern / Ultra
- Brightness/contrast via post-process shader
- HDR tonemap with exposure slider
- Scrolling two-layer sky (configurable speed) and skybox support
- Shader-based fog, underwater color tint, underwater warp, underwater caustics (
r_caustics), motion blur - Fence textures, water tint options, glow effects with fog attenuation
- Per-entity alpha (ENTALPHA), translucent brush entities, world lightmap overbright (
gl_overbright), model overbright (gl_overbright_models: 0 vanilla clamp, 1 unclamped, 2 doubled to match the world's range), fullbright skins - Correct index-0 transparency for all model skins (fixes black backgrounds on projectiles, weapons, items)
- MD3 model format support (Quake 3 models with GPU-compressed vertex decoding)
- External texture overrides for BSP textures, model skins, particles and HUD graphics (DDS/KTX/PNG/TGA/PCX), with per-map override directories,
_glow/_lumasidecars, and block-compressed (BC1–BC7) sources that cut HD-pack VRAM by 4–8x - Physics/render decoupling with entity and lightstyle interpolation; pose-driven alias animation lerp (
r_lerpmodels,r_lerp_viewmodel) - FOV slider, FPS limiter, HUD modes (Full/Mini/Off/Clean)
- HUD / menu / crosshair / console scale sliders (auto by framebuffer height)
- Console alpha + brightness sliders
![]() | ![]() |
Overbright world lighting (gl_overbright, default on) under software colormap emulation (r_softemu 3) — lightmaps are built one bit dimmer and doubled back in the shader, so brightly lit surfaces keep their color instead of clipping to white. | The same corridor (captured from the web version in a Google Chrome tab) with emulation off (r_softemu 0) — filtered textures and unquantized lighting, the same overbright range without the 8-bit palette and point sampling. |
Input
- WASD + mouselook defaults
- Scancode-based bindings (works on AZERTY, Dvorak, etc.)
- Mouse-driven menus with hover, click, and scroll wheel
- Key bindings menu with type-to-search (includes weapon impulses)
- Live substring filter in Display/Rendering/Graphics/Game option submenus
- Xbox/PlayStation/Nintendo gamepad with circular deadzone, power-curve easing, rumble, hot-plug
- Always-run, raw mouse input, configurable pitch clamp, smooth-mouse filter (
m_filter)
Mod support
- Protocol support (18/19/20/21), auto-detection and upgrade between 19–21
- Case-insensitive file lookups
- Runs Wheel of Karma and Storm over Thyrion out of the box
- PimpModel entity overrides
- Extended QuakeC builtins (
SOLID_GHOST, entity alpha) - 8192 max entities, 2048 sound channels
- Mods menu (up to 128 entries, scrollable with PgUp/PgDn/Home/End/mousewheel), per-mod config, portals data toggle
- Per-liquid alpha (
r_wateralpha,r_lavaalpha,r_slimealpha,r_telealpha) +r_turbalphacatch-all for custom-named mod liquids - TrueLightning (
cl_truelightning) - Ships its own rebuilt
progs.dat/progs2.dat/portals/progs.datbeside the executable and prefers it to your Hexen II install's copy — nothing is copied or overwritten on either platform, and a mod's ownprogs.dat(or anything you place in your user directory:~/.local/share/hexen2, or~/.hexen2if you already have one) always wins over ours. Options → Game → Gamecode from picks the source by place:Bundled,Loose(your install's own gamedir) orPak(the pak copy specifically, offered when a loose file is shadowing it).-vanillaprogsoutranks all three and opts back out to Raven's 1997 gamecode. The console names both the file and whose code it turned out to be at every map load. Seegamecode/README.txt. - Your own missiles are drawn leaving the weapon's muzzle, not your eye: Options → Game → Shots From (
cl_muzzle, default on). Client-side and cosmetic only, so aim and hits stay stock and it works with any gamecode. See USAGE.md - Mods can add their own rows to the Key Setup menu via
bindlist.lst, merged alongside the engine's own key bindings - Loads Quake (id1) BSP29 / BSP2 maps as a proof of concept: the map draws and the player collides with it, under Hexen II gamecode. Quake textures go through Hexen II's palette, Quake entities with no Hexen II spawn function are dropped, and every clip hull but the point one is the player's. A Quake player start sits 24 units higher for Hexen II's player (Quake's origin is the box centre, Hexen II's the feet), so a start under a low ceiling is unstuck to the map origin. Quake gameplay is out of scope (#169)
Mod showcase
![]() | ![]() | ![]() | ![]() |
Audio
- OGG Vorbis, Opus, MP3, FLAC, WAV music (CD track fallback)
- Tracker music via libxmp (MOD/S3M/XM/IT) and UMX containers
- MIDI via FluidSynth (Linux) or native Windows MIDI, with soundfont auto-detection; libTiMidity plays the same soundfont as a fallback wherever FluidSynth isn't found
- Per-mod music subdirs (
<gamedir>/music/<author>/) bgm_remap NN <name>— map a CD track number to a named music file- Underwater audio low-pass (
snd_waterfx) - 2048 sound channels, 44.1 kHz default
Custom music for mappers
Two ways to attach music to a custom map:
-
Named music (recommended) — set worldspawn keys in your BSP:
"MIDI" "arena" "CD" "10" // numeric fallback for engines without MIDI-key supportShip
<gamedir>/music/arena.ogg(or.opus/.mp3/.flac/.wav/.mid/etc.).<gamedir>/music/<subdir>/arena.oggalso works, so authors can keep their tracks in separate folders. -
Numeric track + remap — keep the
track%02d.ogglayout and point a track at any named file withbgm_remap(console or autoexec.cfg):bgm_remap 18 myambient bgm_remap list bgm_remap 18 - // clear
Skybox and fog for mappers
Use the underscore-prefixed worldspawn keys; your progs doesn't have to declare them:
"_sky" "grimmnight_" // loads gfx/env/grimmnight_{rt,bk,lf,ft,up,dn}
"_skyfog" "0.5"
"_fog" "0.037 0.08 0.07 0.18" // density r g b
The unprefixed sky, skyname (Half-Life), qlsky (Quake Lives), skyfog
and fog spellings are also accepted. sky <name> works from the console.
MapSearch — entity search for mappers
mapsearch searches .map sources for entities by
classname, property name and value. It is Inky's
design, used with his permission and under his name; see his site for the
original and a Windows build. Build ours with nix build .#utils. It reads
.map text, so decompile a .bsp first with utils/bsp2map.
Platform
- SDL3 on Linux and Windows
- CMake build, Nix flake (reproducible builds + Windows cross-compilation), Flatpak
- GitHub Actions CI with smoke tests, shellcheck, and Nix caching
- One-command releases
- HiDPI, GL_KHR_debug diagnostics, console log to disk
Building
See docs/COMPILE for full instructions.
Quick start (any Linux):
cd engine && mkdir build && cd build
cmake .. && make -j$(nproc)
Requirements: OpenGL 4.3 (2012+), SDL3, Rust 1.82+ (cargo; part of the engine is Rust, linked into every build), libvorbis, libogg, libopus, opusfile, libxmp, glslang (for the SDL_GPU backend; or configure -DUSE_SDL_GPU=OFF), ALSA (optional), FluidSynth (optional)
Nix:
nix build # NixOS
nix build .#linux-fhs # Portable Linux binary
nix build .#win64 # Windows 64-bit (cross-compiled)
nix build .#gles # Desktop client on the GLES 3 tier (the WebGL2 render path)
nix build .#h2ded # Hexen II dedicated server (.#h2ded-win64 for Windows)
nix build .#hwsv # HexenWorld dedicated server
nix build .#release # All platforms
Web / iPadOS PWA
A GitHub-Pages-deployable WebAssembly/PWA shell lives under web/ with setup notes in docs/PWA.md. It targets installable, offline-capable play after the user imports their own legal Hexen II assets. Build it in the nix develop .#wasm shell with ./scripts/wasm-build.sh; nix build .#wasm is not the supported path (Emscripten fetches its SDL3 port at configure time, and the Nix sandbox has no network).
Contributing
Contributions are welcome — bug reports, code cleanup, and documentation are all appreciated. See CONTRIBUTING.md for how to build, what CI checks, and the two rules that matter most (Ironwail parity and mod compatibility).
- Found a bug? File it here — the forms ask for your
qconsole.log, GPU and driver, which is what makes a report fixable. - Found a security issue? Please report it privately instead — see SECURITY.md.
License
GPL-2.0-or-later. See LICENSE.
Bundled
Vendored in this tree and compiled into the binary, so their notices ship with it:
- dr_libs (public domain / MIT-0) — MP3, FLAC, WAV decoders
- miniz (MIT, with a public-domain dedication) — deflate/inflate and ZIP reading; backs
.pk3/.zipsearchpath mounting - stb_image / stb_image_write (public domain / MIT) — image loading and JPG screenshot writing
- libTiMidity (LGPL-2.1) — MIDI fallback codec in
libs/timidity, built whenUSE_CODEC_TIMIDITYis on (the default)
Linked at build time
Resolved from the system or the Nix flake rather than vendored:
- SDL3 (Zlib) — platform abstraction
- libogg/libvorbis (BSD-3) — OGG Vorbis audio
- libopus/opusfile (BSD-3) — Opus audio
- libxmp (MIT) — tracker music (MOD, S3M, XM, IT)
- FluidSynth (LGPL-2.1) — MIDI synthesis, pulling libsndfile (LGPL-2.1) and FLAC (BSD-3) through pkg-config
- ALSA (LGPL-2.1) — Linux audio output
- zlib (Zlib) and the system OpenGL loader
Windows builds link prebuilt SDL3 and ogg/vorbis





