Earlier quoted context omitted.
It's kind of weird how terrible this code is (according to software design 'best practices'). 5k lines in a single file, tons of repetition that could be replaced with more compact code etc. I would think the author was a novice programmer, but looking at the creator's history they've already made Towerfall, another hugely acclaimed game (and one I still play to this day), about 5 years before this was released. Yet…
> (according to software design 'best practices') that's because these best practices aren't geared towards producing something good - it's geared towards making something easy to understand for someone else, and easy to maintain when requirements change. It is also designed for the lowest common denominator programmers - so that many can work on the same code base, over a long period of time. For games, none of thes…
Here's the base Source Engine movement code for example: https://github.com/VSES/SourceEngine2007/blob/master/src_mai...