Gerard Johnstone's "M3GAN" became an internet sensation after the trailer showed an android doll dancing in a hallway, but when critics finally saw the whole film they recognized it as much more than a meme. Gerard Johnstone's "M3GAN" is a smart and emotionally mature motion picture about a young person trying to avoid dealing with the realities of death by glomming onto high-tech robotics and artificial intelligence in the form of an automaton that, before long, goes on a killing spree and obliterating the annoying people that get in her way.

Yes, "M3GAN" has earned rave reviews for both its entertainment value and its narrative ambition. And that's all well and good for "M3GAN," but it was not the first film to match that extremely specific criteria, but critics — and the harsh realities of the studio system — weren't as kind to horror icon Wes Craven when he tried to something extraordinarily similar way back in 1986.

This is the saga of Wes Craven's "Deadly Friend," a critically savaged and financially unsuccessful film that presaged "M3GAN" in many ways.

'Bot Through The Heart, But Who's To Blame?

Evil doll stories go back many, many years, and you can find them in films like "Dead of Night" (1945) and the super-creepy classic "Twilight Zone" episode titled, appropriately enough, "Living Doll." But although Wes Craven's movie was about a kid with a high-tech toy that goes murderously awry, it wasn't a typical doll. It was a high-tech robot named "BB" that rolled around making cute noises, not entirely unlike future "Star Wars" breakout character BB-8.

Invented by a brilliant teenager named Paul Conway (Matthew Laborteaux, who also played a teen science nerd in the short-lived cult series "Whiz Kids"), BB is an artificially intelligent robot that is ultimately destroyed by an angry neighbor. That's bad enough, but when the girl he has a crush on, Samantha (Kristy Swanson, the original "Buffy the Vampire Slayer"), is killed by her abusive father, Paul gets it into his head to save two birds with one robotic stone.

Paul breaks into the hospital where Samantha is about to be taken off of life support, and implants BB's computer brain into her actual, squishy brain. It's supposed to bring her back to life but BB takes control, transforming them into a hybrid entity that — for some reason — now has superhuman strength, and the urge to kill all of their enemies in outlandish ways. Including one of the most notorious deaths in horror movie history, where Kristy Swanson throws a basketball at an old lady's head so hard it explodes, and then the headless body walks around for a little while afterward.

The Men Who Glared At Notes

While "M3GAN" would eventually lean into the absurdity of its premise on purpose, to critical acclaim no less, Wes Craven's "Deadly Friend" was never intended to be kitschy. It wasn't even supposed to be gory.

"Deadly Friend" was based on the novel "Friend" by Diana Henstell, and adapted into a screenplay by Bruce Joel Rubin, who would later win an Oscar for writing "Ghost," and also wrote the screenplay for the horror classic "Jacob's Ladder." Rubin had a penchant for stories about death, and Craven had a knack for directing intelligent genre films that defied expectations. Craven, who at the time was preparing to direct "Beetlejuice" and then "Superman IV" before getting dropped from both projects, was after something a bit more ambitious than a violent shocker.

Unfortunately, their attempts to make an eerie romance between a teenager and their resurrected girlfriend were torpedoed by, ironically, Craven's own success. After the runaway smash hit "A Nightmare on Elm Street" Craven had become a known commodity to horror fans, and test audiences for "Deadly Friend" responded most favorably to the single scene in the movie — a nightmare — than all the rest. The studio notes demanded that the film become gorier, have more frightening dream sequences, and get a new ending that makes no sense whatsoever.

Whereas "M3GAN" was intended to be a franchise picture, and cleverly and organically establishes a path to future sequels within its storyline, "Deadly Friend" had its finale awkwardly reshot. In the finished film, after Samantha/BB is once again killed, Paul once again breaks into the morgue. But this time the corpse comes back to life and kills him, while the flesh falls off of its body, revealing that — somehow (?) — Samantha is now a robot in human skin wearing an unconvincing mask!

Friends Till The End

Wes Craven's career was full of ups and downs. He directed some of the most popular, acclaimed, and influential horror movies in history, like "Scream," "A Nightmare on Elm Street," and "The Hills Have Eyes," but he also made forgettable dreck like "The Hills Have Eyes Part II" and "Deadly Blessing." At least "Deadly Friend" is noteworthy for its bizarre tonal shifts and outlandishly weird moments, even if they were studio-mandated and had nothing to do with his actual artistic vision. But the reviews were brutal. Future Oscar-nominated screenwriter Paul Attanasio ("Donnie Brasco"), then a film critic for the Washington Post, called it "a movie whose ho is exceeded only by its hum."

Meanwhile, "M3GAN" has been admired for doing what Craven was trying to do whilst simultaneously acknowledging the fundamental camp of its premise. "M3GAN" has the human melodrama that "Deadly Friend" was going for, but it also takes absolute glee in letting its artificially intelligent surrogate friend go on a murderous rampage. In "M3GAN" the carnage is a feature, not a bug, which was probably wise since if history is any indication, they'd probably have had to go back and add a bunch of mayhem in post if they'd eschewed it.

We leave you now with the haunting "BB" musical theme from "Deadly Friend." You can thank us later.

Read this next: Horror Movies With Unconventional Monsters

The post Before M3GAN, There Was Wes Craven's Deadly Friend appeared first on /Film.