![]() |
Flecs v3.2
A fast entity component system (ECS) for C & C++
|
Flecs is a fast and lightweight Entity Component System that lets you build games and simulations with millions of entities (join the Discord!). Here are some of the framework's highlights:
To support the project, give it a star 🌟 !
ECS is a way of organizing code and data that lets you build games that are larger, more complex and are easier to extend. Something is called an ECS when it:
For more information, check the ECS FAQ!
The Flecs playground lets you try Flecs without writing any C/C++ code!
To learn how to use the playground, check the Flecs Script Tutorial.
For a list of regularly tracked benchmarks, see the ECS Benchmark project.
C99 example:
Same example in C++11:
If you have a project you'd like to share, let me know on Discord!
https://store.steampowered.com/app/690290/Territory_Control_2/
https://nicok.itch.io/sol-survivor-demo
https://github.com/ConfettiFX/The-Forge
https://github.com/clibequilibrium/EquilibriumEngine
https://thepunkcollective.itch.io/gravitas
https://github.com/foxnne/aftersun
https://www.flecs.dev/tower_defense/etc (repository)
https://www.flecs.dev/city (repository)
Flecs Hub is a collection of repositories that show how Flecs can be used to build game systems like input handling, hierarchical transforms and rendering.
Module | Description |
---|---|
flecs.components.cglm | Component registration for cglm (math) types |
flecs.components.input | Components that describe keyboard and mouse input |
flecs.components.transform | Components that describe position, rotation and scale |
flecs.components.physics | Components that describe physics and movement |
flecs.components.geometry | Components that describe geometry |
flecs.components.graphics | Components used for computer graphics |
flecs.components.gui | Components used to describe GUI components |
flecs.systems.transform | Hierarchical transforms for scene graphs |
flecs.systems.physics | Systems for moving objects and collision detection |
flecs.systems.sokol | Sokol-based renderer |
flecs.game | Generic game systems, like a camera controller |
The following language bindings have been developed with Flecs! Note that these are projects built and maintained by helpful community members, and may not always be up to date with the latest commit from master!