Flecs
More info
- Creator
- Sander Mertens
- Released
- 2019
- Type
- C/C++ library
- License
- MIT
- Website
- flecs.dev
An archetype-based ECS framework written in C with a C++ API, known for treating relationships between entities as first-class data.
Sander Mertens published Flecs in 2019. Entities sharing the same set of components are stored together in an archetype table, keeping iteration cache-friendly in the data-oriented spirit. The distinctive part is relationships: a pair such as (ChildOf, Ship) or (Likes, Bob) is itself a component, so hierarchies, inventories and graphs are expressed and queried with the same machinery as everything else.
On top sit a query language with variables, scheduled systems, modules and a web-based explorer that inspects a running world live. The core is C99 so it can be embedded nearly anywhere. Flecs and EnTT are the two names that come up whenever someone asks for a standalone ECS in C++.