Skip to content
Romain Milbert edited this page Nov 19, 2024 · 3 revisions

RaZ internally uses an ECS (Entity Component System). An ECS is basically an architecture that favors composition over inheritance, with an entity's behavior being dictated by the components it holds, and not its type hierarchy. This is a design that is very often used due to its extreme flexibility, compared to inheritance-heavy architectures that can quickly become unmaintainable.

Entities

Writing in progress.

Components

Writing in progress.

System

Writing in progress.

Basic workflow

Writing in progress.

There are a lot of ECS libraries, why make a custom one?

RaZ started as a personal project made just for myself, mostly to learn as many things as I could. In this regard, having made this ECS was extremely useful, not to mention fun to do. It can of course be improved a lot, so much so that using a library (such as Flecs, EnTT, ...) could very well indeed be the best idea.

However, my idea and goal have always been that RaZ should be as intuitive to use as possible, which includes how entities, components and systems work (e.g., how components can be directly added to entities instead of using registries, managers, handlers or whatnot); and although I haven't checked thoroughly, I haven't seen any library that would allow me doing that easily, if at all.

That being said, I'm not entirely adamant on keeping it, but I don't want any change to be made just for the sake of it. If you do believe using something else would be better for ease of use, maintenance and/or performance, feel free to suggest changes, backed up by examples, profiling and/or benchmarks!

Clone this wiki locally