dddplus-archetype
⚡️ A maven archetype that generates a complete DDDplus driven project skeleton. 自动生成集成DDDplus的工程脚手架代码
- 53
- Java
- Apache-2.0
- 6 y ago
High-performance, allocation-free archetype ECS for C# and .NET 10: game servers, Godot 4 games, simulations and real-time backends. Source-generated [ForEach] jobs with auto-vectorized SIMD loops, safe parallelism, change tracking, indexes, saves, Native AOT. 100k entities across 9 systems: 1.72 ms, 0 B per tick.
Repo JasonXuDeveloper/EasyEcs, read from GitHub 14 h ago. JasonXuDeveloper has not joined Take My Repo.
JasonXuDeveloper/EasyEcs is a public repo on GitHub by JasonXuDeveloper. High-performance, allocation-free archetype ECS for C# and .NET 10: game servers, Godot 4 games, simulations and real-time backends. Source-generated [ForEach] jobs with auto-vectorized SIMD loops, safe parallelism, change tracking, indexes, saves, Native AOT. 100k entities across 9 systems: 1.72 ms, 0 B per tick. It declares the MIT license on GitHub. It is written mainly in C#, has 45 stars and last changed on 2026-11-21. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
EasyEcs is a high-performance archetype Entity Component System (ECS) for C# and .NET 10,
for anything that updates many entities every frame or tick: game servers, Godot 4 games, simulations and real-time
backends. It runs a Minecraft-style server (chunks, flowing
water, zombies, replication) and a Godot 4 game the same way. A warmed-up world of 100,000 entities runs nine simulation
systems in 1.72 ms with 0 B allocated. Across 37 head-to-head benchmarks against Friflo.Engine.ECS, Arch and
DefaultEcs, EasyEcs leads in 24, is within measurement error in 11 and trails in 2
(full comparison). Write plain structs and
[ForEach] methods; a source generator builds the iteration jobs and an analyzer catches mistakes at compile time.
Documentation: ecs.xgamedev.net (English · 中文)
Try it in your browser: set the live particle demo to 100k, then
move your pointer across the particles. The demo's C# runs through Mono AOT to WebAssembly; its batched drag and
movement systems took about 0.1 ms on an M4 during this capture. The rest of the systems and rendering are separate
from that reading. The batch system source shows the
[ForEach] + Span + SIMD path.
One server tick of 9 systems (movement, AOI, combat, status effects, death, respawn, projectiles):
| Tick | Entities | Time | Allocated |
|---|---|---|---|
| One world | 100,000 | 1.72 ms | 0 B |
| Four worlds, one per thread | 100,000 | 0.92 ms | 0 B |
| Battle server, every feature | 100,000 | 2.97 ms | 0 B |
BenchmarkDotNet 0.15.2 (EasyEcs.Benchmark), 4-core Intel Xeon VM at 2.1 GHz (Ubuntu 24.04), .NET 10.0.13; entities spawn, die, gain and lose components every tick.
The battle server turns every feature on: parallel steering and systems, replication, indexes, relations, timings.
A [ForEach] system adding Velocity to Position costs 0.9 ns per entity (one archetype), faster than two
plain arrays.
Details.
dotnet add package EasyEcs # net10.0 · source generator, analyzer and Nino included
[ForEach] method is the whole system; filters are attributes
([With<T>], [Without<T>], [WithAny<T>]), singletons are parameters, and attributes on a type declare what it is
([Sum] for a total, [UniqueKey] for an index key, [Group], [UpdateInterval(n)] on a system): the generator
writes the rest.[ForEach] method over numbers becomes a vector loop,
the way Burst compiles a job, with the same results bit for bit. Parallel = true spreads it over the cores, and its
parameters do the work that usually needs locks: Reduce<T> for totals, Emit<T> for records out of a pass,
Lookup<T> for other entities, Scratch<T> for working memory, EntityRandom for random numbers that do not depend
on the thread count. A grid (water, light, heat) is shaded like a GPU draws: tiles, a halo, a stencil.[Changed<T>] visits only the rows written
since a system last ran, including writes through ref (or only the rows whose value changed, through Mut<T>),
[ChangedAny<A, B>] those where any of several changed, [Removed<T>] the entities that lost a component, and a
destroy log the entities destroyed since each client's tick;
IIndexed<TKey> components are found by value, and an IIndexed<EntityId> component or an IRelation buffer
(Link) makes a relation, kept current by every Set.
No events and nothing to keep in sync by hand.Prefab is a recipe of component values that belongs to no world:
world.Instantiate(prefab) spawns from it (a whole wave in one pass), and no system ever has to filter templates
out. entity.Clone() copies a living entity.[ForEach] methods and systems, class components, stateful systems, systems that reference each other,
parallel code that would race, writes through read-only parameters, copied dynamic buffers, structural changes off
the owner thread, indexed components written behind their index's back and ordering cycles. It also names the code
that works but costs: a method that lost its vector loop and why, per-row lookups, allocations per update, a
hand-written total, key or job that an attribute or a parameter declares.[UpdateBefore<T>] /
[UpdateAfter<T>] say otherwise; system groups give you
separate cadences (input on every wake, simulation on a fixed tick).Every feature has a guide page with a full example; Features lists them all with what each costs and when to use it, and API and complexity lists every call.
[ForEach] methods with filters, Maybe<T>,
batch methods, slices, [UpdateInterval], [Consume], groups, ordering and generic systems;
ad-hoc queries and struct jobs, [ForEntity] for one entity.[Changed<T>], [ChangedAny<..>], Mut<T>,
[Removed<T>] and the destroy log.[ForEach] methods, Native AOT.Data is plain structs, each system is one [ForEach] method, and systems cooperate only through the data they write:
using EasyEcs;
public record struct Position(float X, float Y) : IComponent;
public record struct Velocity(float X, float Y) : IComponent;
public record struct Health(int Value) : IComponent, ITracked; // tracked: rows record their last write
public struct Dead : IComponent; // a tag
public record struct Clock(float Dt) : ISingletonComponent; // one value per world
[EcsSystem]
public ref struct MovementSystem
{
[ForEach, Without<Dead>] // in reads, ref writes
static void Move(ref Position p, in Velocity v, in Clock clock)
{
p.X += v.X * clock.Dt;
p.Y += v.Y * clock.Dt;
}
}
[EcsSystem, UpdateAfter<MovementSystem>] // registration order otherwise
public ref struct DeathSystem
{
[ForEach, Without<Dead>, Changed<Health>] // only healths written since its last run
static void Die(Entity unit, in Health hp)
{
if (hp.Value <= 0) unit.SetDead(); // immediate: later systems see it this tick
}
}
The host owns the world and ticks it:
using var world = new World();
world.SetClock(1 / 30f); // singletons before the first update
world.AddSystem<MovementSystem>();
world.AddSystem<DeathSystem>();
var hero = world.CreateEntity(new Position(0, 0), new Velocity(1, 0), new Health(100));
world.Update(); // 0 B per update once warmed up
hero.SetHealth(0); // a tracked write: DeathSystem sees it
world.Update();
System.Console.WriteLine(hero.IsDead); // True
A full battle server uses every feature (parallel steering, replication by change tracking and removal detection, NPC kinds as prefabs, bags of loot in dynamic buffers, indexes, relations, snapshots, system groups, struct jobs) in one world; it is the battle server benchmark below and the world of the scenario tests. The step-by-step tutorial is Getting started.
| Good fit | Probably not |
|---|---|
| Game servers and simulations on .NET 10: MMO maps and zones, AOI, combat, voxel worlds, grids of water or heat | Unity or other runtimes below .NET 10 (net10.0 only; Unity support is being evaluated) |
Godot 4 .NET games: the project targets net10.0 (sample) |
|
| Worlds where state flips constantly (buffs, deaths, spawns): structural changes are immediate and cheap | Code that needs structural changes recorded from many threads at once (use one owner thread and a queue) |
| Long-running processes where GC pauses and unbounded growth matter | Code that wants objects with behavior, or systems calling each other |
One world per thread, many worlds per process; ParallelSystems for heavy independent systems |
Many threads mutating one world's component values without coordination |
BenchmarkDotNet 0.15.2 with the repository's job (BenchmarkConfig.cs), 4-core Intel Xeon VM at 2.1 GHz (Ubuntu 24.04), .NET 10.0.13, project EasyEcs.Benchmark. The headline benchmark is a realistic server tick,
not a toy loop (what it simulates). "Allocated" is per tick.
| Benchmark | Entities | Mean | Allocated |
|---|---|---|---|
| WorldSimulationBenchmark.Tick | 10,000 | 158 μs | 0 B |
| WorldSimulationBenchmark.Tick | 100,000 | 1.72 ms | 0 B |
| MultiWorldBenchmark.TickAllWorlds (4 worlds × 25k) | 100,000 | 0.92 ms | 0 B |
| BattleServerBenchmark.Tick (the battle server example, every feature) | 100,000 | 2.97 ms | 0 B |
More benchmarks, the micro benchmarks and how to run them are in Performance:
dotnet run -c Release --project benchmarks/EasyEcs.Benchmark -- --filter '*'
37 head-to-head benchmarks (project EasyEcs.Comparison, same VM) port the same work to Friflo.Engine.ECS 3.6, Arch
2.1 and DefaultEcs 0.17, each library its own idiomatic way, and check in setup that every library computes the same
result. EasyEcs is faster in 24, within the measurement error in 11 and slower in 2. "Its time vs EasyEcs" is the
time of the fastest other library over the time of EasyEcs (2× = it takes twice as long); the site sorts the same
data live (feature by feature).
Clear leads, where the next-fastest library takes at least 1.25 times as long:
Close, EasyEcs ahead by less than that. The full server tick is one of these: most of a tick is iteration over dense columns, bound by memory more than by the library, and Arch and DefaultEcs take 3.42× and 3.71× as long there and allocate 535 KB and 61 KB per tick (EasyEcs and Friflo: 0 B):
Where another library is faster, with the reason from the benchmark's source:
| What is measured | EasyEcs | Faster library | Its time vs EasyEcs | Why |
|---|---|---|---|---|
| Iterate three components over 100,000 entities | 71.0 μs | Friflo.Engine.ECS 70.7 μs | 0.99× (within error) | The same span loop over the same dense columns in both libraries: the loop is bound by memory, not by the library. |
| Add and remove a tag in the passes that find them (10 of 100,000) | 78.2 μs | Friflo.Engine.ECS 75.4 μs | 0.96× (within error) | Friflo defers the changes to its command buffer, so both of its passes are plain span loops. A [ForEach] that may change structure checks after every row that its table did not move, and over 100,000 rows that costs more than 10 deferred changes; from about 1,000 changes on, applying them at once is faster. |
| Iterate in batches, reading entity ids only where needed | 38.5 μs | Friflo.Engine.ECS 37.0 μs | 0.96× (within error) | The same loop over the same rows: Friflo's is written inline in the benchmark, EasyEcs' is generated from a batch [ForEach] method and runs as a system group. |
| Steer 100,000 agents on all cores (parallel query) | 766 μs | Arch 685 μs | 0.89× (within error) | Arch's and Friflo's runners keep worker threads of their own, which win when passes run back to back, as BenchmarkDotNet runs them. EasyEcs wakes thread-pool helpers only while they pay: in a real server tick a dedicated crew measured worse tail latency and more CPU per tick (D22). |
| Scan 100,000 entities for the 1,000 written, without a change filter | 61.4 μs | Friflo.Engine.ECS 53.7 μs | 0.88× | Not the way to do it in EasyEcs: the component is ITracked, so each of the 1,000 writes also stamps its row's change tick, which [Changed<T>] needs and the scan ignores; Friflo's component is not tracked. [Changed<T>] does the same job faster than every library's scan. |
| Find the 10 of 100,000 entities that lost a component | 830 ns | Friflo.Engine.ECS 697 ns | 0.84× (within error) | Friflo's OnComponentRemoved event pushes each id into a list you keep as the removal happens, a cost per removal; [Removed<T>] finds the removals through per-block summaries, a fixed cost per pass that 10 removals do not cover. From 1,000 removals on, EasyEcs leads, with no subscription to write. |
| Create 100,000 three-component entities one by one in a fresh world, nothing reserved | 7.13 ms | Arch 4.77 ms | 0.67× | A fresh EasyEcs world grows its table and entity storage by doubling, and the arrays past 85,000 bytes land on the large object heap; together they pass the budget that sets off a full collection, once per new world (D28). Arch keeps entities in 16 KB chunks, which never reach that heap. Reserve the table with Reserve<T1..Tn>(count) or create the entities with CreateEntities, and EasyEcs is the fastest of the four. |
What each library has built in:
| EasyEcs | Friflo.Engine.ECS | Arch | DefaultEcs | |
|---|---|---|---|---|
| Structural changes inside a query loop, applied at once | ✅ | ❌ command buffer | ⚠️ unguarded | ⚠️ unsafe |
| Change tracking ("rows written since") | ✅ | ❌ | ❌ | ✅ explicit notify |
| Removal detection ("entities that lost a component since") | ✅ | ⚠️ events | ⚠️ events or a marker tag | ✅ WhenRemoved sets |
| Prefabs and cloning | ✅ prefabs outside the world, Clone |
⚠️ clone an entity of the store | ❌ | ⚠️ CopyTo an entity |
| Value index | ✅ | ✅ | ❌ | ✅ |
| Relations with reverse lookup | ✅ | ✅ | ❌ | ❌ |
| In-memory world snapshot | ✅ | ❌ | ❌ | ❌ |
| Systems, groups, parallel systems | ✅ | ✅ (no parallel systems) | ❌ core | ✅ |
| Source-generated systems + analyzer | ✅ | ❌ | ❌ | ❌ |
| 0 B per tick | ✅ | ✅ | ❌ | ❌ |
| Events | ❌ (state is data) | ✅ | ✅ | ✅ |
| Serialization | ✅ Save / Load (Nino) |
✅ JSON | ❌ | ✅ text, binary |
| Godot 4 (.NET) | ✅ net10.0 project | ✅ | ✅ | ✅ |
| Unity / netstandard | ❌ net10.0 | ✅ | ✅ | ✅ |
The documentation lives at ecs.xgamedev.net; its sources are the markdown files in
docs/content.
| Getting started | Step-by-step tutorial: entities, components, tags, queries, systems, singletons, groups, the update loop. |
| Features | Every feature: what it does, when to use it, when not, what it costs, which scenarios it serves. |
| Comparison | Features and benchmarks against Friflo.Engine.ECS, Arch and DefaultEcs. |
| Guide | One page per concept: entities and components, prefabs and cloning, queries, systems, singletons, structural changes, change tracking and removal detection, dynamic buffers, indexes and relations, hierarchy, groups, cleanup and disable, bulk changes, snapshots, saves, migration and unloading, ref and await, threading, high-performance code, grids, hosting, testing, troubleshooting, analyzer rules. |
| ECS principles | How to design features with entities, components, singletons and systems. |
| Design questions | Why there are no events, what is thread-safe, how to change a component. |
| Samples | Runnable programs in learning order: hello world, a game loop, saving and loading, one world per thread, hot reload, actors, a Minecraft-style server, a Godot project. |
| API reference | Every public API with its complexity. |
| Performance guide | Which API to use when, do's and don'ts, benchmarks. |
| Architecture | Storage, memory layout, archetypes, id recycling, iteration safety, generators. |
| Migration guide | What to change when upgrading: between 4.x releases, from v3 to v4 and from v2 to v3. |
The documentation index suggests a reading order.
[EcsSystem] ref struct of static methods: [ForEach] methods and
[OnCreate] / [OnUpdate] / [OnDestroy] hooks that take the World or the system's SystemHandle when they need
them. No object per system, no virtual call: an assembly's systems run through one generated switch, and a generated
pass finds its query by its job type. Classes deriving from EcsSystem change (a code change, with a code fix on
the compiler's error: see the migration guide), and
EECS074 to EECS077 keep the new form (systems).[ForEach] method over numbers runs as a vector loop the generator writes from its
body, the way Burst compiles a job, with the same results bit for bit: components of 1 to 4 fields, narrow lanes
(byte, short), Vector2 / Vector3 / Vector4 fields, Maybe<T> parameters, parallel methods, totals into a
Reduce<T> of [Sum] / [Min] / [Max] fields, and on AVX-512 components of up to 16 words. EECS055 names why a method stayed scalar, SimdMode = SimdMode.Require makes
that a build error, and FloatMode.Fast takes the vector approximations of Sin, Exp and the rest
(vector loops).[ForEach] parameters do per chunk what shared state would do with locks:
Reduce<T> for totals (OpenMP's reduction), Emit<T> for records a later system applies, Lookup<T> to read
other entities, Scratch<T> for a thread's working memory, EntityRandom for random numbers that are the same on
any number of threads; world.ForParallel runs a loop over other data on the same threads, and ChunkRows spreads
a few heavy rows (threading). EECS060 and EECS061
report parallel code that races, EECS086 to EECS089 a hand-written version of these parameters.Tile<TCell, TTile>:
the generator finds the neighbors, Pad adds their edges (the halo, as wide and with as many neighbors as the
stencil reads), and quiet tiles sleep until an edge beside them changes; IDirectIndexed<TKey> finds a tile by one
array read (grids).[Sum], [Min], [Max] and the others on a singleton's fields declare a
reduction; [IndexKey], [UniqueKey] and [Group] on a member declare an index key or a group; [GroupBy],
[WhenTargetDestroyed] and [NotSaved] on a type declare every world's setup for it
(declared parts).
[UpdateInterval(n, Phase = p)] on a system declares its cadence; [ForEntity] writes the job and the entry point that
run a method on one entity; [Consume] destroys the rows a pass handled
(systems).Reserve(prefab, n) covers index keys, the retired table and
free ids too; DynamicBuffer<T>.FillPool and MaxPooledLength keep the lists of buffers that come and go (chunks
around players) in a pool shared across threads; prefab.SetAbsent<T>() gives instances a column for a state they
enter later, so entering it moves no row; restores and loads reuse what the last one allocated
(prefabs).ReadOnlyMaybe<T>, buffer.SetCount(n), entity.GetOrAdd(value),
SaveEntitiesWithout, world.CollectIds, enum elements in a DynamicBuffer, generic systems closed in another
assembly under Native AOT, <IlcInstructionSet>native</IlcInstructionSet> in the templates for the Vector512
loops, entity.Run(ref job, in filter, since) for a static filter, and the generators do about half the work per
edit. A Mut<T> built by hand for a row of a batch job takes the run's MutColumn
(migration guide).Earlier releases are in the changelog, and what to change when upgrading in the migration guide.
JasonXuDeveloper/EasyEcs is a public repo on GitHub by JasonXuDeveloper. High-performance, allocation-free archetype ECS for C# and .NET 10: game servers, Godot 4 games, simulations and real-time backends. Source-generated [ForEach] jobs with auto-vectorized SIMD loops, safe parallelism, change tracking, indexes, saves, Native AOT. 100k entities across 9 systems: 1.72 ms, 0 B per tick.
It declares the MIT license on GitHub.
Its maker tagged it for Linux. That is declared by the maker; Take My Repo has not tested it.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-21. GitHub counts 0 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
⚡️ A maven archetype that generates a complete DDDplus driven project skeleton. 自动生成集成DDDplus的工程脚手架代码
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Light, fluffy, and always free - The AWS Local Emulator alternative
Community-built comprehensive 2D content creation appplication for graphic design, digital art, and interactive real-time motion graphics powered by a node-based procedural graphics engine

A modern file manager that helps users organize their files and folders.
The solution that allows unity games to update in runtime. 使Unity开发的游戏支持热更新的解决方案。

The fastest binary serializer for C#. Source-generated, zero-allocation, thread-safe and safe on untrusted input: .NET, Native AOT, Unity, Godot and HybridCLR, with Go, Rust and TypeScript writing and reading the same bytes.

A Unity Plugin which enhances productivity for developers who are using Redis.
Python兴趣点(POI)爬虫,通过百度地图API爬取指定城市兴趣点列表,包含其:坐标、名称、联系方式
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/JasonXuDeveloper/EasyEcsTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.