Why do most Rust game engines use ECS instead of OOP? #596
d5364t54ytfr4
started this conversation in
General
Replies: 1 comment
-
OOP isn't particularly bad, it is bad when it is misused. It gained this notoriety of being bad mostly because of extreme use cases of with diamond inheritance, deeply nested inheritance graph, etc. Fyrox does not use this at all, instead it uses composition to compose complex objects. Back to the main question: I think that's mostly because of borrow checker, people just gave up on searching different approaches to programming and used ECS. I'm planning to write a chapter in the book, where I want to explain how Fyrox deals with borrow checker. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Fyrox seems to be the only Rust game engine which uses OOP, while most C++, C#, Java and Python game engines use OOP.
OOP seems to be used for game dev everywhere except the Rust community.
I wonder why that is? Is it because OOP based game dev is a bad idea in Rust(maybe because of the borrow checker or lack of inheritance)?
Beta Was this translation helpful? Give feedback.
All reactions