idiot dev, yandere simulator 

so since I did a lot of Unity modding this week, I figured I take a peek at Yandere Simulator and take apart the Assembly it comes with.

IT

DOESN'T

EVEN

HAVE

A

GLOBAL

NAMESPACE

idiot dev, yandere simulator 

what is thissssss

so many properties have "My" prepended to them.

Yandere.MyRenderer, MyProjector, etc.

asdldaskdjals

Show thread
Follow

idiot dev, yandere simulator 

switches, you know them?

idiot dev, yandere simulator 

to be honest, I have no idea of Unity, but I don't think THIS is the correct way of handling this.

Show thread

idiot dev, yandere simulator 

ah, the classic of manipulating parent state

Show thread

idiot dev, yandere simulator 

oh my my my my my my

Show thread

idiot dev, yandere simulator 

this is all part of "StudentScript"

I know that Unity likes the term Script, doesn't mean you need to suffix your classes with it, oof.

Show thread

idiot dev, yandere simulator 

okay, I'm really not wondering this game has performance issues if a single student carries more properties and methods than my whole game reverse engineering toolkit.

Show thread

idiot dev, yandere simulator 

Sure, I get that the game has a lot of stuff to do

but then just subclass Student types and only assign what's necessary, this is ridiculous.

Show thread

idiot dev, yandere simulator 

if your editor crashes when opening a >single< class file

you know something is horribly wrong

Show thread

idiot dev, yandere simulator 

so I want to share my pain.

feel free to join in in the feast that is consuming this wonderful piece of code.

it just might happen that your browser dies.

The entirity of Yandere Simulators "StudentScript" class.

Enjoy!

gist.github.com/pixeldesu/f6c8

Show thread

idiot dev, yandere simulator 

looks like the tutorials YanDev took code from did never handle the concept of enums.

Show thread

idiot dev, yandere simulator 

"Okay, not wondering about performance issues"²

Every Student carries an instance of the playable character, (this.Yandere)

Show thread

idiot dev, yandere simulator 

So, StudentScript carries "any possible state at any point in time" basically. Including animation references, textures, meshes, etc.

This could be handled so much better.

Show thread

idiot dev, yandere simulator 

I actually wonder if I can make some kind of class/property map out of this because it looks like most parts that are required more often all have references to each other in them.

Show thread

idiot dev, yandere simulator 

The fact that YanDev actually refused to take the code that was improved by someone from tinyBuild because "he couldn't understand it" just verifies that any quality in this is genuine.

Show thread

idiot dev, yandere simulator 

it's so fun how YanDev thinks that the performance of the game is tanking because of the rendering.

There even are low-poly models rendered at a distance for students.

But with this much stuff being tied to a single student instance, adjusting the rendering will only be the smallest part.

Show thread

idiot dev, yandere simulator 

here, a video scrolling through the "StudentScript" class unfolded, using the Windows scroll control held down.

Purple is properties, Dark Green properties with getters and setters and Orange are methods.

Show thread

idiot dev, yandere simulator 

the video/gif is 45 seconds, by the way

Show thread

idiot dev, yandere simulator 

To explain a bit more, this is the core of 95% of all the people walking around on the school grounds of this game

With THIS MUCH stuff being inside every each instance, no wonders the game runs horrible on every computer ever.

Show thread

idiot dev, yandere simulator 

okay, some more information I figured out.

Yandere Simulator isn't using C#.

It's using...UnityScript? Which is weird JS-like syntax fused with C# below it?

And it has been deprecated....a few years ago already.

Show thread

idiot dev, yandere simulator 

So, Yandere Simulator is written with UnityScript, which is a weird..."marriage" of JS and C# I guess.

Basically JS-syntactic sugar for C#?

It really looks like a weird mix of the two. And it looks like the result is still a C# assembly in the end (at least I decompiled a C# one)

Surely, the decompilation output isn't as accurate then, but the large classes etc. are still coming from the dev himself, not UnityScript.

Show thread

idiot dev, yandere simulator 

@pixel I feel so much better about my C# now

re: idiot dev, yandere simulator 

@pixel You can make a game without having a lot of coding experience, that's not a bad thing. Toby Fox said some people would have an aneurysm if they saw the code for Undertale

re: idiot dev, yandere simulator 

@socks that's true!

in general, in the end the result matters.

In the case of YanDev it's mainly the fact that he has declined help of professionals, even publishers, and is only taking volunteer work based on Unity Assets to make an overhyped game.

Not necessarily one of these games you want to support.

re: idiot dev, yandere simulator 

@pixel Oh oof. Yeah, um, that's not great.

re: idiot dev, yandere simulator 

@socks and also

even if anyone can write "any quality of code", it should at least be performant, and not causing your machine to go up in flames.

The code written by YanDev isn't even running on high-tier machines without causing lag, and the game's graphics are not that good to warrant that.

idiot dev, yandere simulator 

@pixel what the fuck is that comment

Why is there an RVA needed

idiot dev, yandere simulator 

@luna the comment is coming from the disassembler, no dice

re: idiot dev, yandere simulator 

@pixel :blobcatsweat: that's a lot of parents

idiot dev, yandere simulator 

@pixel can you unread code? garbage collect it from my own memories?

idiot dev, yandere simulator 

@pixel "Generic Bento Script" is my favourite

idiot dev, yandere simulator 

@pixel also suffixing with Script :yikes:

idiot dev, yandere simulator 

@pixel oh god..

idiot dev, yandere simulator 

@pixel really really really hope this nested if is a result of a not-too-smart disassembler

idiot dev, yandere simulator 

@The6P4C it's not.

Unity disassemblies can almost be one-to-one from original code.

I've seen other disassemblies with trinary operators and switches, so it's not the disassembler at fault here.

idiot dev, yandere simulator 

@pixel i can't even

@pixel@desu.social thanks, my whole OS hated it.
no really, I had to change tty to kill my browser

this source has some next level obfuscation going on

@nick @pixel idk, Kate could open it just fine

also wtf are those massive routines

@nilsding@pounced-on.me guess it's my fault torturing Falkon to render half a megabyte of syntax highlights
no probs in w3m tough

but man refactoring this would be a field day, so many if's and ||'s, amazing

idiot dev, yandere simulator 

@pixel aaaaaaaaaayXcdedfitguj

idiot dev, yandere simulator 

@pixel ohhhhhhh god.

idiot dev, yandere simulator 

@pixel can we just.. idk take over the project lol

idiot dev, yandere simulator 

@pixel hey check out this hot new game only requires 32gb of ram

idiot dev, yandere simulator 

@karina all these cross references, holy heck

someone needs to teach this guy about Manager/Singleton patterns ASAP

idiot dev, yandere simulator 

@pixel

"I care about performance"

"What's a profiler"

idiot dev, yandere simulator 

@luna "profiles? sorry, I don't think I will ever add those, my main priority is adding the first rival to the game"

idiot dev, yandere simulator 

@pixel holy shit, wasn't he a professional game dev before?
like that was part of his backstory, I'm sure of it.
what did he DO in that position?
like what were his responsibilities???
such that would lead him to believe he should jump into making his own game like that.
hearing about how he schedules his life as well is... wow.

idiot dev, yandere simulator 

@toast @pixel I think he went to community college for multimedia but I don't think he ever went professional with anything gamedev related

idiot dev, yandere simulator 

@VD15 @pixel
"I'm YandereDev! I worked at a video game company for 3 years, then left to become a freelance programmer and pursue my dream of becoming an independent game developer. In the past, I've worked on 5 console games (for Wii, 360, and PS3) and 5 mobile games (for Vita and iPhone)."[1]
[1]: https://yanderesimulator.com/about/ (Who are you, anyway? section)

idiot dev, yandere simulator 

@toast @pixel you gotta love how he's asking for money via patreon so he can later ask for money via kickstarter so he can eventually ask for money via game sales

idiot dev, yandere simulator 

@toast I saw his LinkedIn and he was in fact never a professional.

He helped with and made small mobile games at a...mobile game centric studio, but that was it, and of course his other gamedev projects at the side.

idiot dev, yandere simulator 

@pixel he claims he's worked on several console games (see other subthread)... so that's really weird.
And, well, mobile games are even more performance-critical, so surely he wasn't involved with the code there either... Unless they flopped I guess.

idiot dev, yandere simulator 

@toast okay, it also included console games, I remembeed wrongly.

But here, as you can see in the roles, aside for the mobile games, he only supported/QA'd them.

idiot dev, yandere simulator 

@pixel that makes it worse, imo
he should KNOW the quality of his game is unacceptable
but then he rejects changes (e.g the tiny build thing) that improve it
Show more

idiot dev, yandere simulator 

@pixel no fucking way

idiot dev, yandere simulator 

@pixel please end this codes suffering

idiot dev, yandere simulator 

@pixel so it might as well have been your decompiler fucking up all along huh

it might have been deprecated but that never stopped people, isn't most gamedev hacked up code anyway?

idiot dev, yandere simulator 

@314 hmm, Unity still makes a C# assembly out of it tho.

even if the actual code inside might be somewhat different, the structure of the actual Scripts/Classes is probably like that, which doesn't make the code any better.

Sign in to participate in the conversation
desu.social

Welcome to desu.social, pixeldesu's personal Mastodon instance!