
🌄Why Arch?
Arch, a high-performance and bare minimum C# ECS.
Arch is a high-performance C# based Archetype & Chunks Entity Component System (ECS) for game development and data-oriented programming. To summarize:
Example
Put on your boots and give it a try, it's easier than you thought...
dotnet add PROJECT package Arch --version 2.1.0-beta
Then import Arch next, so that Arch and its methods are available to you...
using Arch;
And your journey can begin! Now let's take a quick look at a small example before you can dive in completely!
using Arch;
// Components
public record struct Position(float X, float Y);
public record struct Velocity(float Dx, float Dy);
// Create a world and an entity with position and velocity.
using var world = World.Create();
var player = world.Create(new Position(0,0), new Velocity(1,1));
// Enumerate all entities with Position & Velocity to move them
var query = new QueryDescription().WithAll<Position,Velocity>();
world.Query(in query, (Entity entity, ref Position pos, ref Velocity vel) => {
pos.X += vel.Dx;
pos.Y += vel.Dy;
Console.WriteLine($"Moved player: {entity.Id}");
});
Next steps
Where to next? Arch is packed with features. Look at the documentation, play around with the examples or make yourself familiar with the Extensions. It's hard for me to let you go, but I'm so excited to see where it will take you.
Socials
Get involved!
Support this project!
But before you leave, take a moment to value this project. Do you notice anything? It is completely open source! You can contribute and change every aspect! So if you like it, leave a star ⭐ and buy us a coffee ☕ to support further development!
Last updated
Was this helpful?