Arch 1.3.0-alpha
See the version list below for details.
dotnet add package Arch --version 1.3.0-alpha
NuGet\Install-Package Arch -Version 1.3.0-alpha
<PackageReference Include="Arch" Version="1.3.0-alpha" />
paket add Arch --version 1.3.0-alpha
#r "nuget: Arch, 1.3.0-alpha"
// Install Arch as a Cake Addin #addin nuget:?package=Arch&version=1.3.0-alpha&prerelease // Install Arch as a Cake Tool #tool nuget:?package=Arch&version=1.3.0-alpha&prerelease
Arch
A high-performance C# based Archetype & Chunks Entity Component System (ECS) for game development and data-oriented programming.
- 🏎️ 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 6 and 7, and therefore you may use it with Unity or Godot!
Download the package, get started today and join the Discord!
dotnet add PROJECT package Arch --version 1.3.0-alpha
⏩ Quickstart
Arch is bare minimum, easy to use, and efficient. Let's say you want to create some game entities and make them move based on their velocity... sounds complicated? It's not! Arch does everything for you, you only need to define the entities and the logic.
I bet you don't want to read tons of documentation, theory, and other boring stuff right?
Let's just ignore all that deep knowledge and jump in directly to get something done.
// Components ( ignore the formatting, this saves space )
public struct Position{ float X, Y };
public struct Velocity{ float Dx, Dy };
public sealed class Game
{
public static void Main(string[] args)
{
// Create a world and entities with position and velocity.
var world = World.Create();
for (var index = 0; index < 1000; index++)
world.Create(new Position{ X = 0, Y = 0}, new Velocity{ Dx = 1, Dy = 1});
// Enumerate entities with Position AND Velocity to modify 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: {entity.Id}");
});
}
}
[!NOTE] The example is very simple. There more features including queries without lambda or an API without generics and much more. Checkout the Documentation!
💡 Highlights
This is all you need to know, with this little knowledge you are already able to bring your worlds to life.
However, if you want to take a closer look at Arch's features and performance techniques, check out the Wiki!
There's more to explore, for example...
🤝 Our promise
- Bare minimum - No overengineering, no abstracted hidden costs
- Incredibly fast and efficient
- Is actively maintained and developed
- Grateful for every contribution
🚀 Features
- Archetypes with 64KB large chunks for your massive worlds
- Incredibly small Entity size
- Optional
Pure-ECS
for maximum performance and efficiency - Bulk/Batch Entity operations
- High-performance Queries
- Multithreaded Queries
- Enumerators
- CommandBuffers
- Events
- Generic and Non-Generic API
- AOT friendly
- Several extensions with systems, tools, source generators and more
- Monogame, Unity, Godot Integration guides
- And much more...
🧩 Extensions
Arch has some extensions that add more features and tools. Among them for example :
- 🛠️ Arch.Extended > Adds a set of tools and features to save boilerplate code!
- 🔎 Godot Entity Debugger > An Arch Entity debugger for the Godot engine!
- 🔎 Stride Entity Debugger > An example of Arch in the Stride engine, with additional entity and system inspector!
- 🔎 Arch.Unity > A library that makes the integration of Arch in Unity much easier, with many cool new features!
- ❓ Your Tool-Library? > If you develop more tools and features for Arch, let us know and we'll list them here!
🚀 Performance
Arch is already one of the fastest ECS and uses the best techniques under the hood to achieve maximum performance and efficiency. Care is always taken to find a healthy balance between CPU performance and ram utilization.
If you are more interested, have a look at the benchmark!
📖 Documentation
Were we able to convince you? If so, let's get started. We have prepared a whole wiki to explain all the important aspects and provide examples. Click here for the documentation!
💻 Projects using Arch
Arch is already used in some projects, for a more detailed look, take a look at the wiki!
Space Station 14
Space Station 14 is inspired by the cult classic Space Station 13 and tells the extraordinary story of everything that can go wrong on a shift at a space station. You take on a role and complete your tasks so that the space station doesn't go to the dogs... or do the exact opposite. Prepare yourself for chaos and the finest roleplay. Best of all, SS14 is open-source and anyone can play!
Roguelite-Survivor
An action-packed c# clone of the hit "vampire survivor" based on monogame and arch! Fight your way through hordes of different enemies, level up your character, collect permanent items and explore various maps! Try it out!
EquilibriumEngine-CSharp
Equilibrium Engine is a data-oriented C# game engine that takes advantage of ECS pattern followed by Hot-Reloading of your libraries which allows you to quickly iterate on different aspects of your projects.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Arch.LowLevel (>= 1.1.3)
- Collections.Pooled (>= 2.0.0-preview.27)
- CommunityToolkit.HighPerformance (>= 8.2.2)
- Microsoft.Extensions.ObjectPool (>= 7.0.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroAllocJobScheduler (>= 1.1.2)
-
net6.0
- Arch.LowLevel (>= 1.1.3)
- Collections.Pooled (>= 2.0.0-preview.27)
- CommunityToolkit.HighPerformance (>= 8.2.2)
- Microsoft.Extensions.ObjectPool (>= 7.0.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroAllocJobScheduler (>= 1.1.2)
-
net7.0
- Arch.LowLevel (>= 1.1.3)
- Collections.Pooled (>= 2.0.0-preview.27)
- CommunityToolkit.HighPerformance (>= 8.2.2)
- Microsoft.Extensions.ObjectPool (>= 7.0.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroAllocJobScheduler (>= 1.1.2)
-
net8.0
- Arch.LowLevel (>= 1.1.3)
- Collections.Pooled (>= 2.0.0-preview.27)
- CommunityToolkit.HighPerformance (>= 8.2.2)
- Microsoft.Extensions.ObjectPool (>= 7.0.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroAllocJobScheduler (>= 1.1.2)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Arch:
Package | Downloads |
---|---|
Arch.Persistence
A Persistence-Framework for Arch. |
|
Arch.Relationships
Simple Entity-Relationships for Arch. |
|
Undine.Arch
Package Description |
|
Doprez.Stride.Arch
A package of helper classes for using Arch ECS in Stride3D |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Arch:
Repository | Stars |
---|---|
genaray/Arch.Extended
Extensions for Arch with some useful features like Systems, Source Generator and Utils.
|
|
AnnulusGames/Arch.Unity
Arch ECS integration for Unity.
|
|
Doraku/Ecs.CSharp.Benchmark
Benchmarks of some C# ECS frameworks.
|
Version | Downloads | Last updated |
---|---|---|
1.3.3-alpha | 807 | 8/15/2024 |
1.3.2-alpha | 75 | 8/14/2024 |
1.3.1-alpha | 80 | 8/13/2024 |
1.3.0-alpha | 201 | 8/12/2024 |
1.2.8.2-alpha | 544 | 7/22/2024 |
1.2.8.1-alpha | 1,412 | 4/19/2024 |
1.2.8 | 7,660 | 3/13/2024 |
1.2.7.1-alpha | 585 | 11/20/2023 |
1.2.7 | 3,175 | 10/15/2023 |
1.2.6.8-alpha | 383 | 9/17/2023 |
1.2.6.7-alpha | 173 | 8/27/2023 |
1.2.6.6-alpha | 3,389 | 8/25/2023 |
1.2.6.5-alpha | 284 | 8/19/2023 |
1.2.6.4-alpha | 154 | 8/14/2023 |
1.2.6.3-alpha | 85 | 8/14/2023 |
1.2.6 | 686 | 8/13/2023 |
1.2.5.3-alpha | 522 | 5/21/2023 |
1.2.5.2-alpha | 152 | 5/16/2023 |
1.2.5.1-alpha | 252 | 5/11/2023 |
1.2.5 | 823 | 4/26/2023 |
1.2.4.2-beta | 105 | 4/16/2023 |
1.2.4 | 417 | 4/15/2023 |
1.2.3 | 221 | 3/19/2023 |
1.2.0 | 204 | 3/5/2023 |
1.1.9 | 203 | 1/29/2023 |
1.1.8 | 124 | 1/29/2023 |
1.1.7 | 128 | 1/29/2023 |
1.1.6 | 156 | 1/19/2023 |
1.1.5 | 126 | 1/18/2023 |
1.1.4 | 135 | 1/16/2023 |
1.1.3 | 128 | 1/16/2023 |
1.1.2 | 124 | 1/16/2023 |
1.1.1 | 477 | 12/30/2022 |
1.1.0 | 145 | 12/20/2022 |
1.0.17 | 124 | 12/9/2022 |
1.0.16 | 242 | 12/4/2022 |
1.0.15 | 120 | 11/27/2022 |
1.0.14 | 114 | 11/23/2022 |
1.0.13 | 116 | 11/22/2022 |
1.0.12 | 113 | 11/20/2022 |
1.0.11 | 117 | 11/15/2022 |
1.0.10 | 109 | 11/15/2022 |
1.0.9 | 121 | 11/13/2022 |
1.0.8 | 144 | 11/6/2022 |
1.0.7 | 123 | 11/4/2022 |
1.0.6 | 111 | 11/4/2022 |
1.0.5 | 119 | 11/2/2022 |
1.0.4 | 105 | 11/1/2022 |
1.0.3 | 111 | 11/1/2022 |
1.0.2 | 107 | 11/1/2022 |
1.0.1 | 128 | 11/1/2022 |
1.0.0 | 160 | 11/1/2022 |
Updated CommunityToolkit, increases speed slightly.
Fixed some DangerousUtilities.
Refactored adding of entities to be faster.
Introduced Signature for improved performance.
Added MemoryMarshal.CreateSpan in some places for improved performance.
Introduced breaking changes by renaming Group to Component and several other small changes.
Updated Arch.LowLevel.
Improved performance of almost all operations.
Refatored QueryDescription, use the constructor or generics now instead.
Improved ASM-Code generation for improved performance for smaller querys.
Removed several methods from arch to slim down the core.