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!
We knew that we wanted to build Hytale around an Entity-Component-System (ECS). When we analyzed the options, FLECS rose to the top. FLECS provides the backbone of the Hytale Game Engine. Its flexibility has allowed us to build highly varied gameplay while supporting our vision for empowering Creators.
– Dann Webster, Hypixel studios
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!