Modern C++ goodness

ftz QuakeC Virtual Machine

A modern take on the old technology

A QuakeC virtual machine written in modern C++. Useful where there is still some QuakeC code left but everything else is up to date. The goals of this implementation are portability and ease of use. There is absolutely no global state and all non-portable bit-twiddling is isolated into a single file. A library of 45 builtin functions and a standalone executable is provided for testing.

This library was based on a code from the Daemon port of Xonotic but almost all of it was rewritten.

Key features

  • Cross platform - written in pure ISO C++14 (+ #pragma once).
  • Clean, modern codebase - doesn’t use any old or deprecated C++ features.
  • Free software - released under the terms of GNU GPLv3 or any later version.


Compiler support

  • G++ 7 or newer with libstdc++

How to get

It is highly recommended to use Conan to install and use this library. First, install pip. For example, on APT-based distros:

# apt install python-pip

Then install Conan and add official ftz repository:

$ pip install conan
$ conan remote add ftz https://conan.ftz.lyberta.net

Then you need to follow a Conan tutorial to declare that your project depends on this library, for example, using conanfile.txt:


Or using conanfile.py:

build_requires = "ftzQCVM/Latest@Lyberta/Latest"

The rest depends on your build system. In CMake you would do:

# Adding Conan dependencies.

# Adding example executable target.
add_executable(Example ...)

# Specifying libraries to link executable to.
target_link_libraries(Example PRIVATE CONAN_PKG::ftzQCVM)

After that in your source code you include files like this:

#include <ftz/QuakeC/SomeHeader.h>

To build your code, remember to execute conan install before calling cmake so your dependencies will be set correctly.

Source code

API reference

Manually building the library

Install git, pip and conan:

# apt install git python-pip
$ pip install conan

Clone the repository and switch into it:

$ git clone https://gitlab.com/ftz/qcvm.git
$ cd qcvm

Install system-wide dependencies:

# ./InstallSystemDependencies.sh

Install user-level dependencies:

$ ./InstallUserDependencies.sh

Build the Conan package with your specified user and channel:

$ conan create . User/Channel