Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/raoulkdev/MiniECS/llms.txt

Use this file to discover all available pages before exploring further.

MiniECS is a minimal, readable C++ framework that demonstrates the Entity-Component-System (ECS) pattern. It is inspired by Unity’s architecture — Units play the role of GameObjects and Modules play the role of Components — all wired together in a World scene container. It is built for learning, prototyping, and extending.

Introduction

Understand what MiniECS is, what it solves, and when to use it.

Quickstart

Build and run your first MiniECS scene in minutes.

Architecture

Explore how World, Unit, and Module fit together.

API Reference

Full reference for every public class and method.

How MiniECS Works

MiniECS revolves around three core primitives:
1

Create a World

A World is a named scene container that holds all your Units and drives the game loop.
MiniECS::World scene("Scene");
2

Add Units

Units are entities — analogous to GameObjects. Add them to the World by name.
scene.createUnit("player");
3

Attach Modules

Modules are components that give a Unit behaviour (Transform, Renderer, etc.). Each module type can only be attached once per Unit.
scene.getUnitByName("player")->addModule(MiniECS::ModuleType::Transform);
scene.getUnitByName("player")->addModule(MiniECS::ModuleType::Renderer);
4

Play the Scene

Call play() to start the simulated 60 fps game loop, which calls start() on every Module every frame.
scene.play();

Key Features

Composable Modules

Attach any combination of Modules to a Unit. Built-in types: TransformModule and RendererModule.

Type-Safe Access

Retrieve modules with getModule<T>() — a templated method backed by dynamic_cast.

Custom Modules

Extend the base Module class and override start() to create your own components.

CMake Build

Straightforward CMake 3.30+ setup. Requires C++20 and the GLM math library.

Build docs developers (and LLMs) love