This project measures the performance of different Entity-Component-System (ECS) libraries for C# on concrete game. The project has two parts: the game and the benchmark.
The game simulates villagers in an open world. Villagers gather resources, and the villages use these resources to build new structures. Villagers have basic AI powered by behavior trees. The world is generated at runtime using fragment and compute shaders.
The project has a shared codebase (namespace WorldSimulator.ECS.AbstractECS
) that defines interfaces for the ECS libraries. Each library has its own wrapper classes that implement these interfaces. The project focuses on measuring system update times, not the performance of entity creation/destruction or component addition/removal.
The shared codebase may be updated in the future.
The benchmark measures how fast the game can simulate worlds of different sizes using various ECS libraries. Results are available in thesis.pdf
and poster.pdf
(currently in Czech).
Future updates will include:
- Adding new ECS library variants (e.g., parallel systems)
- Including more ECS libraries
- Expanding game features
- Refactoring code
- Creating a tutorial for adding ECS libraries
Currently, the following ECS libraries are compared (may change in the future):
- Arch
- DefaultEcs
- Entitas
- HypEcs
- Leopotam.Ecs
- Leopotam.EcsLite
- MonoGame.Extended.Entities
- RelEcs
- Svelto.ECS
This project was inspired by the following repositories: