L-R: Peter Fonda in 1976’s Futureworld; Rodrigo Santoro in HBO’s Westworld; Yul Brynner in the original Westworld Photo: Getty Images, HBO

HBO’s ambitious Westworld premieres this Sunday, after years of trying to get this franchise back off the ground — including a canceled 2007 remake that almost starred Arnold Schwarzenegger. But the most anticipated show of the season has a lineage that goes back much further — almost a half-century — to a hybrid sci-fi–Western that would change how special effects are processed and inspire future classics like The Terminator and Jurassic Park. It was a film that almost never happened. Studios turned it down, the rookie director had an incredibly low budget, and the special effects almost didn’t get done in time. And yet, everything came together for Westworld.

In May of 1969, a 26-year-old Chicago writer became a household name when his vision of a viral alien invasion in The Andromeda Strain became an international best seller. Film rights were sold almost immediately and the movie came out two years later, landing in the box office top 20 for 1971 and earning two Oscar nominations. He wasn’t even 30, and Michael Crichton was already a brand — a name that meant high-brow, intellectual science-fiction. And he would use that brand to further an already-blossoming film career, starting with 1972’s Pursuit. Based on his book Binary, Crichton only agreed to sell the rights if he could direct the ABC TV movie with Ben Gazzara and Martin Sheen. His feature film debut would come next.

By the time Pursuit aired, Crichton had already been shopping around his script about an adult amusement park — populated by robots — gone awry. In Westworld, the human need for escapism extends all the way to a facility in which men and women can visit times and places they’ve only seen in fiction, like Romanworld, Medievalworld, and Westworld. Visitors interact with robots, leaving them free of the moral complications that come with things like robbing banks, sleeping with saloon girls, and murdering outlaws. However, it all collapses when the robots malfunction and begin fighting back. Westworld contains so many of the elements for which Crichton would become historically known, including the hubris of authority figures who cut corners and play God. He would essentially rewrite it 20 years later, replace the robots with dinosaurs, and call it Jurassic Park.

Long before then, no one wanted to make a Michael Crichton movie about killer robots. Crichton had shopped the script around to all of the major studios, only getting a hesitant yes from MGM, a studio known at the time for interfering with directors and recutting films after production. Crichton didn’t want to go there, but he had no other options, and he ran into problems from the very beginning. He was a rookie director at a meddlesome studio, which meant he was constantly fighting for control. Crichton reportedly had no say in casting, and the leads weren’t even chosen until 48 hours before shooting, although Crichton got lucky there. Richard Benjamin and James Brolin would play two visitors to Westworld, and Yul Brynner would essentially riff off his iconic performance from The Magnificent Seven, wearing an identical gunslinger costume as the deadliest robot in the Old West. Budgeted at just over $1 million and given 30 days to shoot, Crichton’s film employed a unique blend of traditional effects and what would become the norm 40 years later in computer-generated imagery.

While Crichton was always kind in interviews regarding the process of making Westworld, two interesting stories emerged. First, the film was cut by ten minutes after production in order to get a PG rating. Decades later, as stories have emerged regarding the “adult nature” of the upcoming HBO iteration, one can only wonder what that R-rated Crichton version would have included. More troublesome to the production was Crichton’s desire to give the Gunslinger’s point of view a distinct, nonhuman look. As he said, “What special-effects technique would best suggest a machine’s point of view? I proposed a rather simple solution: to show the point of view of a machine, use a machine.” In the final act, when Brynner’s character has gone homicidally “viral,” we see through his eyes as he hunts Benjamin’s terrified human character. These shots would be created using a machine — a.k.a. computer generated — something that happens with such frequency in today’s films that we take it for granted, but that hadn’t really been done in 1973. Crichton’s vision was originally more ambitious than the final result, describing in his script “a bizarre, computerized image of the world.” One can imagine the HUD images from The Terminator, a franchise that might not exist if not for Westworld.

At first, it seemed like the two minutes of CGI that Crichton wanted for the Gunslinger’s POV would be cost prohibitive. Crichton went to the Jet Propulsion Laboratory in Pasadena for help and was told it would take nine months and cost $200,000. Neither was going to be an option, as the entire film had six months to be completed. Crichton turned to experimental filmmaker John Whitney, who referred him to his computer-fascinated son, John Whitney Jr. He agreed to work on the CGI for only $20,000, and to get it done in four months. It would take much longer. Each shot of the Gunslinger’s POV had to be painstakingly rendered to the degree that the computer processing alone took eight hours to produce ten seconds of film. Weeks before release, the effects weren’t complete. It was so down to the wire, they almost had to cancel their release date in November of 1973.

But they made it just in time, and the well-reviewed Westworld ended up becoming the highest-grossing film of the year for MGM. However, Crichton was deeply dissatisfied with the final product, pulling back from film and science-fiction for several years. He was clearly exhausted by all of it, claiming publicly that people misunderstood the film (it’s not a warning against technology, but against corporate greed). He wouldn’t direct again until 1978’s Coma.

Of course, a box-office hit meant the same thing then that it means today — franchise! MGM moved forward with a sequel without Crichton’s involvement, developing Futureworld. In the 1976 sequel, Peter Fonda and Blythe Danner play reporters brought back to the reopened adult amusement park, which now includes a Spaworld and Futureworld (Westworld remains closed). While there, the reporters remain skeptical of the safety and purpose of this new Futureworld, discovering in the final act that the people behind it are trying to create robot replicas of international leaders and our heroes. It’s a defiantly goofy movie and yet never as much fun as it should be. Despite the general failure of Futureworld, sci-fi was huge in the late ’70s, and so CBS thought it wise to invest in a TV series based on the Crichton original. Beyond Westworld, which ran on TV in 1980, starred Jim McMullan as a security chief at Delos, the company that owns Westworld, who discovers that a head scientist there is trying to build robots to take over the world. It aired on CBS for only three episodes, with two more produced episodes that never ran, but would later be released on DVD.

The Westworld franchise might have ended with the cancellation of Beyond Westworld, but themes from the original film persisted and kept finding their way into popular fiction, making it a cultural reference point in everything from The Simpsons to Iron Man 3. In an ironic twist, Arnold Schwarzenegger, who became famous playing a character seemingly inspired by Brynner’s “Terminator-esque” Gunslinger, was set to play him in a remake at one point. Variety reported in 2002 that Schwarzenegger had been cast and the project was being fast-tracked by WB, but Ah-nuld’s political career got in the way. A couple years later, director Tarsem Singh (The Cell) was attached to the project briefly and Quentin Tarantino was allegedly approached, but a feature film remake never came to fruition.

WB legend Jerry Weintraub had been the man trying to get a remake off the ground for years, and his recent success at HBO with Behind the Candelabra made the network an interesting option. He took the project to co-writing couple Jonathan Nolan and Lisa Joy, who saw a chance to use Crichton’s film as a template for something far more ambitious in scope, closer to Game of Thrones. The pilot was announced in 2013. Nolan would direct and J.J. Abrams and Bryan Burk’s Bad Robot would produce (as they do Nolan’s Person of Interest).

Just as it was in the ’70s, HBO’s Westworld is once again an ambitious project with a tumultuous production. When HBO first announced the project, they promoted a 2015 premiere, but production was shut down for four months as the writers reworked the final four scripts of the season, forcing a delay to 2016. Nolan has said the size of the thing got away from the production in that they were really making a ten-hour film, and the writing had to catch up, but delays never look good to the public. A controversial performer waiver hit the net that included “genital-to-genital touching,” and it felt like people were speaking more about the production of the show than the show itself. Luckily for HBO, early reviews have been nearly unanimous in their rapturous praise. Only time will tell if this version has the same impact as Crichton’s original.