It surely was a good sign that after the premiere of “Humor Me” at the L.A. Film Festival you could hear moviegoers at other films in the days and nights to follow recite jokes they had heard in Sam Hoffman’s endearing feature debut, albeit usually not quite with the same perfect inflections as they were initially told onscreen by Elliott Gould. Inspired by Hoffman’s wildly successful web series “Old Jews Telling Jokes,” the writer/director is arguably even more crafty than Gould’s amateur comedian Bob Kroll in taking a clever short-form concept and building a poignant story around it touching on creative rejuvenation and what one generation passes onto the next in terms of tradition and values through the stories they tell for a hilarious comedy worthy of the big screen.

Although Cranberry Bog, the adult lifestyle community where Bob entertains his fellow senior citizens with ribald jokes, may seem like a last resort, not just for him in his elder age, but his son Nate (Jemaine Clement), a playwright who has come to live in his spare room when production on his latest play is halted and his wife (Maria Dizzia) takes off with their son, Hoffman allows it to be a place of enchantment for audiences. As Nate sees a path to redemption through a production of Gilbert and Sullivan’s “The Mikado,” aided by Allison (Ingrid Michaelson), the daughter of a retiree (Annie Potts) who’s similarly lost her way, the retirement village is reimagined as a playground full of activity where everyone can get a fresh start, with the anonymous track housing deceptive in how it hides all the big personalities inside.

If “Humor Me” feels overly accomplished for a first film, it’s likely because it’s far from Hoffman’s first film behind the camera, working his way up from being a production assistant to an assistant director on such films as “The Royal Tenenbaums” and “School of Rock.” With skills sharpened from handling nearly every job there is on a set, there’s incredible sophistication to his filmmaking, matching beat for beat the different but complementary comic rhythms of his leading men Clement and Gould with wily camera moves and rat-a-tat pacing that demands a second viewing since you may not be able to hear some of the punchlines over the laughs from a previous joke.

Shortly after the film’s premiere, Hoffman sat down to talk about the benefits of shooting in a retirement community (the locals were greeted Gould as if he were Brad Pitt), how he facilitated Michaelson’s move into acting – the singer/songwriter now appears in “Natasha, Pierre & The Great Comet of 1812,” and how he was able to use jokes to set up the arc of the story

Had you been aiming to direct a feature for a while?

It was always my aim. I was an assistant director for a long time. I worked for a lot of great directors —Wes Anderson, Woody Allen, and Rick Linklater, but I got sidetracked into producing, which has been a fun and interesting sidetrack, but I never lost sight of the fact that I wanted to direct something.

I had made this web series a few years ago called “Old Jews Telling Jokes” that went viral and then became an off-Broadway play, which I didn’t produce. But I wrote a book and I got interested in the idea how people used jokes — it became the genesis of the character Elliott Gould plays in the movie, like a guy who tells jokes, but he uses the jokes in order to not emotionally engage. I got interested in that character and since it tends to be a generational thing, it led me to the idea of a father-son story. Jemaine’s character was built on my own [experience of] when you write and you have trouble getting stuff made, and having trouble finishing things, so it was a combination there.

The act of joke-telling seems like such a difficult idea to build a film around without it feeling forced. Was it a challenge?

To me, the four jokes that we see [as pillars in the film] are like a Greek Chorus to the A story because the first joke is about a guy who’s literally been emasculated, the second joke is about a guy that’s lost and out of place, the third is a guy who’s on a desert island by himself, looking, trying to find his way, and the fourth is about a guy who’s trying to reconnect with his father. Then the jokes that Elliott tells himself in the body of the movie is just to show that he’s a joke-teller and he has a joke for every occasion.

You mentioned Jemaine and Elliott had different acting styles. Did you find that was actually conducive to the comedy of it?

Yeah, Elliott is more a quintessential actor. He was always essentially being real, and there was never any question that he was. I never watched a performance of his and thought he wasn’t in the moment. He’s just great that way, and Jemaine is a very good actor too, but has spent a lot of time trying to be funny. “Flight of the Conchords” is comic. so he would say to me [occasionally], “Why don’t you try this? This might be funny” He’s [always] thinking about whether stuff is funny. He’s more of a cerebral comic in that way. There’s one line in the movie that’s completely Jemaine’s when he walks into [his father’s] house for the first time and Bob, Elliott’s character, goes “What do you think?” And he goes, “It’s very… beige.” He totally made that line up when he saw the set.

Were there other happy surprises that came up that made it into the final film?

There’s probably too many to name. I’m not the kind of writer/director who’s so precious about what he’s written that if they came up with something better or more interesting or funny I wouldn’t try it. Also, part of the reason I was hoping Ingrid Michaelson would do the [film] is because the part was a musician who had been on tour and that’s truly what Ingrid is, so when she signed on, I said, “[There’s] this speech when you guys are having dinner and you’re talking about what happened [in your life and career]. What can I do with that speech to make it feel more real to you?” And she wrote that speech.

Did you actually plan to have her song “Be Okay” in the film before casting her? It’s so perfect thematically for the scene you use it for.

Basically, I was writing to music and that song “Be Okay” came on, and I thought, “Wow, this is tonally interesting for the movie because on the surface, it’s a peppy, bright pop song, but it’s actually got a little bit of a dark undercurrent of trying to not be depressed,” and then I thought, “I wonder if she’d consider acting.” So I got in touch with Lynne Grossman, who works with her, and Ingrid was actually the very first person who said yes to me – years ago! Years before I made the movie, Ingrid read the script and she loved it and thought a lot of common ground with what she does because if you listen to her music, there’s a lot of heart in her music. She said, “when you’re ready, call me,” and I did. I always loved the idea of her doing the movie. Now she’s on Broadway.

This seems like a very makeable film – did your experience as a producer come in handy as a writer/director?

Completely. I wrote it very much thinking about it being small, manageable, and a modest story to tell and could be modestly budgeted and shot in a short period of time, but I feel like we really got our bang for our buck. It really looks bigger than it is and the jokes were fun because one of them was on a desert island and one of them was on an army base, and we had to figure out how to do all that stuff.

Did you actually embed yourself in a retirement community to shoot it?

Yes. [Retirement communities are] hard to find in New York, but New York gives you a tax incentive, so you can’t go to New Jersey because you lose money. And I had a wonderful location manager by the name of Dave Ginsberg, who grew up in Staten Island, and he found us this community on the shores of the harbor there where everything was perfect. All the houses look the same and the nice thing about Staten Island is that it’s part of New York City, but it’s far away enough that people are excited to have a movie shoot in their town. It’s not Manhattan [where] people are exhausted by the idea of trucks on their street. These guys were incredibly hospitable, they welcomed us and we shot all the interiors in the various houses there. We took over an empty house and made that into Bob’s house. We painted it and dressed it and that was Bob’s house and what was incredible was we realized when we were shooting the exteriors of the houses, you didn’t actually need to go to any other houses because they all looked the same. You could just do them all in front of the same house. [laughs] And [you’d change the] context to make you think you were somewhere else.

It looks like you had a lot of fun. There’s a great chase on golf carts that take advantage of the street roundabouts and you make a trip to the laundry room seem like a scene out of “Ocean’s 11”…

That was my little homage to Wes Anderson, because I’ve done four movies with Wes and one of the things that Wes does often is he has very fast-tracking shots that track laterally to the action and then pan at the end. I adore Wes and I’ve learned so much from him, I thought I’m just going to do a quick little Wes sequence. Also, I try to have great faces in that sequence. You’ll notice most of the people in that sequence are not [main characters] in the movie. They’re just random atmosphere, but they give you a flavor of the space and just to have a quick comic take on the community…and to sneak a bare old butt into the movie. [laughs]

“Humor Me” does not yet have U.S. distribution.