Is Yandere Simulator slow because of too many if statements or is it because of more banal stuff like not having good object culling and level of detail, or things being constantly loaded and unloaded out of VRAM due to improper engine use. My bet is that it's the latter.
It's a compound of all scripts, especially the student script being gigantic (edit: most scripts recompute everything each frame, and there's plenty of needless copying from prototype models too) , and not having any logical level of details, combined with a dogshit render pipeline.
The only issue is that he uses numbers instead of enums
It's probably the main one people complain a about, but it's far from the only problem in Heartbound.
One I remember without having to check is the multi-level switch statements, sometimes, it even goes up to 5 switches deep.
Other major assumptions like making enemy health a single global, or linking the PC's current model to max health, or pretty much the entire way the dialog system (busts, voices, lines) is encoded are also pretty large blunders.
I do agree that it's not completely clueless does-not-know-what-a-loop-is level of retardation, but it clearly indicates that he's incompetent at software architecture at a minimum, and, knowing his justification for writing code like this (it's 20% faster to access a global, Arrays make it easy to "hack" the save file, etc) also shows he has no clue about performance characteristics, especially since he's using a pretty slow engine with a jit-less bytecode vm, and shaving off a few hundred cycles per frame isn't gonna do shit when the entire logic processing is still under a millisecond.
Then again, can't really suffer from bad software architecture if you don't ever work on the software, now, can you?
