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 1.3.3-alpha

Don't miss your luggage and briefly import Arch...

using Arch;

And your journey can begin! It wasn't difficult, was it? Let's take a look at this example together, it should open your eyes and show you where the journey is heading.

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 adventurer = 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 adventurer: {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!

The world of open source...

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