Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
flecs.h
✓ #include <flecs.h>
Create an ECS world with a movement system
#include <flecs.h>
#include <iostream>
struct Position { float x, y; };
struct Velocity { float x, y; };
int main() {
flecs::world ecs;
ecs.system<Position, const Velocity>()
.each([](flecs::entity e, Position& p, const Velocity& v) {
p.x += v.x;
p.y += v.y;
});
auto e = ecs.entity()
.set<Position>({0, 0})
.set<Velocity>({1, 1});
ecs.progress();
const Position* p = e.get<Position>();
std::cout << p->x << ", " << p->y << std::endl;
return 0;
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.