News for hackers. Stuff that matters.
Re:Terraria Source Code (2013) by CodeGlitch on Tuesday February 15, 2022 @09:56AM (#30347219)
Games don't optimise for "clean code" or maintainability - they optimise for speed and cost. Of course in a perfect world it would be all of those.

- Former game developer

Re:Terraria Source Code (2013) by thi2 on Tuesday February 15, 2022 @10:00AM (#30347287)
I'm really wondering why clean code or maintainability imply higher cost or lower performance for you.
Re:Terraria Source Code (2013) by CodeGlitch on Tuesday February 15, 2022 @10:16AM (#30347506)
Because game code is "throw away" = don't assume you are making a sequel = there's no reason to make it maintainable. You write it as fast as you can to fulfil the requirements. Stuff like unit/system tests are a waste of time because it's cheaper to hire people to manually press buttons.

Yes I know this sounds bad - but that's how the games industry works. And is one of the reasons I left.

Note that if you are working in engine code, then you want all the automated tests, proper architecture, etc.