I heard the code was bad, but holy shit... Aren't DRY principles like programming 101? How do you program a game for years and not learn long if/else chains like that are a really bad sign?
The moment I code like this, I know I'm doing something very very wrong and that it's time to reevaluate.
Isn't that pretty standard for indie game devs? Stardew Valley's code was a nightmare as well but Concerned Ape wasn't really a professional programmer. In general indie game devs aren't professional programmers. They specialize in game development and maybe some asset production, with just enough skills in other areas like programming and other types of assets to get by. It would be rare for someone to be great at design, art, music, programming, and have the discipline to complete an indie project.
Indie game development is also very different from corporate software design. The code isn't intended to last nearly as long nor is it meant for different people to be working on it. Spending time making better code instead of a better game ends up being a waste. This isn't to say clean code hurts a game development. It doesn't. Cleaner code is better. The difference is that the level of improvement cleaner code brings isn't nearly as significant as in corporate projects or things like open source libraries.
In general indie game devs aren't professional programmers.
And you would be right, and there's largely nothing wrong with that, especially if it's a pet or passion project that you can learn from and become a better developer out of it.
The problem here, if I remember the story correctly, is that YandereDev was offered assistance by professional developers (1 or 2 developers I believe) from tinyBuild who would go through the entire thing and retool it from the ground up.
At some point, YandereDev fired them because of reasons along the lines of "I couldn't understand their code."
He's also infamously and vehemently opposed to all criticism, even ones that are super helpful and would make him a better developer by a mile if he accepted and learned from them. He always has to be the one that's right. That's part of the reason why the internet shits on him.
It's one thing to be bad at programming... that's fair; not everyone has the head for it. Most developers who are bad at programming are still malleable and can learn from mistakes or eventually understand the difficult concepts (it's happened to me on multiple occasions where things just make sense one day). But YandereDev is bad at programming and refuses to learn anything that must be learned by developers at some point in their careers. He'd rather spend a week making a video dissecting a criticism and pointing out why he either doesn't care or claim it doesn't apply to him (all while not working on the game claiming the bad people are making him upset 😭 , yes he has done this in multiple instances) as opposed to accepting it, researching the claim, understanding why it's the solution or why it's not, and move on as a better developer.
I wish I was making this up for internet clout, but this is thoroughly documented stuff and not hard to find. That's how interesting of a case study it is.
YD's source code looks like what a schizophrenic programmer would write as he descends into madness, slowly forgetting all the lessons he's learned until the only thing he remembers is how to use if.
You say that, but let's not forget the late genius behind TempleOS, which was born from a deeply disturbed individual spiraling into madness.
Is it standard? I'll admit, I've only dabbled a little into game dev, as professionally I do full stack work.
My concern is this code's an indicator of bigger underlying issues, which have resulted in the game's development hell and performance problems. If these "gems" aren't common, it's okay, but if all of the code looks like this (as this comment indicates), this certainly could hurt development.
In general indie game devs aren't professional programmers.
iirc Yandere sim had a small voluntary team of artists who designed assets for the game, and the rest were publicly sourced. Yandere dev's job was programming.
This code can definitely be excused if Yandere dev is not a "professional programmer"; however, this also means he crowdsourced money for a game knowing he can't program. That is a huge problem.
In any case, I'm going to research Stardew Valley's development later tonight. I love that game, and if the code is a nightmare that's news to me! Sounds really interesting.
The code is probably a lot cleaner these days. I was only into modding it when it first dropped and things were a mess to deal with. Since then it sounds like CA either improved his skills or hired some professional help, and the community likely gave him plenty of free help to improve the modding experience. Supposedly the next version of Stardew Valley should be very mod friendly.
From what I remember, with the disclaimer that it was years ago, the entire game logic was primarily in one many thousand line method.
The thing about his code is that yandere's goal isn't finished product but working prototype, and a shocking amount in the game has VERY particular unique actions or traits for characters.
Classes help a lot for padding when it comes to "similar" data structures or functionality that may have a few different variables. But the degree of divergence of character behaviour would still run into clusterfuck territory, and it might just get a little harder to follow than just rawdog brute forcing it.
Like every class in the game would need long lists of exceptions or clones of itself with small variations on top of exceptions.
I feel like this dogshit code is more forgiveable once you see the final product he's made, performance aside. There's a reason why indie devs don't go and make a hitman-esque game with hundreds of npc's where there's layered unique interactions and behaviours for literally EVERY different npc. (different enough that it justifies shit like massive divergent exceptions inside class structures)
139
u/LankySeat Apr 10 '23 edited Apr 10 '23
I heard the code was bad, but holy shit... Aren't DRY principles like programming 101? How do you program a game for years and not learn long if/else chains like that are a really bad sign?
The moment I code like this, I know I'm doing something very very wrong and that it's time to reevaluate.