Back in early 2017, Netflix approached “Black Mirror” creators Charlie Brooker and Annabel Jones with an unusual idea. The streaming service had been experimenting with interactive kids content, giving young viewers the ability to choose their own path through a story with a series multiple-choice questions that could be easily answered with the help of a TV remote.

Now, Netflix was ready to bring the same format to an adult audience — and “Black Mirror” seemed like a perfect fit. Except the two creators weren’t having any of it. During a recent interview with Variety, Brooker recalled his initial response: “No f—ing way!”

Jones agreed, in part because she had never really liked prior examples of interactive storytelling. “To me, they always felt a bit gimmicky,” she said. But when they started to discuss ideas for future episodes of the show a few weeks later, they came up with a plot that really only worked as an interactive movie. “At that point, it was pretty simple,” recalled Brooker.

The result is “Black Mirror: Bandersnatch,” Netflix’s first-ever interactive movie for adults, which debuted on the service Friday. Set in 1984, “Bandersnatch” is the story of geeky teenager Stefan (played by Fionn Whitehead of “Dunkirk” fame) who sets out to turn a multiple-choice science-fiction book by the same title into a pioneering computer game that also presents the player with a series of choices.

Early on, we learn that eccentric author of the original “Bandersnatch” book descended into madness while writing the multiple-choice adventure, ultimately killing his wife. And it’s not too much of a spoiler to say that Stefan is struggling with his own inner demons — and single-handedly turning the book of a madman into a highly complex multiple-choice computer game doesn’t exactly seem to improve his mental health.

Brooker said he could empathize with those feelings. “What we were trying to do was what Stefan was trying to do,” he said. “There were many points where we felt it was driving us crazy.”

Courtesy of Netflix

One of the choices in “Black Mirror: Bandersnatch.”

Luckily, Brooker and Jones had the Netflix product team to keep them sane. Following the production of interactive kids titles like “Puss in Boots: Trapped in an Epic Tale” and “Buddy Thunderstruck: The Maybe Pile,” Netflix director of product innovation Carla Engelbrecht realized that the company was on to something. “There is so much more that we can do than just linear television,” she said.

But while younger viewers may be fine with relatively simple choices, adult audiences clearly require more complexity, which can be a huge logistical challenge. That’s why Netflix engineers built the company’s very own script-writing tool for branched narratives, dubbed Branch Manager.

The tool allows creatives to build complex narratives that include loops, guiding viewers back to the main story when they strayed too far, giving them a chance of a do-over, if you will — something that Jones and Brooker artfully incorporated into the story. At one point, one of the key characters even tells Stefan that he chose the wrong path, leading him to realize: “I should try again!”

“Bandersnatch” comes with five possible endings. Viewers who choose the quickest path, and decide against any do-overs, can make it through the film in around 40 minutes. The average viewing time is around 90 minutes.

Altogether, there are over a trillion unique permutations of the story. However, this also includes relatively simple iterations that don’t necessarily alter the story itself. For instance, one of the first decisions is helping Stefan to choose which cereal to eat in the morning. “We want [viewers] to have a successful choice early on,” said Engelbrecht.

Engelbrecht’s interactive content team got a lot of help from across the company to build the tech for “Bandersnatch,” which also included tweaking the way Netflix streams content. “Fast-forward breaks in a nonlinear story,” she explained. Instead, Netflix began testing simplified playback controls with “Bandersnatch.”

Another tweak affects Netflix’s streaming itself: The service’s apps typically pre-cache some content to make for a smooth streaming experience even when a viewer’s internet connection temporarily slows down. For “Bandersnatch,” the app now has to pre-cache two possible paths — something that older versions of the Netflix app aren’t able to do.

That’s why the movie isn’t available on Netflix’s app for some older smart TVs. The company is also excluding “Bandersnatch” from playback on Google’s Chromecast and Apple TV for technical reasons, but Netflix vice president of product Todd Yellin didn’t seem to be too worried about leaving anyone behind. “Almost every single Netflix household has a device that can play ‘Bandersnatch,'” he said.

Other design decisions that went into the creation of “Bandersnatch” are more subtle, and sit somewhere between product design and storytelling. For instance, the team had to figure out the right pacing for an interactive story like this. Give viewers too many choices, and they may tire of all those decisions. Let the plot go on too long without a choice, and half the audience may have misplaced their remote controls. “We talk about cadence a lot,” said Engelbrecht.

Jones and Brooker also recalled pushing Netflix’s tools to their limits with “Bandersnatch.” “It kept expanding, even when we were in pre-production,” said Brooker. “We deliberately pushed what was going to be possible.” Until one day, they hit the wall, or rather the boundaries of Netflix’s Branch Manager tool. “The story outline crashed,” he recalled — a first for the seasoned TV writer.

Interestingly, the same thing happens to Stefan during the final sprint to complete his interactive computer game. And the similarities don’t end there. Brooker and Jones skillfully play with the motives of branched stories, repeatedly throwing off their viewers just when they think they’ve got the hang of the whole multiple-choice thing.

The duo also incorporates the viewers themselves into the story and even gives the Netflix brand a cameo. Along the way, viewers will begin to wonder who really is in charge, and whether their choices actually matter. In the words of Colin Ritman (played by Will Poulter), the genius video-game programmer/high-tech shaman who becomes Stefan’s coworker and mentor: “How one path ends is immaterial.”

A choice point in “Black Mirror: Bandersnatch.”

Ultimately, this ability of the “Black Mirror” creators to screw with their audience’s minds does make for a perfect fit for Netflix’s first adult interactive story. It also seems to set the bar impossibly high, leading one to wonder: How can anyone can ever create a story this perfectly suited for this nascent format again?

Yellin said that the company had plans to try interactives for other types of stories as well, including comedies, romance and possibly even horror movies. “This just happens to be a great audience for the first one,” he admitted.

Which raises the question: What is Netflix aiming to do with this new format, anyway? There had been some rumors that the streaming service was trying to expand into video games, which was fueled by the company’s partnership with the now-defunct gaming studio Telltale.

“We don’t think of this as a game,” Yellin responded. “We are telling stories,” added Engelbrecht. Ultimately, the goal was to advance storytelling, offer creatives new ways to express themselves, and give viewers a lot more things to talk about. Said Yellin: “We think we are onto something that could be really exciting.”