I developed a highperformance c# archetype ECS for game development and data oriented programming some weeks ago
[Arch ECS]((GitHub - genaray/Arch: A high performance c# Archetype Entity Component System ( ECS ) with optional multithreading.)
for (var index = 0; index < 1000; index++)
var entity = world.Create(new Position{ x = 0, y = 0}, new Velocity{ dx = 1, dy = 1});
// Query and modify entities
world.Query(in query, (ref Position pos, ref Velocity vel) => {
pos.x += vel.dx;
pos.y += vel.dy;
});
Since then it came a long way, today it had its first “major” update which restructured a lot of its internals. During that process it became even faster than before ! Especially the lookup speed has been improved by over 100%.
Furthermore it recently received “pure ecs” support ( requires a fork ), with a simple flag, you can now easily slim down the Entity
itself from 8 to 4 bytes in total to save memory and speed up your operations
#PURE_ECS
public static World world;
world.Query(in desc, static (ref Target target, ref Damage damage) => {
ref var health = ref world.Get<Health>(target.target); // Thats the pure ecs part basically.
health.current -= damage.dmg;
});
Feel free to check it out, leave some feedback, some contribution or even a star ! ^^