CoreECS 1.5.1

dotnet add package CoreECS --version 1.5.1
                    
NuGet\Install-Package CoreECS -Version 1.5.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoreECS" Version="1.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreECS" Version="1.5.1" />
                    
Directory.Packages.props
<PackageReference Include="CoreECS" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoreECS --version 1.5.1
                    
#r "nuget: CoreECS, 1.5.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CoreECS@1.5.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoreECS&version=1.5.1
                    
Install as a Cake Addin
#tool nuget:?package=CoreECS&version=1.5.1
                    
Install as a Cake Tool

<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 ISystemOnCreate / 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 BeginTickTick(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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.1 125 5/21/2026
1.5.0 102 5/20/2026
1.4.4 100 5/19/2026
1.4.3 122 4/4/2026
1.4.2 111 3/29/2026
1.4.1 107 3/29/2026
1.4.0 126 3/26/2026
1.3.2 111 2/25/2026
1.3.1 120 2/16/2026
1.3.0 120 2/3/2026
1.2.0 118 2/2/2026
1.1.0 124 2/1/2026
1.0.0 128 2/1/2026