Skip to content

genaray/Arch.Docs

Repository files navigation

description cover coverY layout
Arch, a high-performance and bare minimum C# ECS.
.gitbook/assets/arch-banner-2.png
547.5749999999999
cover title description tableOfContents outline pagination
visible size
true
hero
visible
true
visible
true
visible
true
visible
true
visible
true

🌄 Why Arch?

Arch is a high-performance C# based Archetype & Chunks Entity Component System (ECS) for game development and data-oriented programming. To summarize:

🏎️ FAST

Best cache efficiency, iteration, and allocation speed. Plays in the same league as C++/Rust ECS Libs!

🚀 FASTER

Arch is on average quite faster than other ECS implemented in C#. Check out this Benchmark!

🤏 BARE MINIMUM

Not bloated, it's small and only provides the essentials for you!

☕️ SIMPLE

Promotes a clean, minimal, and self-explanatory API that is simple by design. Check out the Wiki!

💪 MAINTAINED

It's actively being worked on, maintained, and comes along several Extensions!

🚢 SUPPORT

Supports .NetStandard 2.1, .Net Core 8, and therefore you may use it with Unity, Godot or any other C#-Project!

Example

Put on your boots and give it a try, it's easier than you thought...

dotnet add PROJECT package Arch --version 2.0.0

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}"); 
}); 

{% hint style="info" %} This example is just a foretaste, more syntax and API await you on your adventure! Even non-generic ones and some without lambdas! {% endhint %}

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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published