Skip to content

Project Structure

A labelle project follows a conventional structure:

my-game/
├── project.labelle # Project configuration
├── scenes/ # Scene definitions (.zon)
│ └── main.zon
├── prefabs/ # Reusable entity templates (.zon)
│ └── player.zon
├── components/ # Custom component definitions (.zig)
├── scripts/ # Game logic (.zig)
│ └── movement.zig
├── hooks/ # Lifecycle hooks (.zig)
├── assets/ # Textures, sounds, etc.
│ ├── sprites/
│ └── audio/
└── .labelle/ # Generated build files
├── build.zig
├── build.zig.zon
└── main.zig

The main configuration file:

.{
.version = 1,
.name = "my_game",
.initial_scene = "main",
.backend = .raylib,
.ecs_backend = .zig_ecs,
.window = .{
.width = 800,
.height = 600,
.title = "My Game",
},
.physics = .{
.enabled = true,
.gravity = .{ 0, 980 },
},
}

Scenes define what entities exist in your game world. See Scenes & Entities.

Prefabs are reusable entity templates. See Prefabs.

Scripts contain game logic that runs every frame. See Scripts.

The .labelle/ directory contains generated build files. Run labelle generate to regenerate after changing project.labelle.