friflo ECS
Friflo ECS is a high performance C# ECS with focus on simplicity and reliability.
The library is designed for easy integration and a smooth developer experience.
Among various C# ECS projects, it is currently the only one fully implemented in Managed C#.
By this no use of unsafe code preventing crashes due to memory corruption.
What is ECS - Entity Component System?
An ECS is a software architecture pattern. See [ECS ⋅ Wikipedia](https://en.wikipedia.org/wiki/Entity_component_system). It is often used in the Gaming industry - e.g. Minecraft - and used for high performant data processing. An ECS provide two strengths:-
It enables writing highly decoupled code. Data is stored in Components which are assigned to objects - aka Entities - at runtime.
Code decoupling is accomplished by dividing implementation in pure data structures (Component types) - and code (Systems) to process them. -
It enables high performant system execution by storing components in continuous memory to leverage CPU caches L1, L2 & L3.
It improves CPU branch prediction by minimizing conditional branches when processing components in tight loops.
Highlights
- 🔥 Top Performance - C/C++/Rust speed and memory efficiency. Various benchmarks below.
- 🧩 Bare Essentials - Provide only ECS core concepts: components, tags, relations and systems. Thats it!
- 🎯 Simple - Clean & Simple API. No boilerplate. Check the Documentation with many examples.
- 🛡️ Reliable - Built for production. Fully Managed C# - No unsafe code. High test coverage.
- 🙏 Community - Helpful and welcoming support on Discord and Github.
Features
🚀 New in v3.5.0
Map components to enums
and Map tags to enums.
Introduced new pattern to process events on adding/removing components or tags more performant and concise.
🚀 New in v3.6.0
New feature: Query Generator
Generates high-performance query code and reduces boilerplate code to a minimum.
- [x] High performant / type-safe queries
- [x] Efficient multithreaded queries
- [x] Fast batch / bulk operations
- [x] Command buffers aka deferred operations
- [x] Clone / Copy entities
- [x] Entity hierarchy aka scene tree
- [x] Relationships and relations
- [x] Component Search in O(1)
- [x] Entity / component events
- [x] Allocation free enumerators
- [x] Systems and groups
- [x] JSON Serialization
- [x] SIMD Support
- [x] Type-safe Add/Remove/Get component. No potential memory corruption like in Arch.
- [x] Single library. No exclusive feature combinations such as events, assertions or debug/release.
- [x] Zero allocations after buffers are large enough.
- [x] Automatic component type registration
- [x] Supports .NET Standard 2.1 .NET 5 .NET 6 .NET 7 .NET 8 .NET 9 .NET 10 WASM / WebAssembly, Unity (Mono, AOT/IL2CPP, WebGL), Godot, MonoGame
- [x] Native AOT
- [x] CLS Compliant API - supporting all .NET languages: C#, F#, VB.NET, ...
- [x] Debug Tools: Watch entities, components, tags, relations, query results, systems, ...
Screenshot - Watch ad-hoc query result in debugger
- [x] Fully Managed C#. No unsafe code,
native dll bindings and access violations.
Behavior of access violation bugs using unsafe code
Get package on nuget or use the dotnet CLI.
dotnet add package Friflo.Engine.ECS
Projects using friflo ECS
Vanguard Tides

A survivors-like game exploiting the strength of ECS controlling a very high amount of AI units.
A Godot MultiMesh is used to enable reliable 2000 FPS.
It uses a single MultiMeshInstance2D node with a single material and shader.
Louis Adventure
Play in Browser
Tech Demo of a 2D platformer with focus on movement mechanics.
ECS is used for core game logic, component-base abilities, physics / collisions & triggers,
state machines / behavior logic, gameplay events and UI integration. more ...
RaygueLike Challenge

Play in Browser ·
GitHub
Project is hosted on GitHub and supports Desktop and WASM.
Rendering of 3D environment and 2D sprites is implemented with Raylib.
Interesting note: It combines behavior trees with ECS. more ...
Horse Runner DX

Quote from developer: "Just wanted to let you know that Friflo ECS 2.0.0 works like a charm in my little game.
I use it for basically everything (landscape segments, vegetation, players, animations, collisions and even the floating dust particles are entities).
After some optimization there is no object allocation during gameplay - the allocation graph just stays flat - no garbage collection."
Want to add a project?
Create a GitHub Discussion or message on Discord.
Demos
MonoGame Demo is available as WASM / WebAssembly app. Try Demo in your browser.
Demo projects on GitHub below.
![]() |
![]() |
![]() |
||||||
| MonoGame | Unity | Godot |
| friflo | Flecs.NET | TinyEcs | Arch | fennecs | Leopotam | DefaultEcs | Morpeh | |
|---|---|---|---|---|---|---|---|---|
| Ratio | 1.00 | 2.55 | 3.42 | 6.96 | 19.02 | 2.57 | 3.81 | 21.09 |
ECS.CSharp.Benchmark
Performance comparison using popular ECS C# benchmark on GitHub.
Two benchmarks - subset of GitHub ⋅ Ecs.CSharp.Benchmark + PR #38
running on a Mac Mini M2.
See Benchmark results.
You Like this project?
Leave a ⭐ at friflo ECS
License
This project is licensed under MIT.
Friflo.Engine.ECS
Copyright © 2026 Ullrich Praetz - https://github.com/friflo


