Not sure I agree with your examples but good discussion to have. Some thoughts:
-
There’s no point in having a property if the member genuinely needs to be accessed outside the class without validation or other side effects. It’s not more encapsulated because you route modification through an accessor. Just adds overhead. Might be something worth adding later, until then YAGNI applies.
-
Events have vastly more overhead than a Boolean flag, YAGNI definitely applies. If a piece of code is already modular, scalable, and reusable, converting it to use the Observer pattern is just cargo. With that said, you might enjoy the upcoming lectures where Sam does teach an intro to dependencies, inversion of control, and other software engineering entry level topics. He’s a proper SE, but we do have to appreciate that anything more sophisticated would be out of scope for this intermediate course.
-
Many developers would politely disagree with you on this one. The course generally tries to follow the principal of self-documenting code. Descriptive locals make code more readable, which has concrete benefits for debugging and collaboration.
It’s really a case of following YAGNI. The course is genuinely quite a brilliant on-ramp in my view, especially for a solo developers first game.
——
Outside the examples though, I do agree with you in principal that it would be nice to see a more advanced course on real full scale game production architecture.
Until then, advanced learners would be well advised to:
- watch some of the legendary GDC talks on ScriptableObjects as logic assets (Richard Fine’s original talk is great, and Ryan Hipple’s was groundbreaking).
- dig in to the UOP1 demo and read through those development journals / forums. (Closest thing we’ll get to Gigaya).
- read the Unity official ebooks on programming patterns and game architecture
And be aware that other “best practices” channels like InfallibleCode coming from an enterprise background actually don’t align with what Unity themselves suggest.
Until then, I volunteer to put together a course for GDTV on the eternal “inspector dependency injection vs. C# dependency injection vs. Find service locator vs. C# service locator vs. SO Singleton vs. C# Singleton” debate and Unity’s official answer for best practices (ScriptableObject based EventBus architecture with custom inspectors) later in the year. @Kevin-Brandon / @Brian_Trotter do you know if anything like that is already in the works out of curiosity?
All this being said, even Unity hasn’t dogfooded a real game so hopefully one day we get a book from a III who has released a big game.