r/EntityComponentSystem • • Jul 19 '23

A Roadmap to implementing Entity Relationships

Thumbnail
ajmmertens.medium.com
11 Upvotes

r/EntityComponentSystem • • Apr 01 '23

Running c# system on the GPU

11 Upvotes

if you are bored this weekend, check this out:

https://www.sebaslab.com/svelto-ecs-3-4-internals-how-to-integrate-computesharp/

We know ECS is SIMD and Multithreading friendly, but did you know you could use it to run C# code on the GPU through compute shaders? Now we can with ComputeSharp and Svelto.ECS.

Have fun with the demo included.


r/EntityComponentSystem • • Mar 16 '23

Svelto.ECS 3.4 is out with DOTS ECS update

11 Upvotes

Svelto.ECS 3.4 is out, the main feature is the update of Svelto-On-DOTS to DOTS ECS 1.0.

And here my article on the topic with my early DOTS ECS 1.0 impressions:

https://www.sebaslab.com/svelto-ecs-3-4-svelto-on-dots-ecs-update/


r/EntityComponentSystem • • May 01 '22

Dominion ECS Examples, a roguelike example with a lighting system distributed over multiple threads using the new Scheduler with fork-and-join functionality (link in the first comment)

11 Upvotes

r/EntityComponentSystem • • Feb 26 '22

Made a wip comparison chart for ECS frameworks written and used in C#

Thumbnail
github.com
11 Upvotes

r/EntityComponentSystem • • Feb 11 '22

A new approach to ECS APIs

Thumbnail muit.tech
11 Upvotes

r/EntityComponentSystem • • Oct 09 '21

ECS back and forth: No Policy is the best Policy (aka Introduction to sparse sets and pointer stability, part 2 of 2)

Thumbnail
skypjack.github.io
11 Upvotes

r/EntityComponentSystem • • Aug 18 '21

Flecs 2.4 is out!

Thumbnail
github.com
11 Upvotes

r/EntityComponentSystem • • Jul 07 '20

Preview of Flecs 2, a blazing fast modern ECS for C99

Post image
11 Upvotes

r/EntityComponentSystem • • Jul 14 '25

Archetype-Based ECS Feels Broken in Practice

10 Upvotes

Hi everyone,

I’ve been studying ECS architectures, and something doesn’t quite add up for me in practice.

Let’s say an entity has 10 components. According to archetype-based ECS, this exact set of components defines a unique archetype, and the entity is stored in a chunk accordingly. So far, so good.

But in real-world systems, you rarely need all 10 components at once. For example:

•A MovementSystem might only require Position and Velocity.

•An AttackSystem might need Position and AttackCooldown.

•A RenderSystem might just want Position and Mesh.

This means that the entity will belong to one archetype, but many systems will access only subsets of its data. Also, different archetypes can share common components, which means systems have to scan across multiple archetypes even when querying for a single component.

So here's where my confusion comes in:

•Isn’t the archetype system wasting memory bandwidth and CPU cache by grouping entities based on their full component set, when most systems operate on smaller subsets?

•Doesn’t this fragmentation lead to systems having to scan through many archetypes just to process a few components?

•Doesn’t this break the very idea of cache-friendly, contiguous memory access?

Am I misunderstanding how archetype ECS is supposed to work efficiently in practice? Any insights or real-world experiences would be super helpful. Thanks!


r/EntityComponentSystem • • Nov 30 '24

Bevy 0.15: ECS-driven game engine built in Rust

Thumbnail
bevyengine.org
10 Upvotes

r/EntityComponentSystem • • Jul 11 '24

Just published new GitHub Repo: ECS C# Benchmark - Common use-cases

10 Upvotes

Repository on GitHub
ECS.CSharp.Benchmark - Common use-cases

The Motivation of this benchmark project

  • Compare performance of common uses cases of multiple C# ECS projects.

  • Utilize common ECS operations of a specific ECS project in most simple & performant way. This make this benchmarks applicable to support migration from one ECS to another.

Contributions are welcome!


r/EntityComponentSystem • • Oct 16 '22

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

Thumbnail
ajmmertens.medium.com
10 Upvotes

r/EntityComponentSystem • • Mar 28 '22

Something I don't get about ECS

10 Upvotes

Let's say I have an ECS with physics and I want to kill the player when a arrow hit him. So I have a callback when there is a collision. Now there is of course different behaviour with different collisions with 2 bodies (heal with heart, damage with weapon, etc...) so plenty of combinations of collisions.

I would think in ECS I will check the components each body has and call the appropriate behaviour, but of course the more behaviours I have the more it will cost, because each combination should be checked for each collision.

More generally, don't ECS add more cost when there is more behaviour ? In traditional way, no matter how many different bhaviours you have, you will always pay only one method call.


r/EntityComponentSystem • • Aug 02 '20

ECS back and forth: Sparse sets and EnTT

Thumbnail
skypjack.github.io
10 Upvotes

r/EntityComponentSystem • • Jan 09 '26

Exploring the Theory and Practice of Concurrency in the Entity-Component-System Pattern

Thumbnail reddit.com
9 Upvotes

r/EntityComponentSystem • • Jul 08 '24

C# ECS - Friflo.Engine.ECS 3.0.0. New features: Entity Relationships, Relations and full-text Search

9 Upvotes

Just released Friflo.Engine.ECS v3.0.0-preview.2

New Features:

  • Entity Relationships - Enable links between entities. 1 to 1 and 1 to many

  • Relations - Enable adding multiple components of same component type to an entity

  • Full-text Search - Support searching component fields with a specific value in O(1)

Documentation of new features at GitHub Friflo.Engine.ECS ⋅ Component Types

Some use cases for these features in game development are

  • Attack systems

  • Path finding, Route tracing or Routing

  • Model social networks. E.g friendship, alliances or rivalries

  • Inventory Systems

  • Build any type of a directed graph.

Feedback welcome!


r/EntityComponentSystem • • Feb 20 '23

Arche -- A simple, archetype-based ECS for Go/Golang

9 Upvotes

Arche is an archetype-based ECS for Go: https://github.com/mlange-42/arche

Over the past 2 weeks, I developed Arche due to a lack of fast and mature ECS implementations in Go. It is primarily designed for building (individual-based) simulation models rather than games.

Arche's features:

  • Simple core API. See the API docs.

  • Optional rich filtering and generic query API.

  • Fast iteration and component access via queries (≈2.5ns iterate + get).

  • Fast random access for components of arbitrary entities. Useful for hierarchies.

  • No systems. Just queries. Use your own structure!

  • Not thread-safe. On purpose.

  • No dependencies. Except for unit tests (100% coverage).

Your feedback is highly appreciated!

I would like to thank u/skypjack and u/ajmmertens, the authors of EnTT and Flecs, resp., for their blog post series that were very helpful during the implementation.


r/EntityComponentSystem • • Oct 25 '22

ECS: Rules, dos and don'ts and best practices for Systems

Thumbnail self.gamedev
9 Upvotes

r/EntityComponentSystem • • Jun 04 '22

Building games in ECS just got a little bit easier with the new Flecs system monitor

Post image
9 Upvotes

r/EntityComponentSystem • • Apr 30 '22

The more I utilize ECS for my game engine, the more I regret going in this route

9 Upvotes

I am starting to think that either ECS does not make sense in game development or I am misunderstanding something very fundamental about ECS.

I really like the concept behind ECS, especially if I have the centralized container that stores all the components in nice, cache friendly sparse sets. If I need a new component, I just create a structure and set it in the entity storage and everything works well. No hierarchy, no gigantic data structures. Good separation of concerns as well.

However, my problem starts when dealing with the "System" part of ECS. At this point, I have the following systems in my application -- Scene Updater (for parent-child transforms), Physics system, Rendering, Scripting.

Except for scripting, every other system needs some kind of synchronization and internal data representation:

  • Scene updater: Need to store the hierarchy to be able to update the entities

  • Physics system: Need to synchronize transforms with the Physics (I am using a 3rd party physics system; so, this is understandable)

  • Rendering: Need to store all the transforms in buffers and pass them to the GPU. The entire system only has one point of contact with the entities -- creating buffers. Everything else is internal data structures and storages.

If every system synchronizes the entity data with internal structures, what's the point of the ECS in the first place?


r/EntityComponentSystem • • Aug 29 '21

ECS back and forth: Introduction to sparse sets and pointer stability (part 1 of 2)

Thumbnail
skypjack.github.io
9 Upvotes

r/EntityComponentSystem • • Apr 02 '21

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

Thumbnail self.gamedev
9 Upvotes

r/EntityComponentSystem • • Dec 29 '20

Bobby Anguelov's talk on Game Objects/ECS design

Thumbnail
youtube.com
9 Upvotes

r/EntityComponentSystem • • Dec 27 '20

Svelto.ECS 3.0 is out and it's not Unity only!

Thumbnail
sebaslab.com
9 Upvotes