DEngine Get in touch

In developmentMITC11 · Slang

DEngine

DEngine is an open-source game engine written in C11, for Windows, Linux and the Steam Deck, and macOS. It draws 2D and 3D in one world through a GPU-driven, physically based renderer on each platform’s own graphics API: Direct3D 12, Vulkan and Metal. Hardware raytracing is used where the GPU supports it, with a raster fallback where it doesn’t. It’s specified with its own ECS, task graph, physics, audio, text, UI and netcode, and a simulation that’s deterministic across platforms, so lockstep, rollback and replays can work.

The C API

Declare the assets, load them in one call, record the frame.

Sky Hop is a small playable arcade game in the repository, built only on the engine’s own window, GPU, asset, shader and input APIs.

[assets]
"shaders/sky_hop" = { type = "shader", source = "shaders/sky_hop.slang" }
[bundles.hello]
assets = ["shaders/*"]

examples/flappy_bird/assets.toml, the whole file. Assets and bundles are declared, not loaded by hand.

    const de_asset_id ids[1] = {de_asset_id_from("shaders/sky_hop")};
    a->load = de_asset_load_many(a->assets, ids, 1, 0);
    if (de_asset_wait(a->assets, a->load, WAIT_NS) != DE_LOAD_READY) {
        char msg[512] = "?";
        for (u32 i = 0; i < 1; ++i)
            if (de_asset_last_error(a->assets, ids[i], msg, sizeof msg) == DE_OK)
                fprintf(stderr, "sky_hop: asset %u: %s\n", i, msg);
        fprintf(stderr, "sky_hop: the assets did not load\n");
        return 1;
    }
    return 0;
}

main.c, lines 145–156. One call starts a load, one waits on it, and a failure says why.

static void record_scene(app *a, de_gpu_cmd *c, de_gpu_texture target) {
    u32 slot = (u32)(a->frame % FRAMES_IN_FLIGHT);
    a->drawing = a->maps[slot];
    a->count = 0;
    scene(a);
    de_gpu_barrier b = {
        .buffer = a->rectangles[slot], .before = DE_ACCESS_NONE, .after = DE_ACCESS_SHADER_READ};
    de_gpu_cmd_barriers(c, &b, 1);
    de_gpu_attachment color = {
        .texture = target, .clear = true, .clear_color = {.017f, .05f, .055f, 1}, .store = true};
    de_gpu_cmd_begin_render(c, &color, 1, NULL);
    de_gpu_cmd_set_pipeline(c, a->pipe);
    struct {
        u32 rectangles;
        f32 width, height;
        u32 pad;
    } pc = {de_gpu_buffer_bindless(a->d, a->rectangles[slot]), (f32)a->width, (f32)a->height, 0};
    de_gpu_cmd_push_constants(c, &pc, sizeof pc);
    de_gpu_cmd_draw(c, 6, a->count, 0, 0);
    de_gpu_cmd_end_render(c);
}

main.c, lines 310–330. The frame is recorded straight onto the GPU abstraction: one barrier, one pipeline, one instanced draw.

Sky Hop, the engine’s playable example, at commit 686e464. Unedited excerpts.

Capabilities

What it does.

Engineers who want DEngine to fit into the workflow they already have.

  1. 01

    One world for 2D and 3D, designed for physically based materials, hybrid raytracing and a reference path tracer

  2. 02

    Native backends: Direct3D 12 on Windows, Vulkan on Linux and the Steam Deck, Metal on macOS

  3. 03

    Assets and bundles declared in TOML, loaded with one call and checked with another, packed into archives to ship

  4. 04

    A simulation specified to be deterministic across platforms, for lockstep netcode, rollback and replays

  5. 05

    A stable C API meant for other developers, under the MIT license

Specification

What it’s built with, and when.

Pulled from the repository each time this site is built.

State
In development
Discipline
Developer tooling
Shape
Developer tooling
Started
Oct 2026
Last change
Oct 2026
Commits
984
  • C11
  • Slang
  • Direct3D 12
  • Vulkan
  • Metal
  • SDL3
  • CMake
  • C 91%
  • Slang 3%

Next

Put DEngine in your pipeline

Ask about hooking it up to the repositories and agents you already run.

This site isn't finished. Anything on it may still change, and none of it is binding until the site is live.