DEMIENGINEDOCUMENTATION Everything is free
Getting started · Start here

Toolchain, CMake presets, and producing the demi binary.

Install & build

Before you can create a game you need the engine itself. DemiEngine is a Linux-first C++20 program that you compile from source with CMake. This page walks through the tools you need, how to run the build, where the finished command-line program lands, and what to do when a dependency is missing.

What you are building

A game engine is a program plus libraries that load your game content and run it. DemiEngine ships that as a single command-line tool named demi. Every task — creating a project, running the game, validating files, testing, packaging — is a subcommand of that tool. Nothing else needs to be installed globally.

Prerequisites

You need three things on a Linux machine:

  • Linux — the supported development platform. Builds and tests target Linux first.
  • A C++20 toolchain — a compiler and standard library that understand C++20 (recent GCC or Clang). This turns the engine source code into the demi binary.
  • CMake plus a build tool — CMake reads the project's build description and drives the compiler. Ninja is the usual companion, but Make works too.

Confirm the tools are present before configuring:

cmake --version
c++ --version

cmake --version prints the CMake release. c++ --version prints your compiler release. If either command is missing, install the corresponding package from your distribution (typically cmake, ninja-build, and g++ or clang).

Configure the build

The repository defines named build configurations called presets. A preset is a saved set of CMake options so you do not have to remember flags. Use the optimized Linux release preset for normal editor and game development. Configure it from the repository root:

cmake --preset linux-release
  • cmake — the build configuration tool.
  • --preset linux-release — selects the checked-in linux-release configuration. It enables native compiler optimization and places output under build/linux-release/.

The command returns after generating build files. It does not compile anything yet. On success the last lines name the build directory and generator.

Compile the engine

cmake --build --preset linux-release
  • cmake --build — runs the build tool CMake configured.
  • --preset linux-release — builds the same preset you configured.

This compiles the engine and links the CLI. The command returns when compilation finishes; a first build takes the longest. Later incremental builds only recompile what changed.

Confirm the demi CLI

After the build finishes, run the CLI directly from the build directory, or add that directory to your PATH:

./build/linux-release/demi --help
./build/linux-release/demi editor --project path/to/project
  • demi — the engine CLI used for authoring, validation, testing, and packaging.
  • --help — prints the top-level command list and global options, then exits with code 0.

The help output is the fastest way to see every command group: new, doctor, dev, editor, run, validate, asset, package, test, cook, build, and more. Add --help to any subcommand for its own flags. Command details are covered in Create & develop, Assets & packages, and Build, cook & test.

Debugging native engine code

The linux-debug preset keeps a separate native Debug build for stepping through C++ engine code and running focused tests:

cmake --preset linux-debug
cmake --build --preset linux-debug
ctest --preset linux-debug

The default Debug preset disables native compiler optimization, which can make editor rendering and simulation substantially slower. Use the optimized editor for normal authoring and frame-rate measurements. Embedded Play runs inside the editor's own native build; selecting Release in Run & Test changes the standalone runtime, not the running editor.

Troubleshooting missing dependencies

Most early failures come from the environment rather than the engine source. Check these first:

  • cmake not found — CMake is not installed or not on your PATH. Install it and reopen the terminal.
  • Compiler errors about C++20 features — the compiler is too old. Install a newer GCC or Clang and re-run the configure step so CMake picks it up.
  • Configure stops on a missing library — the message names the missing package. Install it with your distribution's package manager, then run cmake --preset linux-release again.
  • Build stops mid-compile — read the first error, not the last. Fix the reported file, then re-run cmake --build --preset linux-release; only the changed parts rebuild.

Once the binary exists, The development loop shows how demi doctor reports anything else your machine is missing for a given target platform.

Next steps