Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | bob333 |
From the scene documentation Scene organization — Godot Engine (stable) documentation in English the following quote seems to discourage oop
One of the biggest things to consider in OOP is maintaining focused,
singular-purpose classes with loose coupling to other parts of the
codebase. This keeps the size of objects small (for maintainability)
and improves their reusability so that re-writing completed logic is
unnecessary.These OOP best practices have several ramifications for the best
practices in scene structure and script usage.
Later in the documentation the following quote encourages oop
Scripts and scenes, as extensions of engine classes should abide by
all OOP principles. Examples include…SOLID DRY KISS YAGNI
I have watched interviews of game programmers interviews who are against oop for game development. What is the godot’s philosophy on oop for game development ?
I don’t see how you come to the conclusion that the first quote discourages OOP; in fact I think the quote encourages OOP best practices. The text surrounding the one you quoted talks about how scenes shouldn’t have dependencies if possible - e.g. avoid strong coupling and be self-sufficient, which is also an important aspect of OOP (encapsulation etc).
archeron | 2020-06-04 21:48
I think the confusion stems from the word “ramification” which is similar in meaning to “consequence” but usually implies unwanted or annoying consequences. That’s just a poor choice of words though: I fully agree that the overall sentiment of the quoted paragraph (and that part of the documentation as a whole) is pro-OOP.
njamster | 2020-06-06 10:47