This project is a minimal implementation of the Entity-Component-System (ECS) architectural pattern in C++. It is created primarily for learning and experimentation, providing a simple and clear structure for understanding how ECS works.
- CMake >= 3.28.3
- C++20 compatible compiler (GCC, Clang, MSVC)
- OpenGL development libraries
- Linux (X11) recommended; other platforms may require changes
All other dependencies (GLFW, GLAD, yaml-cpp, ImGui, GoogleTest) are included in the repository.
This section explains how to build and run the ECS application after setting up the repository and its dependencies. Follow the steps below to compile the code and launch the executable.
To install the project, follow these steps:
-
Clone the repository
Open a terminal and run:
git clone https://github.com/frederic-hallein/entity-component-system.git
-
Navigate to the project directory
cd ecs
To build the project, follow these steps:
-
Create a build directory
This keeps build files separate from your source files.
mkdir -p build
-
Configure the project with CMake
Generate the build system files for your platform.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -
Build the project
Compile the source code and link the executable.
cmake --build build
The main executable will be located at build/ecs.
To execute the binary:
./build/ecsTo run all tests, use the command:
./build/tests/ecs_tests