labelle

A declarative 2D game engine for Zig

Comptime Scenes

Define scenes in .zon files. No runtime parsing, zero-cost abstractions.

ECS Architecture

Flexible Entity-Component-System with zig_ecs or zflecs backends.

Physics

Box2D integration for rigid bodies, colliders, and constraints.

Multi-Platform

Build for desktop, iOS, Android, and WebAssembly from one codebase.

Graphics Backends

Choose raylib or sokol for rendering. Sprite atlases, animations, cameras.

Developer Experience

labelle-cli for project generation, hot reload, and builds.

Define scenes declaratively

// scenes/main.zon
.{
    .name = "main",
    .entities = .{
        .{
            .id = "player",
            .prefab = "player",
            .components = .{ .Position = .{ .x = 400, .y = 300 } },
            .children = .{
                .{ .prefab = "weapon", .components = .{ .Position = .{ .x = 20, .y = 0 } } },
            },
        },
    },
}

Get started with labelle-cli

# Install labelle-cli
curl -fsSL https://labelle.games/install.sh | bash

# Create and run your first game
labelle init my-game
cd my-game
labelle run