Hacker News new | ask | show | jobs
by fluffybucktsnek 61 days ago
Your whole thread is about nitpicking the phrase "Bevy gives you a nice ECS". You are the one who asserted that "ecs specifically is just a data structure" (it isn't, by most definitions [1] [2], except yours). I supposed you were referring exclusively to a simple and basic component storage implementation (which is a data storage), where as OP was probably referring to the whole ergonomics of writing programs in it, alongside all the other features. It seems to me that you're the one who missed the point.

Then, you used this reductionism to question whether the 50MB binary is worth it. And that's ignoring the fact that there are ways to cut it if you wish, as mentioned in the reddit thread. And then there's the issue of whether it will actually matter for a full game.

[1] https://en.wikipedia.org/wiki/Entity_component_system

[2] https://github.com/SanderMertens/ecs-faq#what-is-ecs

1 comments

Your link describes a data structure and then just says "systems that use it" which is implied. Of course it gets used. Seems tautological.
I will need citation on which link, and how it defines ECS as a data structure.

From [1]:

> Entity component system (ECS) is a software architectural pattern. An ECS consists of entities composed of data components, along with systems that operate on those components.

From [2]: > ECS ("Entity Component System") describes a design approach which promotes code reusability by separating data from behavior. Data is often stored in cache-friendly ways which benefits performance.

What you just described is a data structure that gets used. If the user brings the behavior what is the ecs? It's the data structure.

Of course it will be used somehow. I don't call a std::vector a "vector system" because someone uses it, but I guess people think using this data structure makes it a "system".

It's a data structure, except it doesn't describe how data is actually stored, only how its elements interact, so it's a data structure that doesn't actually structure data. If you are the kind of person that considers stuff like MVVM and Clean Architecture to be data structures, then I suppose it would be consistent. Most people don't.
It does store data so it is a data structure. Every implementation is meant to store data and the whole point is to have more memory locality so how it stores data is actually crucial.
No, not every ECS implementation is about data storage (to be more precise, component storage). This architecture's abstraction being better suited for data locality is the main appeal, yes, but many appreciate the mere separation of the GameComponent's Components into Components and Systems. So your assertion about it being strictly meant for data storage is just wrong. As [2] states:

> Data is often stored in cache-friendly ways which benefits performance.

Notice it says often, not always.

And bear in mind, generally, data structures aren't just about storing data. They are about storing data in a very particular way.