top | item 29639588

EnTT: Gaming meets modern C++ 3.9 (ECS library and much more)

47 points| tridentboy | 4 years ago |github.com

26 comments

order

tridentboy|4 years ago

A great FAQ on ECS is available here:

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

chrsig|4 years ago

Something I've had trouble wrapping my head around with ECS -- how does it fundamentally differ from an in memory relational database?

They describe a "sparse set" designed for sequential identifiers -- how does that compare to something like an in memory b+ tree?

umvi|4 years ago

What are compile times like? I'm always suspicious that "header only" libraries translate to excruciating compile times

dymk|4 years ago

I'm not familiar with _this_ exact ECS library, but another header-only ECS library with comparable functionality is flecs [1] and it compiles so fast I thought I misconfigured it. Literally could not even measure the compile time increase.

[1] - https://flecs.docsforge.com/

ncake|4 years ago

Unpopular opinion, but I personally think ECS has no place in C/C++ game dev. Every supposed advantage is either curbed by limitations of the language (e.g. serialization) or can be implemented more logically in a stateless manner.

jayd16|4 years ago

In some ways ECS could be considered stateless, as the entity holds the game state as raw data, while the system operates on that data without holding a state of its own.

How would you implement ECS, a system for tracking the state of game entities, in a stateless manner? Can you expand on that?

BoorishBears|4 years ago

I can't even imagine game dev without ECS. There's more performant architectures but it's such a useful mental model for the type of rapid iteration games need that so many people are willing to put up with the drawbacks