Hacker News new | ask | show | jobs
by jazzfool 1639 days ago
The "stateful" way you present is not at all how you would approach that problem in an ECS. I think you misunderstand what ECS refers to.
1 comments

Maybe for ECS newbie, please say more on how you would approach this problem?
ECS is closer to the second way that was described. Data is represented as arrays of structs (referred to as components), similar to what was described. Systems can mutate or read these structs.

A physics system might change the position components while a decoupled rendering system might read that position components and the rendering details components to add draw commands.