Image Credit: Everett Collection; Kobal Collection; Everett Collection(3)

In Rango, Johnny Depp voices a pet lizard who fancies himself an actor, only to find himself lost in the desert and drawing fire from the hardscrabble local critters with his tough-guy act. The comedy draws on Sergio Leone spaghetti westerns and Sam Peckinpah shoot-’em’ups for inspiration, but the film shout-outs don’t stop there.

Director Gore Verbinski, who worked with Depp on the previous three Pirates of the Caribbean movies says Rango is kind of a “film within a film,” packed full of movie references because Rango is such a storytelling buff and sees everything through that lens. For example, when he staggers into the town of Dirt, which is wasting away from a lack of water, suddenly the Chinatown references start popping up.

“We have a character who is literate in the Greeks and Shakespeare, but I think also in Leone, and Peckinpah and in this case Polanski,” says Verbinski. “The whole world is in some way a byproduct of his mind, and all the references are there because we have an actor as a protagonist.”

Here are some of Rango’s coolest movie riffs …

1. Don Knotts in The Shakiest Gun in the West

With his bug eyes, jittery way with a six-shooter and tendency to gulp in the face of danger, the lizard Rango tips his ten-gallon hat to Knotts, who was a meek dentist drafted into gunslinger duty in this 1968 comedy. Knotts made a career out of playing knock-kneed tough guys who are in over their heads. Though there are also allusions to Kermit the Frog in Depp’s voice, much of the physicality is borrowed from Knotts. “He even does that little sniffle, which is classic Don Knotts,” Verbinski says.

2. Clint Eastwood from A Fistful of Dollars

When times are tough for Rango, he finds himself wandering the desert, parched and hallucinating. A figure who appears to him for inspiration called The Spirit of the West takes a very familiar poncho-wearing form of the iconic, squint-eyed Man With No Name — who made a household name out of Eastwood in this 1964 film. The spirit guide even has a few faux-Oscars in the back of the golf cart he rides up to the lost lizard hero. “It seemed to fit,” Verbinski says. “Rango’s coming across this character from his head. In his brain he’s asking: What’s my ideal hero? This is his guiding light really.” The filmmaker says they never offered the real Eastwood a chance to voice his own caricature.”No, we wanted to stick within the confines of parody. We called Timothy Olyphant [of TV’s Justified] to play the Spirit of the West … Listening to the movie, hearing his voice, I said, ‘Wow, he sounds really familiar.’ [Olyphant] He says he gets that all the time”

3. John Huston in Chinatown

The tortoise mayor of Dirt, voiced by Ned Beatty, is a nod to Huston’s malevolent tycoon Noah Cross from Chinatown, sharing the same white hat, suspenders and stentorian voice. When Rango asks him what he wants, he even echoes a classic line from the 1974 film. “The future, Mr. Rango! The future!” Chinatown‘s plot involving the manipulation of Los Angeles’ water supply led to the character inspiration. “We knew we were enterting a western genre, and we wanted currency, but not money. So water became currency,” Verbinski says. “The outsider is an aquatic creature in a dry, hydration-less environment, so when we needed a plot, we went Chinatown-light just so we can have it there and tell the main story about The Great Pretender.”

4. Lee Van Cleef in The Good, The Bad and the Ugly

Rango’s machine-gun-tailed villain Rattlesnake Jake wears the flat-brim black hat of Van Cleef’s baddie from this 1966 western classic, and even shares a scaly version of his pencil-thin mustache. “We studied some screen grabs from Lee Van Cleef, and there were some where he even looks like a snake, with the angles on his face and piercing eyes,” laughs artist Crash McCreery, Rango‘s creature designer whose past credits include Jurassic Park and the Pirates movies. Verbinski says Bill Nighy’s voice acting also drew on cowboy villains played by Jack Palance. From the classic Shane? “Jack Palance from everything,” Verbinski says.

5. Lee Marvin in Cat Ballou

We don’t see a version of his bumbling Kid Shelleen, but Rango includes a spoof of Marvin’s metallic-nosed villain from that 1965 comedy Western: Tin Strawn. One of the first battles the lizard fights — and wins accidentally — is with a hawk who swoops down to terrorize the critters of Dirt. “If you look closely there’s a metal piece on end of the hawks beak, which is an homage to Cat Ballou, where they had the metal plate over Lee Marvin’s nose,” notes McCreery.

6. Hunter S. Thompson from Fear and Loathing in Las Vegas

This is a new western of sorts, as opposed to a tale from the old west — though it is just as wild, if not more so. When Rango finds himself launched from the safety of his aquarium during a road-trip, he bounces around the desert highway, gets his head stuck in a smile-face antenna ball, and splats on the windshield of The Great Red Shark convertible driven by two familiar disheveled figures — a wasted Dr. Gonzo in the backseat, and author Hunter S. Thompson’s alter-ego Raoul Duke in the driver’s seat. Depp played Duke in the 1998 surrealist comedy, and was a longtime friend of the late Thompson, recreating his deep staccato voice for this posthumous cameo.

“That came out of a comedy punch-up session early on,” Verbinski said. “Somebody said we shoudl see the red Cadillac drive by. And then someone said, no, no, it shouldn’t just drive by. He should land on the window.” The Thompson caricature’s line hints at the bizarre weekend they are having. “The reaction is not, ‘What the hell is that?’ its ‘Ho, there’s another one!'” Verbinski laughs. “He’s been seeing lizards with smiley faces all day long.”

Follow me on Twitter @Breznican