I hate redditors nitpicking about code. "Oh no a global!" is cargo cultism hangover from OOP ideology. Lookup Tables are a classic time-space tradeoff technique. I'm sure plebbitors just use a string-key hashmap for literally fucking everything. The only issue is that he uses numbers instead of enums. I have seen very few legitimate critiques of a lolcow gamedev. It's always the midwittest of programmer takes "LOL SPAGHETTI CODE". Sometimes it's not optimal but sometimes you gotta write ugly code and as long as it's not in the hot path it's not really a big deal. Nevermind a lookup in an array is O(1) complexity, "but its ugly ewwww".
This is why I almost never comment on code quality. I'll just say that I consider the quality of code to be how well it does what it's supposed to and how much complexity was added that is unrelated to the actual problem. If you need to store a thousand flags for tracking storyline events, then that's what you have to do, and who cares if it's in a global array or not? The bedshit there is making it harder on yourself by giving everything implicit names. If you make a typo it could be months before anyone notices that you accidentally softlocked the user on sidequest path instead of lighting candle #599.
Some dumbass youtuber made a code review video on a Yandere-dev script and now every midwit until the end of time is stuck talking about if vs switch statements, or other random optimization that have no meaningful impact. Game code is especially disposable by nature and games are notoriously complicated, so a lot of the time you just have to drag the bloated corpse of a project across the finish line while the redditers talking about code quality write their 0-15 lines a day.
This is also why I hate "expert beginner" content, where they retread beginner material until the end of time. Prime does it too, to a large extent, even if he branches out more. Channels like this are particularly bad because they teach people that good code is doing cargo culting and you get to develop as a programmer by
talking about doing work instead of
doing work. I can tell you right now that talking is way easier than doing, and you will very quickly run out of theoretical things you can even talk about to continue improving. I can't wait to review
another tetris clone!
This also partly explains why there's so much beginner content and no real "intermediate content" because virtually everyone producing streams or tutorials is an expert beginner who can't talk about anything more complicated than endlessly retreading tetris clones. There's also a revolving door of beginners who constantly join and leave, kind of like people buying assets off the unity store who will never produce a game.
People did this with Ballatro too. It's written in Lua, and it has a huge file to define all the cards. It works, the game is stable, it runs on a potato, and it actually came out. Of course you then had social programmers who did not make ballatro come out to talk about code quality.
Oh no, it's if/else statements again. You could have refactored this into an automated circumsizer that produces the card values as a side effect. The best part was that almost all of the idiots who responded to this "fixing" the statements were complete wrong. They posted completely incorrect "high quality" code while smugly gloating about how they're too good to use if/else statements. Again, game code is disposal, just fucking write it and move on. Most programmers act much smarter than they are, and if they acted dumber than they are they'd get a lot further.
A lot of this stems from the "social programmer". The general idea is that they get social validation and smugness from the act of talking about programming. Programming is part of their personality and their friends and the act of talking about programming (or smugposting) is fulfilling in itself to them. This also explains why they don't shut the fuck up about if/switch statements, because it's how they socialize.
This is also a superset of the group that spend their free time infiltrating and slowly subverting communities by minting and enforcing codes of conduct that ban any form of fun. I didn't think think this would turn into a rant about how much I hate programmers but I do hate all of them. On the whole they are some of the dumbest, snarkiest, smuggest retards on the planet. I am going to kill every single programmer. I have a lot more to say about programmers in my book of grudges, but maybe later.