WARNING: The following contains spoilers for Detective Pikachu, in theaters now.

Although populated by photorealistic Pokemon from the popular video game franchise, Detective Pikachu draws from a multitude of cinematic influences. Screenwriters Dan Hernandez and Benji Samit looked to hardboiled fiction when developing the style and pacing of their story.

As they explained to CBR, those included the works of author Raymond Chandler and his quintessential private detective Philip Marlowe. Another major source of inspiration was the 1949 British noir film The Third Man; The first appearance by Detective Pikachu in Harry Goodman's apartment was structured to resemble a similar sequence in the Orson Welles movie, with the Pokemon rummaging through the darkened rooms before being confronted by Harry's son Tim.

RELATED: How Detective Pikachu Breaks the Curse of the Video Game Movie

With its use of omnipresent advertising, overcast weather conditions, neon-lit nightlife and underground clubs, Detective Pikachu has also drawn comparisons to director Ridley Scott's Blade Runner.

"That always makes me so happy," Samit said. "That movie was absolutely an influence, especially with all the neon and that that crowded street sequence; all the people going through with these weird creatures without giving them a second thought or needing to explain everything."

detective pikachu

To that latter point, the screenwriters also drew upon 1988's Who Framed Roger Rabbit as a clear world-building influence. The way the Robert Zemeckis film seamlessly combined the worlds of cartoons and humans with virtually no explanation for the hybridized worlds of Los Angeles and Toontown was integral for the creation of of Ryme City. Detective Pikachu never explores how humans and Pokemon live together in harmony.

RELATED: Every Pokemon Movie Ranked, According to Viewers

Hernandez compared the film's introduction of Ryme City through Tim's eyes to Luke Skywalker entering Mos Eisley and its iconic cantina in the original Star Wars. Detective Pikachu's setting is populated by fantastical creatures fully integrated into the city, including Machamps working as crossing guards and Pidgeottos filling the skies like common birds.

detective pikachu

The finale involves the film's true antagonist, megalomaniac Howard Clifford, trying to bring about the ultimate in the evolution of humanity and Pokemon by merging the two together through a mysterious chemical gas labeled "R." To enact his master plan, Clifford secretly fills PokeFloats in Ryme City's annual Pokemon parade with the gas before using his powers merged with Mewtwo to induce a mass transfer of consciousnesses from the hapless citizens. For Samit and Hernandez, the decision to have the sequence serve as the climax came from the prominence of PokeFloats in the Nintendo 3DS game Detective Pikachu while avoiding direct comparisons with Tim Burton's 1989 film Batman which had the Joker use balloons filled with toxic gas to kill citizens in Gotham City.

RELATED: One of Detective Pikachu's Twists Was Predicted By a 2016 Video

"The floats appeared prominently in the game, right?" Hernandez said. "So we wanted to include our own spin on it in the movie. Having said that, if you have a scene with giant balloons filled with poison gas, Batman definitely comes to mind. That was something we were all conscious of and we wanted to distance ourselves from that."

Directed by Rob Letterman from a script written by Dan Hernandez and Benji Samit, Detective Pikachu stars Justice Smith, Kathryn Newton, Ken Watanabe and the voice of Ryan Reynolds.