![]() |
Flecs v4.0
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!
C99 example:
Same example in C++11:
If you have a project you'd like to share, let me know on Discord!
https://github.com/SanderMertens/tower_defense
https://github.com/flecs-hub/city
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!