How FNaF4 Works: A Comprehensive AI Breakdown

2,683,245
0
Published 2023-05-08
Made this video out of a comment I made on r/technicalfnaf: www.reddit.com/r/technicalFNaF/comments/11s2vlf/ho…

Editing this together took forever, so I hope this video will be a helpful resource for anyone looking to learn about how FNaF4 works. Regardless, I appreciate all the support on the previous two videos and I've already got a fun little video in the works that I hope won't take quite as much time.

Thanks to Folmic, GBAura, and others for giving me feedback, I appreciate it a ton ♥

Become a Taken+ member for only $0.99 at participating restaurants:
youtube.com/channel/UCEpYtyBLtjWmanRrW9LM5hA/join

If you're wondering if the game functioned any differently in older versions, it did! Check out the changelog here: docs.google.com/document/d/1gzzHgG5ApWgYfuSdh8lF2n…

Yes! I know the video is quiet as fuck, this will be fixed in future videos, do not worry!

Corrections! Fredbear/Nightmare's AFK kill is 25 seconds, not 15 seconds like in the script.
Also, despite saying that the kitchen acts the same as the middle, I still show the possibility for Chica to go to the hall from the kitchen; she cannot!
FAQ:
Q: I heard breathing, closed the door for long enough, but they didn't leave. What happened?
A: Close the door when you hear them breathing, and you’ll always be safe. Right? Unfortunately, not exactly. There’s a small oversight, another discovery by Folmic, where if you close the door right at a 10-second interval, Bonnie or Chica may not be able to be cleared. This is because during the door closing animation, you’re not considered to be listening to the door, allowing them to move back to the far hall, but then you finish closing the door and trigger that mechanic that moves them back, but disables clearing them.

Because this animation is 10 frames long, it essentially means that you have a 1/60 chance of the door not working. Your only real recourse is if you notice that you hear footsteps from that side right after closing the door, and not after, and then you can just open it, check for breathing and close it again if you’re right.

Q: I closed the door on Fredbear/Nightmare, but I still died?
A: Animatronics can only be cleared from the door or closet at 3-second intervals, so that means that you were unfortunately too slow.

Q: What does the breathing sound like?
A: I play part of the sound at 3:34. You need to watch out for subtle sounds and be patient, the full sound (along with every other) can be heard here:    • Five Nights at Freddys 4 ALL sounds i...  

Q: What about the Halloween Edition animatronics (Nightmarionne, Nightmare Mangle, etc.)?
A: They're just reskins. The only differences are that you can't see Nightmare Mangle in the hall (and she makes radio noises when he's in the closet), and there is a music box that plays whenever Nightmarionne is active

Q: What about the cupcake?
A: That is Nightmare Chica's bedroom jumpscare if she's by the door for too long (3:08 for how long)

Chapters:
0:00 Intro
0:26 The Basics
1:33 Bonnie & Chica
4:32 Foxy
6:29 Freddy
7:47 Fredbear & Nightmare
9:57 Miscellaneous
11:19 Plushtrap
12:57 Outro

All Comments (21)
  • @itztaken
    CORRECTIONS & FAQ HERE Yes, I know the video is quiet! Also if you were concerned about loud jumpscares, they have been muted :) Corrections! 1. Fredbear/Nightmare's AFK kill is 25 seconds, not 15 seconds like in the script. 2. Nightmare Balloon Boy's starting aggression is still randomised from 1-3 like Plushtrap, only being more aggressive (1-5) after the first successful movement. 3. Also, despite saying that the kitchen acts the same as the middle, I still show the possibility for Chica to go to the hall from the kitchen; she cannot! 4. Bonnie takes an additional second compared to Chica before being able to attack. FAQ: Q: I heard breathing, closed the door for long enough, but they didn't leave. What happened? A: Close the door when you hear them breathing, and you’ll always be safe. Right? Unfortunately, not exactly. There’s a small oversight, another discovery by Folmic, where if you're closing the door during a 10-second interval, Bonnie or Chica may not be able to be cleared. This is because during the door closing animation, you’re not considered to be listening to the door, allowing them to move back to the far hall, but then you finish closing the door and trigger that mechanic that moves them back, but disables clearing them. Because this animation is 10 frames long, it essentially means that you have a 1/60 chance of the door not working. Your only real recourse is if you notice that you hear footsteps from that side right after closing the door, and not later, and then you can just open it, check for breathing and close it again if you’re right. Q: I closed the door on Fredbear/Nightmare, but I still died? A: Animatronics can only be cleared from the door or closet at 3-second intervals, so that means that you were unfortunately too slow. Q: What does the breathing sound like? A: I play part of the sound at 3:34. You need to watch out for subtle sounds and be patient, the full sound (along with every other) can be heard here: https://youtu.be/TG0X18Rx20o?t=28 Q: What about the Halloween Edition animatronics (Nightmarionne, Nightmare Mangle, etc.)? A: They're just reskins. The only differences are that you can't see Nightmare Mangle in the hall (and she makes radio noises when he's in the closet), and there is a music box that plays whenever Nightmarionne is active Q: What about the cupcake? A: That is Nightmare Chica's bedroom jumpscare if she's by the door for too long (3:08 for how long)
  • @TheBadDeadFox
    FNaF4 protagonist is homophobic because they don't let Foxy come out of the closet
  • 1:50 This is probably for balance. It wouldn't make sense to let the opposite nightmare kill you while actively dealing with one of them.
  • The Nightmares behaviors are very terrifying if you think about it. They react to light with anger and extreme aggression, they move around the house a bit like intelligent humans. It's alot less they're stalking you, and they know where you are, but don't attack because they take sadistic pleasure in seeing the protagonist at the height of terror.
  • Other fnaf games are scary af however. All of its scary aspect can be avoided by just turning the volume off. However. This game actually forces you to not only turn on the volume but also to use an headset since your chances of victory relies on sounds the animatronic makes. Making each jumpscare scary
  • @haibara_jin
    I was beyond sleep deprived watching this, so the explosion and slow Foxy flips at 4:37 made me laugh so hard I started crying. Good stuff, love technical breakdowns of these games.
  • Something I noticed when playing the console port is when you pause the game, the animatronics all reset to the living room (aside from Freddy), which on Night 6/7/8 means you can pause the game when Fredbear appears and have him be active along with every other animatronic.
  • As a fellow game dev, it’s really cool to see how Scott programs the AI in his games. So fascinating!
  • @Yqe-
    Finally someone who properly explains mechanics without being overly clickbait or inaccurate
  • @vobeyt
    This man is CRIMINALLY underrated, great editing and video man. Very informative.
  • @etepapu8276
    Probably one of the most terrifying fnaf games i've played, and probably my favorite. Like, you can know where they are, you can predict where they go by hearing them, but you still can have the feeling of "What If I'm wrong?", which is made even worse considering that if you close the door on a moment you shouldn't, you'll be just making them get closer without knowing or having a feeling of "Did I lose track of them?", Which seeing your flashlight flickering just makes it worse to feel, specifically when you check a empty hall and it starts happening. It makes the gameplay so interesting for me in some way.
  • @puff7145
    The flashlight flickering is such an underrated mechanic for ramping up the tension. Even without it giving away much information it's still simple to make the connection about being in danger, and from then on, whenever you notice it happening you really get the feeling of "Oh fuck I'm about to die aren't I"
  • It took me this long to realize that FNAF is basically just horror chess against a computer lol, just like in the Thing it gets so crazy that it's almost impossible to beat 😅😂
  • @NowhereBunny
    I really love videos that look at the code to see their exact mechainc, please make more i love to hear it for the other titles!
  • @Real_Nutella
    You forgot that Nightmare will frequently trick you, and keep running back and forth between the left and right hallway. Eventually he will pick a side, but it's good to have earbuds so you can hear him faking you out. Also, if you hear Nightmare Fredbear or Nightmare laugh, AND you hear footsteps after, it means the laugh is fake. If there are no footsteps and JUST the laugh, you have to check the bed or closet.
  • @Mr._Tru3
    Fantastic in-depth video on the inner workings. Although you got one thing wrong - footstep sounds don’t change panning depending on where you are in the room. For example regardless of whether you were on the left or right and Bonnie made footsteps, you’d still only hear them in the left ear, and likewise with Chica’s footsteps in the right ear. Also wanted to point out that if you’re playing the Halloween Edition, beating Fun with Balloon Boy will give you a 2 hour boost on any of the first 5 nights and only 1 hour on any of the later nights
  • Even as a grown up, I still find Fnaf 4 to be the scariest out of all the other fnaf games. Not because the animatronics look scarier or that there are no cameras, it's all about the sound and anxiety that's building up and you can't even catch a break at all.