EasyEcs 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package EasyEcs --version 1.0.0
                    
NuGet\Install-Package EasyEcs -Version 1.0.0
                    
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="EasyEcs" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EasyEcs" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="EasyEcs" />
                    
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 EasyEcs --version 1.0.0
                    
#r "nuget: EasyEcs, 1.0.0"
                    
#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.
#addin nuget:?package=EasyEcs&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=EasyEcs&version=1.0.0
                    
Install as a Cake Tool

EasyEcs

build license

An Entity-Component-System library

Why?

Sometimes we may want to remove bidirectional dependencies between our code, and ECS is a good way to do this.

This design pattern offers a clean way to separate the data from the logic, and it's also a good way to improve the performance of our game.

What is ECS?

E - Entity

C - Component

S - System

But what really is it?

Well, as a human, we (entities) live in a world (context), and we have some properties (components). Moreover, we have things to do based on our properties (systems).

Concepts in EasyEcs

  • A Context holds several Entity instances and some System instances.
  • Each Entity has some Component instances.
  • Each Component has only data properties.
  • Each System can filter lots of Entity instances in the same Context by their components and operate logics on them.

Why it removes circular dependencies?

  • Only System contains logics and none of them should depend on each other. (They should only depend on the filtered entities/components)
  • Component only contains data properties and no logics. (Again, no way to have dependency)
  • Entity only contains components. (It is really just a container)

Why is it fast?

  • As a System can operate on a batch of entities with components, we can well utilize the cache of the MMU.
  • We can also easily parallelize the systems to improve the performance, in a multi-core CPU environment.

Anything special in EasyEcs?

  • We have priority for System, so you can control the order of systems.
  • We have frequency for System, so you can control the frequency of systems being executed.
  • We only allow asynchronous interfaces for System and Context, so our ECS should not block the thread (unless you screw up).
  • We have a cool guy who is maintaining this library. (Just kidding)

Example

Just check out the EasyEcs.UnitTest project. I have comments there.

Documentation

Believe me, one day I will make a website for this and document everything.

Product Compatible and additional computed target framework versions.
.NET 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 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

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
2.1.6 172 6/5/2025
2.1.5 138 6/5/2025
2.1.4 141 6/5/2025
2.1.3 131 6/5/2025
2.1.2 132 6/4/2025
2.1.1 135 6/4/2025
2.1.0 137 6/3/2025
2.0.10 140 6/1/2025
2.0.9 134 6/1/2025
2.0.8 91 6/1/2025
2.0.7 89 6/1/2025
2.0.6 129 4/11/2025
2.0.5 129 4/11/2025
2.0.4 132 4/11/2025
2.0.3 186 3/12/2025
2.0.2 202 3/8/2025
2.0.1 220 3/8/2025
2.0.0 213 3/7/2025
1.0.8 109 2/20/2025
1.0.7 102 2/20/2025
1.0.6 98 2/20/2025
1.0.5 118 2/10/2025
1.0.4 104 2/10/2025
1.0.3 107 1/30/2025
1.0.2 101 1/21/2025
1.0.1 103 1/21/2025
1.0.0 106 1/20/2025
0.0.1 96 1/20/2025