CoreECS 1.5.1
dotnet add package CoreECS --version 1.5.1
NuGet\Install-Package CoreECS -Version 1.5.1
<PackageReference Include="CoreECS" Version="1.5.1" />
<PackageVersion Include="CoreECS" Version="1.5.1" />
<PackageReference Include="CoreECS" />
paket add CoreECS --version 1.5.1
#r "nuget: CoreECS, 1.5.1"
#:package CoreECS@1.5.1
#addin nuget:?package=CoreECS&version=1.5.1
#tool nuget:?package=CoreECS&version=1.5.1
<div align="center">
CoreECS
State-first Entity–Component–System toolkit for C# games
English · 简体中文
Lightweight ECS you can embed beside Unity ECS or other stacks — built around ComponentStore, EntityGraph, and structural-change collectors.
Quick Start Guide · 快速入门(中文) · License · NuGet
</div>
Features
| Area | Highlights |
|---|---|
| Architecture | ComponentStore + EntityGraph for flexible, compact component storage |
| State-first | EntityCollector with Flush(), Matching / Clashing / Changed buffers |
| Queries | Fluent EntityMatcher (OfAll, OfAny, OfNone, mask filtering) |
| Components | RO / RW refs, optional OnCreate / OnDestroy, extension helpers |
| Systems | Ordered execution, TickGroup masks, constructor DI via IInjectionProxy |
| Targets | net8.0 and netstandard2.1 |
Installation
dotnet add package CoreECS
Requires .NET 8 SDK (see global.json for SDK pinning).
git clone https://github.com/Cardidi/CoreECS.git
cd CoreECS
dotnet build
dotnet test
New to the API? Follow the Quick Start Guide — world lifecycle, components, systems, matchers, collectors, and a full sample.
At a Glance
using CoreECS;
var world = new World();
world.Startup();
world.RegisterSystem<MovementSystem>();
var entity = world.CreateEntity();
entity.CreateComponent(new PositionComponent { X = 0, Y = 0 });
entity.CreateComponent(new VelocityComponent { X = 10, Y = 5 });
world.BeginTick();
world.Tick();
world.EndTick();
world.Shutdown();
See docs/QUICK_START.md for collectors, flags, matchers, and DI setup.
Why a Toolkit, Not a Framework?
Game logic often repeats across genres and budgets — card games, RPGs, multiplayer, indie prototypes. A monolithic framework can steer design toward “does the framework support X?” instead of “what does the game need?”
CoreECS grew from a turn-based card project that needed predictable state and change tracking, while Unity ECS handled high-throughput simulation. Unity ECS is strong on performance but rigid for state-driven workflows; CoreECS fills that gap as a loosely coupled toolkit you compose where it fits — simulation helper, state guardian, or standalone ECS loop.
Key Concepts
| Concept | Role |
|---|---|
| Entity | Stable id grouping components (Entity struct over ulong) |
| Component | Data struct (IComponent<T>), logic lives in systems |
| System | ISystem — OnCreate / OnTick / OnDestroy |
| World | Lifecycle, entities, components, systems, collectors |
| Matcher | EntityMatcher filters by components and entity mask |
| Collector | Tracks matcher matches; defers buffers until Flush() |
| InjectionProxy | DI for system constructors (RegisterServices) |
| Tick | BeginTick → Tick(mask) → EndTick |
| Mask | Bit flags on entities/systems for filtered ticks and queries |
Documentation
| Document | Description |
|---|---|
| Quick Start Guide | Full tutorial (English): 11 sections from world setup to complete example |
| 快速入门指南 | 完整教程(中文) |
| README(中文) | 项目说明中文版 |
| AGENTS.md | Build commands and contributor notes for agents/CI |
Project Layout
CoreECS/
├── ECS/ # CoreECS library (net8.0 + netstandard2.1)
├── Test/ # NUnit tests
├── docs/ # Guides (Quick Start, …)
├── README.md # English (this file)
└── README.zh-CN.md # 简体中文
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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
- Microsoft.Extensions.DependencyInjection (>= 10.0.8)
-
net8.0
- Microsoft.Extensions.DependencyInjection (>= 10.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.