I think a lot about the youtube video with hundreds of thousands of views that critiqued YandereDev's source code when it was leaked. Infamously, the game logic was entirely contained in a single file that was thousands of lines of nested if-else statements.
The video was a 20 minute video saying that the biggest problem with the file was that it should have used switch statements instead of if-else statements
@wallhackio honestly of all things to criticize the dev fur, him being an amateur who doesn’t know good software engineering purractices yet writing a codebase fur the game anyway is actually cool imo. he should not be shamed fur that aspect of his work
@aescling people have decompiled Undertale recently and it has been discovered that it was equally poor in its software engineering practices
it is possible to make incredible art with shitass code
Stupid question
@wallhackio @aescling How would it be possible to discover something like that from a decompile? I've tried to decompile binaries (in Ghidra) before, it gives me hard-to-follow C/assembly code because all the names and semantic information were lost during compilation and also the compiler can optimize what it wants...
re: Stupid question
@vaporeon_ @aescling Now that you mention it I have no idea how the decompilation was done
@vaporeon_ @wallhackio @aescling undertale is made with gamemaker, so it ships as "gmk code stapled to an interpreter". with enough work you can extract the gmk code, comments and everything
you have to be very clever and work very hard to do it. but undertale was very popular, and attracted some people who are very clever and willing to work very hard, so there are tools for it
@vaporeon_ @wallhackio @aescling to be clear this is not how all gamemaker games ship but it is how toby fox did it. there are other options when exporting a project
@vaporeon_ @wallhackio @aescling unity games can be decompiled fairly easy unless they turn on il2cpp
unity is c#, which is .net, which compiles to CIL, which can be decompiled to any .net language pretty easily. you don't get comments but you get like, method names, etc
and then sometimes, a game is just shipped as an executable that sits on your hard drive and there's no easy way to decompile it, in which case. you have to want it really bad, be very clever and work very hard. sleepless nights spent staring at ghidra, etc
@vaporeon_ @wallhackio @aescling and usually you get a lot of help
https://github.com/isledecomp/isle
https://github.com/pret/pokeemerald
etc
@monorail @vaporeon_ @aescling programming is so cool
anyway, here is a genuinely good critique of the source code:
https://www.youtube.com/watch?v=LleJbZ3FOPU