4 ms·
What would an ECS language look like? Would it differ substantially from an OO language? ECS seems to me more like a pattern than a paradigm.
by cout 5y ago
What would an ECS language look like? Would it differ substantially from an OO language?
ECS seems to me more like a pattern than a paradigm.
- galangalalgol 5y agoAnd that pattern is easy to implement in C or fortran 77 without being unidiomatic. So I don't vthing you need anything special. Edit: to clarify, a system can just be a function, an entity just an ID and a component should be plain old data anyway, so a struct is perfect.
- ratww 5y ago> a system can just be a function, an entity just an ID and a component should be plain old data anyway, so a struct is perfect. Correct. This is exactly how most ECS frameworks are implemented today (except when it's implemented in languages that doesn't have those features, of course).
- kazoomonger 5y agoI don't think ECS as such would really make a language on its own, but languages that use traits instead of inheritance would be approximately that. Both ECS and traits eschew using the inheritance-style "is-a" thinking. ECS goes for "has-a" thinking, and traits go for "acts-as" thinking. A few popular trait-based languages that would feel comfortable to someone familiar with ECS are Rust or Go.