Soso.Ecs

Soso.Ecs is a super fast and easy to use archetype ECS library

✨ Features

  • Straightforward System runners
  • Minimal allocations
  • Option to run systems in parallel
  • Tiny entity struct with helpful functions

🔨 Usage

In short:

struct Transform
{
	public Vector2 Position;
}
struct RigidBody
{
	public Vector2 Velocity;
}
struct Physics : ISystem<Transform, RigidBody>
{
	public void Update(ref Transform t0, ref RigidBody t1)
	{
		t0.Position += t1.Velocity * Time.Dt;
		if (t0.Position.X < 0 || t0.Position.X > Window.Width) t1.Velocity.X *= -1;
		if (t0.Position.Y < 0 || t0.Position.Y > Window.Height) t1.Velocity.Y *= -1;
	}
}

EcsWorld Ecs = new EcsWorld();
Ecs.RunParallel<Physics, Transform, RigidBody>();