3 ms·
None of these really apply in this case. In data oriented programming, the data would not be stored in heterogenous lists but each element would be stored in a
by adamnemecek 6y ago
None of these really apply in this case. In data oriented programming, the data would not be stored in heterogenous lists but each element would be stored in a different, homogenous array and you would ties these together using the same entity ID.
- skohan 6y agoEven with this type of design, it's possible to implement in a typesafe way. I have seen clever ECS systems accomplish this
- adamnemecek 6y agoMaybe but ECS does in some sense circumvent types.
- hansvm 6y agoIn some sense. You could build a type system around "has a <foo>" relationships instead of "is a <foo>" and get something pretty cohesive out that closely aligns with ECS.
- mumblemumble 6y agoThat is not quite what the article is talking about. There's a bit of a terminology collision here. What the article is talking about is not Data-Oriented Design, the practice of organizing your data for efficient processing. It's proposing a separate (but not incompatible) concept of organizing your code for easier maintainability. For example, the sample code (which appears to be JavaScript) is not doing ECS at all. It's almost exclusively doing the data modeling by creating one heterogeneous map per entity.