r/EntityComponentSystem • • Jun 29 '25

Flecs v4.1, an Entity Component System for C/C++/C#/Rust is out!

Thumbnail
ajmmertens.medium.com
27 Upvotes

Hi all! I just released Flecs v4.1.0, an Entity Component System for C, C++, C# and Rust! 

This release has lots of performance improvements and I figured it’d be interesting to do a more detailed writeup of all the things that changed. If you’re interested in reading about all of the hoops ECS library authors jump through to achieve good performance, check out the blog!


r/EntityComponentSystem • • Sep 14 '24

Building an ECS: Storage in Pictures

Thumbnail
ajmmertens.medium.com
22 Upvotes

r/EntityComponentSystem • • Jul 14 '24

Flecs v4, an Entity Component System for C/C++ is out!

Thumbnail
ajmmertens.medium.com
21 Upvotes

r/EntityComponentSystem • • Jun 07 '23

Why it is time to start thinking of games as databases

Thumbnail
ajmmertens.medium.com
19 Upvotes

r/EntityComponentSystem • • Aug 03 '22

Flecs 3, an Entity Component System for C/C++ is out!

Thumbnail
ajmmertens.medium.com
19 Upvotes

r/EntityComponentSystem • • Dec 30 '24

Procedural scene created entirely from primitive shapes in flecs script

17 Upvotes

r/EntityComponentSystem • • Jul 17 '25

Yet another hobby ECS library: LightECS (looking for feedback)

15 Upvotes

Hi everyone :)

I wanted to ask you if you could give me some feedback and advice on my project. https://github.com/laura-kolcavova/LightECS

This is only self-educational hobby project and it doesn`t bring anything new what popular ECS libraries already implemented. Also I suspect there can be performance limitations caused by data structures and types I have chosen.

To test it out I used the library to develop simple match-3 game in MonoGame https://github.com/laura-kolcavova/DiamondRush (src/DiamondRush.MonoGame/Play)

If you have time I would love some thoughts on whether I am using ECS pattern correctly (I know I should favor structs instead of classes (class records) for components but I can`t just help myself :D)

I am still new to game development - my background is mostly in web applications with .NET - so this is probably pretty different from APIs and database calls - I am probably applying some patterns that are not ideal for game development but I believe the best way how to learn things is trying to develop stuff by ourselves - and this has been a really fun and I am happy to learn something new.

Thanks in advance for taking a look :)


r/EntityComponentSystem • • Mar 27 '23

Flecs 3.2, an Entity Component System for C/C++ is out!

Thumbnail
ajmmertens.medium.com
15 Upvotes

r/EntityComponentSystem • • Oct 11 '23

Best practices of ECS usage that your team discovered from experience?

14 Upvotes

I have been working with the Entity-Component-System pattern in various forms for many years. I feel like it's in general cleaner that most other approaches, because game logic is "flattened" into a list of top-level systems instead of being deeply nested in class hierarchies, and this makes it more discoverable. It helps avoid weird chicken-and-egg problems like "should the character run logic for picking up an item, or should the item handle being picked up instead?", which also makes it easier for new people joining the team to find where interactions between multiple entities are handled. Performance has always been a secondary factor for choosing ECS to me, clarity and good architecture usually come first.

However, it's pretty easy to write conflicting systems that overwrite each other's results: for example, movement, physics, "floating on waves", knockback, and many other systems may want to modify the speed and position of a character. Debugging their execution order is definitely not something we want to spend time on. So one thing we have converged on is that most components can be read by many systems, but should only ever be written to by one "owning" system. If another system needs to modify a character's position, it dispatches an event, which is then taken into account by the physics system.

I would love to hear about other best practices you have discovered for using ECS in projects with large teams!


r/EntityComponentSystem • • Jul 21 '21

EnTT v3.8.0 is out: Gaming meets Modern C++

Thumbnail self.gamedev
14 Upvotes

r/EntityComponentSystem • • Jan 09 '21

EnTT v3.6.0 is out: Gaming meets Modern C++

Thumbnail self.gamedev
14 Upvotes

r/EntityComponentSystem • • Mar 15 '26

friflo ECS v3.5 - Entity Component System for C#. New feature: Component / Tag mapping - for O(1) event handling

Post image
13 Upvotes

Just released a new feature to friflo ECS.
If you're building games with data-heavy simulations in .NET take a look on this project.

GitHub: https://github.com/friflo/Friflo.Engine.ECS
Documentation: friflo ECS ⋅ gitbook.io

This release introduced a new pattern intended to be used in event handlers when components/tags are added or removed.
The old pattern to handle specific component types in v3.4 or earlier was:

store.OnComponentAdded += (change) =>
{
    var type = change.ComponentType.Type;
    if      (type == typeof(Burning))  { ShowFlameParticles(change.Entity); }
    else if (type == typeof(Frozen))   { ShowIceOverlay(change.Entity); }
    else if (type == typeof(Poisoned)) { ShowPoisonIcon(change.Entity); }
    else if (type == typeof(Stunned))  { ShowStunStars(change.Entity); }
};

The new feature enables to map component types to enum ids.
So a long chain of if, else if, ... branches converts to a single switch statement.
The compiler can now create a fast jump table which enables direct branching to specific code.
The new pattern also enables to check that a switch statement is exhaustive by the compiler.

store.OnComponentAdded += (change) =>
{
    switch (change.ComponentType.AsEnum<Effect>())
    {
        case Effect.Burning:  ShowFlameParticles(change.Entity);  break;
        case Effect.Frozen:   ShowIceOverlay(change.Entity);      break;
        case Effect.Poisoned: ShowPoisonIcon(change.Entity);      break;
        case Effect.Stunned:  ShowStunStars(change.Entity);       break;
    }
};

The library provides top performance and is still the only C# ECS fully implemented in 100% managed C# - no unsafe code.
The focus is performance, simplicity and reliability. Multiple projects are already using this library.
Meanwhile the project got a Discord server with a nice community. Join the server!

Feedback welcome!


r/EntityComponentSystem • • Apr 08 '22

I wrote a blog on how to build games with Entity Relationships in ECS

Thumbnail
ajmmertens.medium.com
13 Upvotes

r/EntityComponentSystem • • Jan 22 '21

Flecs v2.3 (and v2.2), an Entity Component System for C/C++ is out!

Thumbnail
ajmmertens.medium.com
13 Upvotes

r/EntityComponentSystem • • Sep 04 '23

Introducing Graphecs: the graph-first reactive ECS

12 Upvotes

Hey folks! While using graph data structures and databases to solve various problems over the years, I've had some ideas to apply them to game design and development.

https://www.gravity4x.com/graphecs-the-graph-first-entity-component-system/

Very different take on edges ("entity relationships") than Flecs but definitely taken a lot of inspiration from the challenges Sander Mertens has laid out.

Still early and changing rapidly, so questions, comments, and feedback are especially welcome!


r/EntityComponentSystem • • Nov 15 '22

Happy Cakeday, r/EntityComponentSystem! Today you're 5

12 Upvotes

r/EntityComponentSystem • • Nov 09 '22

EnTT v3.11.0 is out: Gaming meets Modern C++

Thumbnail self.gamedev
12 Upvotes

r/EntityComponentSystem • • Aug 09 '22

Building an ECS #1: Where are my Entities and Components

Thumbnail
ajmmertens.medium.com
12 Upvotes

r/EntityComponentSystem • • Apr 15 '22

EnTT v3.10.0 is out: Gaming meets Modern C++

Thumbnail self.gamedev
12 Upvotes

r/EntityComponentSystem • • Dec 21 '21

EnTT v3.9.0 is out: Gaming meets Modern C++

Thumbnail
self.gamedev
12 Upvotes

r/EntityComponentSystem • • Sep 26 '21

Agent actions as entities

Thumbnail
coffeebraingames.wordpress.com
12 Upvotes

r/EntityComponentSystem • • Nov 15 '20

Happy Cakeday, r/EntityComponentSystem! Today you're 3

12 Upvotes

r/EntityComponentSystem • • Jun 23 '26

Building an ECS: Data Oriented HIerarchies

Thumbnail ajmmertens.medium.com
11 Upvotes

New blog on why & how to integrate hierarchies with an ECS!


r/EntityComponentSystem • • Dec 18 '24

Friflo.Engine.ECS v3.0.0 - C# Entity Component System - Out now!

11 Upvotes

Published v3.0.0 on nuget after 6 months in preview.
New features are finally completed.

Check out friflo ECS · Documentation.

New features in v3.0.0

  • Index / Search used to search entities with specific component values in O(1). E.g

    • to lookup entities having a struct TileComponent { int tileId; } with a specific tileId.

    • to lookup network entities having a struct NetComponent { Guid netId; } with custom types like Guid,long or a string.

  • Relationships to create links between entities.

  • Relations to add multiple "components" of the same type to a single entity.


r/EntityComponentSystem • • Jun 14 '24

fennecs - a tiny, high-energy ECS for modern C#

Thumbnail
fennecs.tech
11 Upvotes