In the mid-1970s, my favorite actor, and probably the country’s leading comic performer, was Gene Wilder. In 1974, both “Blazing Saddles” and “Young Frankenstein” were huge hits, setting up Wilder for an improbable run of pictures built around his odd blend of talents. His face should have doomed him to be a character actor, but his attention-capturing facility became too great to shunt off to a side part.

A Jew from Milwaukee, Wilder could alternate deadpan Midwestern placidity (in “Blazing Saddles” he was a locus of stability) with babbling mad-scientist mania (the title role in the “Frankenstein” spoof).

Not knowing which way Wilder would tip — Repression or eruption? The whimper or the roar? — was what made him so funny.

In his first notable role, a walk-on in 1967’s “Bonnie and Clyde,” Wilder only had a couple of minutes of screen time, but he made them count as a meek bystander who gets himself kidnapped by the Barrow Gang and tries to get a grip on himself as the bank robbers tease him. Caught up in the high as he starts to think he might actually survive, he is hooting at their jokes when someone asks him what he does. “I’m an undertaker,” he says quietly. It’s a surgical puncture wound to the fun. “Get him out of here,” says Bonnie.

Just a year later, Wilder made his name with a supporting role in a very small movie that proved to have a very long life: “The Producers.” Zero Mostel was a looming comic zeppelin meant to dominate the movie, but it’s Wilder, morphing from a timorous accountant into a blithering hysteric, who created a series of character arcs — a character roller coaster. Wilder got an Oscar nomination for Best Supporting Actor and a promotion to big-time leading man.

Wilder’s greatest performance, little recognized at the time, was as the mysterious king of candy in 1971’s “Willy Wonka & the Chocolate Factory, ” a total flop on its initial release that, thanks to regular broadcasts on NBC over Thanksgiving weekend, became an indelible classic.

As was evident from Johnny Depp’s hideously off-kilter choice to turn Wonka into a high-voiced man-child pervert seemingly modeled on Michael Jackson, everything hinges on Wonka’s balance, his mystery. Is he a sadistic child hater with a knack for creative torture, or is he merely a big-hearted father figure who yearns for a deserving heir he can lavish with all of the wonders of paradise? It was Wilder’s idea to introduce Wonka with a pathetic limp that turns into an expert somersault: The audience wouldn’t know whether to believe anything about Wonka after that.

As with “The Wizard of Oz,” the film captured the essence of childhood — a journey into a frightening landscape of undreamt-of perils and pleasures. Wilder’s increasingly threatening sprechstimme as he sings a bizarrely unnerving song during the infamous tunnel sequence provides the nightmare that makes the film’s final resolution such a glorious epiphany.

Making the 1976 road comedy “Silver Streak” gave Wilder yet another boost — his character’s blackface portrayal of a stereotypical jive-talking dude was seen as comedy gold at the time, though it would probably get movie theaters burned down today. Wilder finally got the chance to play off Richard Pryor, who had co-written “Blazing Saddles” but had been nixed for the co-lead of the black sheriff (a role that went to Cleavon Little) because Warner Bros. was worried about his drug problems.

Yet Pryor helped to be the unmaking of Wilder; their next pairing, “Stir Crazy,” the comedy hit of 1980, left Wilder struggling for oxygen. Now Pryor was the biggest comedy star in the country and Wilder’s acting turned into shtick. His career hit a downward spiral with buffoonery leading to bad scripts and bad scripts making him pour on the nervy mannerisms. “Stir Crazy” would be his last hit.

Here’s why we’re going to miss Gene Wilder: