ironloom/loom
loom is a declarative, entity component system based game engine, written in zig.
masterrefsd594f9c8c745bec64394f7f6e5ff061134d7af9b777e76828f05d5d223df47a4c0de95ae4efde884The declarative, ECS-based game engine, written in zig.
loom wraps raylib-zig and uses johan0A's clay-zig-bindings for UI.
[!important] This project uses zig version
0.15.2and Raylib5.6-dev.
The engine aims to provide a declarative interface for game development – we call it a "code only Unity", since all you need is a few lines of code to configure scenes, entities, cameras, and behaviours.
Adding loom as a dependency is easy, just follow these steps:
Fetch the package.
zig fetch --save git+https://github.com/ironloom/loom#stable
Get the module.
const loom_dep = b.dependency("loom", .{
.target = target,
.optimize = optimize,
});
const loom_mod = loom_dep.module("loom");
Add the import
target_module.addImport("loom", loom_mod);
You are ready to go, import loom into you project:
const loom = @import("loom");
We have a few example projects included in this repository. Here is how you can run them:
git clone https://github.com/ironloom/loom.git && cd ./loom
zig build run-example=<example name>
Currently available examples:gamepad (only works with a gamepad connected)spawning-removingdisplay-sortingcomponentsglobal-behavioursaudio