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

idiot dev, yandere simulator 

switches, you know them?

Show thread

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 

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
Follow

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.

idiot dev, yandere simulator 

@pixel it used to be written in JS I think, but at some point the dev said he was rewriting everything in C#
guess that changed?

idiot dev, yandere simulator 

@toast well, as far as I know it was the tinyBuild deal to convert it to C#, but that...failed, due to his statement of "not being able to understand the new code" etc.

idiot dev, yandere simulator 

@pixel nice...

idiot dev, yandere simulator 

@toast and it being some weird JS-dialect, it actually makes sense that all of the objects carry references to each other

because that seems like a fairly JS way to do things (if you only know so and so much stuff)

Sign in to participate in the conversation
desu.social

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