Kwayk

June 7, 2026 ยท View on GitHub

Qt 6.9 Platform License

Kwayk is a modern reimplementation of the classic Quake (1996) game engine using Qt Quick 3D and QML. It runs natively on desktop platforms and in web browsers via WebAssembly.

โœจ Features

  • ๐ŸŽฎ Single Player campaign โ€” monsters, weapons, items, and level progression
  • ๐ŸŒ WebAssembly support โ€” play directly in your browser
  • ๐ŸŽจ Modern rendering โ€” Qt Quick 3D with decals, particles, and view-model rendering
  • ๐Ÿ’ก Color lightmaps โ€” Quake lightmaps with animated light styles and fullbright textures
  • ๐Ÿ”Š 3D spatial audio โ€” positional sound using Qt SpatialAudio (desktop) and Web Audio API (WASM)
  • โšก Physics engine โ€” Qt Quick 3D Jolt Physics for accurate collision detection
  • ๐Ÿงฉ Classic entity logic โ€” doors, platforms, teleporters, push/hurt triggers, secrets, pickups, and monster AI
  • ๐Ÿ–ฅ๏ธ Cross-platform โ€” Linux, Windows, macOS, and WebAssembly
  • ๐Ÿ“บ Retro aesthetics โ€” faithful recreation of the original look and feel

๐Ÿ—บ๏ธ Roadmap

  • Single Player (Episode 0 from LibreQuake)
  • Multiplayer (Deathmatch, Co-op)
  • Custom map support
  • Mod support

๐Ÿ–ผ๏ธ Screenshots

Kwayk Screenshot

๐ŸŽฎ Live Demo

โ–ถ๏ธ Play in browser (WebAssembly)

๐Ÿš€ Getting Started

Prerequisites

  • Qt 6.9+ with the following modules:
    • Qt QML
    • Qt Quick
    • Qt Quick 3D
    • Qt Quick 3D Private
    • Qt Spatial Audio
  • Qt Quick 3D Jolt Physics โ€” physics plugin for Qt Quick 3D
  • CMake 3.16+

Building

# Clone the repository
git clone git@github.com:glazunov999/Kwayk.git
cd Kwayk

# Configure and build
cmake -B build -DCMAKE_PREFIX_PATH=/path/to/Qt/6.9.3/gcc_64
cmake --build build --parallel

# Run
./build/appKwayk

Building for WebAssembly

# Configure with Emscripten Qt kit
cmake -B build-wasm \
  -DCMAKE_TOOLCHAIN_FILE=/path/to/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
  -DCMAKE_PREFIX_PATH=/path/to/Qt/6.9.3/wasm_singlethread

cmake --build build-wasm --parallel

# Serve locally
cd build-wasm
python3 -m http.server 8080
# Open http://localhost:8080/appKwayk.html

๐Ÿ› ๏ธ Project Structure

Kwayk/
โ”œโ”€โ”€ Assets/           # Game assets (textures, sounds, maps)
โ”‚   โ”œโ”€โ”€ images/       # UI and texture images
โ”‚   โ”œโ”€โ”€ maps/         # Qt Quick 3D level data converted from BSP
โ”‚   โ”œโ”€โ”€ progs/        # Model files (.mdl)
โ”‚   โ””โ”€โ”€ sounds/       # Sound effects
โ”œโ”€โ”€ Backend/          # C++ backend modules
โ”‚   โ”œโ”€โ”€ mdl.*         # Quake MDL model loader
โ”‚   โ”œโ”€โ”€ cmd.*         # Console command system
โ”‚   โ”œโ”€โ”€ lightstyletexture.*  # Animated Quake light styles
โ”‚   โ””โ”€โ”€ webspatialaudio/  # Web Audio API implementation
โ”œโ”€โ”€ id1/              # Intermediate converted Quake data used by the asset pipeline
โ”œโ”€โ”€ Kwayk/
โ”‚   โ”œโ”€โ”€ Core/         # Core game systems (rendering, audio, particles)
โ”‚   โ”œโ”€โ”€ Game/         # Game logic (entities, triggers, monsters)
โ”‚   โ”œโ”€โ”€ Ui/           # User interface (menus, HUD, console)
โ”‚   โ””โ”€โ”€ js/           # JavaScript utilities
โ””โ”€โ”€ tools/
    โ””โ”€โ”€ q1pak/        # PAK file extractor and BSP converter

๐Ÿ“ฆ Asset Conversion

Converting Quake assets is a two-step process:

Step 1: Extract and convert to Collada

The q1pak tool extracts PAK files and converts BSP maps to Collada (.dae) format:

cd tools/q1pak
qmake && make
./q1pak /path/to/id1/pak0.pak -o ./output

Step 2: Convert to Qt Quick 3D format

Use Qt's balsam tool to convert Collada files to Qt Quick 3D meshes and QML:

# Convert a map
balsam ./output/maps/lq_e0m1/lq_e0m1_map.dae -o ../../Assets/maps/lq_e0m1

# The output includes:
# - meshes/*.mesh    (binary mesh data)
# - *.qml            (Qt Quick 3D scene)
# - maps/*.png       (textures)

Note: Some manual adjustments to the generated QML may be required for proper material setup.