3 ms·
The author explains their reasoning about globals here. https://github.com/a327ex/blog/issues/24 https://github.com/a327ex/blog/issues/24 It mainly boils down
by nonbirithm 6y ago
The author explains their reasoning about globals here.
https://github.com/a327ex/blog/issues/24 https://github.com/a327ex/blog/issues/24
It mainly boils down to the fact that an indie game written by one person and never maintained after release doesn't need to be written for maintainability. Supposedly there are productivity gains the author receives from doing this.
Personally, I disagree from past experiences dealing with hundreds of globals in legacy code, but to each their own.
- cl3misch 6y agoThank you for the link, that's exactly what I was looking for. I see the point that a single developer does not have to focus on maintainability so much. And if it works for him -- as it obviously does -- more power to him. But for me, I do not think I am mentally capable to reason about my program if it has to many globals. If I can have as much as possible local, my mental model also can be local. I am very new to gamedev, so this way of thinking may not be appropriate in the long run.