WARNING: This article includes spoilers from the new film “Ready Player One.”

When author Ernest Cline was working on his dystopian sci-fi-adventure novel “Ready Player One,” he thought it was unlikely it would ever be made into a movie. As a first-time novelist, he figured he’d be lucky just to get the thing published.

The story of a worldwide digital treasure hunt set largely inside a virtual reality realm called the Oasis, the book was stuffed to the gills with virtually every pop culture nugget that Cline had cherished since childhood, from the role-playing game Dungeons & Dragons to films such as “Back to the Future” and “Monty Python and the Holy Grail” to old arcade games such as “Pac-Man” and “Joust.”

Even without a background in intellectual property law, Cline knew that anyone who attempted to cram all of that disparate material into a single movie would face a rights-clearance nightmare. “I had envisioned it as being an unfilmable book while I was writing it,” Cline says. “I could see what a herculean task it was going to be.”


Then Steven Spielberg signed on to direct the film version of “Ready Player One” — and, with the clout of one of the most successful directors in Hollywood history brought to bear, suddenly the herculean seemed within reach.

“Once you have Steven, you stop worrying about it being makable,” says Zak Penn, who co-wrote the screenplay with Cline. “If he tells you you can do it, you can do it.”

Indeed, nearly every frame of Spielberg’s film, which opened Thursday, is densely packed with nostalgia-triggering totems from films, TV shows, games and toys, mainly from the 1980s, but also from earlier and later eras. The result is the most impressive cinematic exercise in pop culture cross-pollination since “Wreck-It Ralph” and “The Lego Movie” — if not of all time.

Still, moviegoers familiar with Cline’s 2011 best seller will find that, while the book’s spirit and overall story have been faithfully translated, a number of the specific references were altered on the way from the page to the screen. Gone, for example, are sequences from the book that centered on the Dungeons & Dragons module “Tomb of Horrors,” the films “WarGames” and “Blade Runner,” the early text-based computer game Zork and the Rush album “2112.”


In their place are several new set pieces, such as a raucous, eye-popping Mario-Kart-style car race and a sequence set in the Overlook Hotel from Stanley Kubrick’s film “The Shining.”

For the team behind “Ready Player One,” the complex job of working out which specific references to pack into the film involved both story considerations (some elements of the book translated better to the medium of cinema than others) and legal factors (some rights-holders were more amenable to having their material used than others).

“It was a clearance bonanza,” says Spielberg’s longtime producing partner, Kristie Macosko Krieger. “We started working well before we started filming the movie because if we couldn’t get the clearances up front, you couldn’t film a lot of the things that we needed for the movie. We had to know we had most of it going in.”

“Kristie worked very hard with Warner Bros. legal to try to clear as many [intellectual properties] as we possibly could to get them all into the film,” Spielberg says. “We weren’t able to clear all of them. We had a big wish list. But we did very good. We had tremendous cooperation all around town with different studios and different licensing companies and we probably cleared 80% of the things we wanted.”


While many rights-holders were more than happy to see their properties featured in a big-budget Spielberg movie, a few balked. Spielberg had hoped to include a sequence in the book that is set within the classic 1982 Ridley Scott film “Blade Runner,” but that plan was ultimately shelved.

“We tried very hard to do the Deckard scene in the book,” Spielberg says, referring to the “Blade Runner” character of Rick Deckard, played by Harrison Ford. “But even though Warner Bros. released ‘Blade Runner’ and Warner Bros. financed ‘Ready Player One,’ they had no rights to the IP.

“The producers [at Alcon Entertainment] had to approve it and they wouldn’t because they had their movie [‘Blade Runner 2049’] coming out and they didn’t know if we would enhance their commercial prospects or not, even though we were following the release of the latest ‘Blade Runner’ film.”

Similarly, the filmmakers were unable to clear the rights to the 1960s Japanese sci-fi TV series “Ultraman,” whose main character features prominently in the book’s climactic battle. Instead, the enormous robot from Brad Bird’s much-loved 1999 animated film “The Iron Giant,” which had been released by Warner Bros., was called into action.


For that matter, Warner Bros. was understandably happy to allow the film to be peppered with other characters from its stable of properties, including DC Comics, Looney Tunes and film franchises such as “Mad Max” and “A Nightmare on Elm Street.”

The decision to set one of the film’s key treasure-hunt challenges inside of Kubrick’s “The Shining” — and to re-create some of the classic horror film’s biggest scares — came from the same urge to pay homage to a cherished piece of pop culture that had animated the book. Spielberg had been friends with Kubrick, who died in 1999 and had always loved the film, as did Cline and Penn.

“Steven is a celebrater of the things he loves and is so passionate about them,” Cline says. “That’s what I love so much about that ‘Shining’ sequence. It’s Steven celebrating one of his friends and one of his favorite filmmakers. That’s Steven doing for Stanley what I was doing with the book.”

As a bonus, Penn says, “The Shining” sequence didn’t require any deep familiarity with the film on the part of younger moviegoers who were not yet born when it came out in 1980. “One of the reasons that sequence works is it’s no longer dependent on you knowing the trivia,” Penn says. “It’s a haunted house, and that’s all you need to know.” (That Warner Bros. also released “The Shining” clearly didn’t hurt either.)


Other changes were made simply to help the book’s story better fit the visually kinetic medium of cinema. “Some things that work in a novel will not work in a film,” Cline says. “In the book, you can have somebody stand and play a six-hour perfect game of Pac-Man and that works. But nobody wants to see that in a movie.”

That also went for a sequence from the novel in which a character cracks a challenge thanks to his in-depth knowledge of the 1983 Matthew Broderick thriller “WarGames.” “We’re not going to watch someone recite every line from ‘WarGames’ — that would be boring,” Penn says. “From the beginning, I basically said, ‘Look, these are all great references. But that’s not what’s important. What’s important is telling the story well.’”

In the end, for all the tweaks here and there, Cline is more than satisfied that his story has been told well on the screen and that the essential core of his nostalgic geek love has been preserved.

“It’s a strange thing: A lot of fans of a beloved book will go into a movie with their arms folded and it’s like, ‘This better be the same,’” he says. “But when has it ever been the same? And you don’t want it to be the same because you already had that experience.”


josh.rottenberg@latimes.com

Twitter: @joshrottenberg