Hey everyone, it's been what, 3 years since I recoded TRTF Classic? Very cool, anyway, I wanted to tell you why that game was so awful codewise. Now of course, it was one of the first FNaF Fan Games ever, it was made in 2014 for crying out loud, but still, the catastrophic failure that is the code of this game never ceases to amaze me.
For starters, if you're aware of Clickteam Fusion at all, you'll know that every part of a FNaF game is a different "frame" - the main menu, the office with the nights, the game over screen, etc. And that's usually fine, that's how it works, only that TRTF Classic had done things way differently... you see, the way TRTF stores your data, or should I say, the way it doesn't means that every frame is duplicated for every night beaten. You've got a different frame for the menu for every night, same for the office, same for the game over screen, same for everything else. Usually, by storing the data in a proper way, there is no need for such nonsense. Duplicate frames means different code and objects for each one, if the dev wants to make a change for one of the frames, he'd have to make the same change on each and every one of the duplicates. It's awful.
Moving on to how the game doesn't function, it should come to no surprise that the animatronics have no actual AI. Every movement state of every animatronic is determined by an animatronic movement timer. It's a set path for everyone. That on its own is fine, I won't hold a grudge for it. You also add to the movement timer every time you click on a camera button, which is why the animatronics seems to rapidly speed up when you spam click the camera buttons, and the custom night isn't real because you can't play it unless you set all AIs to 20, but again, it's mostly fine.
What isn't fine is the most idiotic thing yet, and that is how the mask """functions""". I think you're all aware of this funny thing where an animatronic can seemingly bypass the mask even if you put it on time and the "put the mask only one at a time" line from phone guy. So oh boy, let's get into this. Remember the animatronic movement timer? It's also responsible for every time an animatronic is in the office. Meaning it's scripted. For our example, let's say we have values of 24, 56 and 77 for different animatronics being in the office. In the internal game logic, these values always come in order. The mask also has a timer. It increases by 1 each time you put it on. So what the game does is check for the mask timer compared to the animatronic movement timer. At value 24 which in our example is the first animatronic being in the office, in order for the mask to work, its timer should be 1 (since it gets from 0 to 1 when you first put it on). On animatronic movement timer of 56, the second animatronic in the office, the mask timer should be 2 in order for it to work. So essentially, if you put the mask more times than intended, you'll mess up the eternal specific values and lose no matter what. I can't even begin to explain how retarded this system is. That's what the phone guy means by "one at a time", you can only put the mask one animatronic in the office at a time. But you can still accidentally mess it up because the mask button can pull off the mask even when an animatronic is in the office...
I can go on and on with how almost everything in that game was done terribly, but I think I covered the most important stuff. This was why I decided to recode the game in 2018, it's nostalgic and has its charm but it's broken beyond belief. And hey, some might find charm in the game-breaking bugs too, I get that, but I just wanted a more stable option to play the game overall and I hope this project has been of use to the people who felt the same.
7 comments