"M3GAN" is a movie that takes pretty clear inspiration from some horror and sci-fi classics. It's part "The Terminator" and part "Child's Play," but it still feels fresh and original, with surprisingly deep ideas about the future of AI. According to director Gerard Johnstone, though, the movie also takes its cues from a 21st century horror-comedy classic — one that's not afraid to have fun even as it scares us: "Shaun of the Dead."

Edgar Wright and Simon Pegg's 2004 zombie outbreak classic stars Pegg and Nick Frost as a couple of pals trying to survive the end of days. The movie is action-packed, gory, and genuinely freaky at times, but it's above all else outright hilarious. In an interview with /Film's BJ Colangelo, Johnstone spoke about striking a balance between horror and comedy, crediting "Shaun of the Dead" for teaching him a vital lesson.

When asked about which fun horror films Johnstone admires, the filmmaker cited the rom-zom-com, saying Wright and Pegg are obviously standouts. "My big lesson from them when I first watched 'Shaun of the Dead' and it just completely blew my mind, was just how seriously they took both genres," Johnstone shares. "So that's something that I realized when I was making 'Housebound' that I had to do right."

Johnstone's 2014 feature directorial debut follows a woman on house arrest in a potentially haunted home. The movie garnered excellent reviews when it debuted, and has become a cult favorite. Last year, BJ wrote about its many merits for /Film, declaring that "Horror comedies often lean staunchly in one direction, but 'Housebound' captures the perfect balance."

Take Both The Horror And The Comedy Seriously

Johnstone struck a great balance between horror and comedy with "Housebound," and continued it with "M3GAN," a movie that offsets its most violent and unsettling scenes with moments in which the titular android does a hair-twirling dance or breaks into spontaneous song. "If I was going to do this," Johnstone says about the lesson he learned from "Shaun of the Dead," "I had to treat the horror as seriously as I did the comedy."

While Wright's film is perhaps the quintessential horror comedy of the 21st century to date, Johnstone also name-drops a few other greats that he considers fun horror touchstones. "I'm a big fan of Sam Raimi, 'Drag Me to Hell' and 'The Evil Dead' trilogy," he tells /Film. He also commends Wes Craven, plus the "very deadpan" films of Joel and Ethan Coen, which he says employ "just a very dry tone, but you can tell they're secretly making comedies."

Plenty of that humor shines through in "M3GAN," a movie that keeps its humor just below the surface of its horror in a way that feels at once campy and clever. The movie benefits from a screenplay by "Malignant" writer Akela Cooper, and everything from its android design to its lead performances to its musical choices make it a wildly entertaining time at the movies.

"M3GAN" is now in theaters

Read this next: The 15 Best Final Girls In Horror Movies Ranked

The post M3GAN Director Gerard Johnstone Learned a Key Lesson From Shaun of the Dead [Exclusive] appeared first on /Film.