- Joined
- Feb 3, 2013
Every single bit of code in the game appears to be a script attached to some Unity object, which means it's run every single frame whether it matters or not. For example it'll check every frame what class period it is in-game, when obviously that's not changing very often.Sorry if this question is dumb, but can someone explain why YanSim runs so poorly?
I thought bad code only resulted in a bunch of bugs (like the Kokona burning ones), not 30 fps.
Add to that a lot of duplicated effort - take the notorious StudentScript.cs. There's only one student script for all NPCs, so at every frame it has to ask "Am I Student 1? Then do this. Or am I Student 2? Then do that"... and on and on. Of course only one NPC is actually going to be Student 1, and the rest of them are just spinning through that pointless check every frame for no reason. There are a lot of things like that and presumably they add up.
The weird over-detailed store-bought 3D models (like that toothbrush) probably don't help things either.