Media are best understood as a competition for attention on internet-connected screens. Phones, tablets, laptops, monitors, TVs—it's all just glass.

One of the creepiest scenes from Annabelle: Creation—a movie about a demonic doll possessed with the spirit of a dead girl—involves a girl, a toy gun that shoots a ball attached to a string, and a darkened hallway.

The girl, Linda, shoots the ball through bedroom doorway and, when she attempts to reel it back, finds that it has been seized by the darkness—presumably by the demon haunting her home.

The scene wasn’t initially part of the script for Annabelle: Creation, the fourth film in the universe created from The Conjuring films. Director David F. Sandberg, who made his directorial debut last year with Lights Out, dreamed that scene “like I was watching the movie almost before we had shot it and I woke up and wrote that down immediately,” he told the blog Bloody Disgusting.

For most of us, having such a dream would be a nightmare. But an enthusiastic Sandberg came to work the next day and asked screenwriter Gary Dauberman to work the scene into the script, cinematographer Maxime Alexandre, who also worked on the franchise’s next film, The Nun, told Quartz.

“That is the genius of James Wan and the freshness of David,” Alexandre said, referring to the creator of The Conjuring and the director, respectively. “There is a language of The Conjuring universe… It’s the unpredictability of every single minute.”

That unpredictability—and Sandberg’s passion for the project—drew Alexandre to Annabelle: Creation, even though he’d shied away from sequels (Annabelle: Creation is a prequel) in his career. Unlike a typical slasher flick or other horror film where audiences know the killer, the terror in The Conjuring series is tied to the tension that builds up from fear of the unknown. In Annabelle: Creation, the tension ramps up with the darkness for 10-30 seconds before it climaxes.

“It’s that unbearable moment before you get to the jump scares,” said Alexandre. ”You don’t know and you can’t predict it because you don’t know who you’re fighting. There’s a demon that has power and can move things without touching.”

Alexandre’s job was to give life to that darkness, and therefore, the demon. It may not be clear to the naked eye, but there’s movement in the pitch black in the film.

“Annabelle never moves. There is this rule about Annabelle,” he said. “So basically the darkness is the shadows of the demon moving through the space. And you are totally scared or freaked out about that.”