Composia is a small, fast, header-only Entity Component System (ECS) library. It can be used as a single header via Composia.h.
#include "Composia.h"
#include <iostream>
struct Position { float x, y; };
struct Velocity { float x, y; };
int main()
{
    Composia::Registry registy;
    Composia::Entity entity1 = registy.Create();
    Composia::Entity entity2 = registy.Create();
    registy.Emplace<Position>(entity1, 10.0f, 25.0f);
    registy.Emplace<Velocity>(entity1, 5.0f, 2.0f);
    registy.Emplace<Position>(entity2, 42.0f, 21.0f);
    registy.Emplace<Velocity>(entity2, 21.0f, 9.0f);
    registy.View<Position, Velocity>().each([](Position& pos, Velocity& vel)
    {
        std::cout << "Position(" << pos.x << ", " << pos.y
                  << "), Velocity(" << vel.x << ", " << vel.y << ")\n";
    });
}To get the project up and running, you'll need to follow the setup instructions for your platform.
- Navigate to the Scriptsfolder in the project directory.
- Run the Setup-Windows.bat batch file.
- 
Navigate to the Scriptsfolder in the project directory.
- 
Make the Setup-Linux.shscript executable:chmod +x Setup-Linux.sh 
- 
Run the script to install necessary dependencies and set up the project: ./Setup-Linux.sh