logoalt Hacker News

saghmyesterday at 6:21 PM1 replyview on HN

It's a single data structure that contains your entire game though? The whole point of the ECS is that literally everything uses the same data; it's like if you modeled every object in the world with one struct that has an optional field for every piece of data that could exist. I'm not saying that necessarily makes the tradeoff worthwhile, but calling it a "single data structure" is a bit reductive.


Replies

CyberDildonicsyesterday at 8:43 PM

It's a single data structure that contains your entire game though?

Are you asking?

but calling it a "single data structure" is a bit reductive.

No it isn't. It's like a tiny database. Depending on how someone implements it, it could use arrays, hash maps and b-trees. There is no universe where this means a binary that does nothing should be 50 megabytes.

show 1 reply