Sarah Goldberg (left) and Bill Hader (right) star in the new HBO series “Barry.” The dark comedy features the story of a hitman, played by Hader, who travels to L.A. and joins the local art scene. JORDIN ALTHAUS/HBO

After a career of playing goofballs and caricatures, “Saturday Night Live” alumnus Bill Hader chose a distant deadpan and a somber tone for his new HBO dark comedy, “Barry.” The result is a hilarious, yet often chilling, portrayal of a deadly assassin as he grapples with morality and personal fulfillment through the prism of his new acting class.

“We started finding all these really interesting parallels almost immediately,” co-creator Alec Berg said in a video interview on April 5. “If you’re a hitman, you have to live in the shadows and you have to be anonymous and you have to shut your feelings off. And to be an actor, you literally have to stand in the light.”

The balancing act between the two professions leaves plenty of room for comedy amid the title character’s self-exploration in the half-hour show. Hader’s Barry Berkman is a veteran of the Marine Corps who, feeling directionless, takes up work as a domestic assassin upon returning from Afghanistan. When one of Barry’s targets leads him to a Los Angeles acting class, the emotionless killer falls in love with the artform, despite his lack of any apparent talent.

“To act bad, I watched true crime,” Hader said in the same April 5 video interview. “I love true crime shows so I watched a lot of reenactments on true crime shows which are really bad.”

In between the laughably bad acting — one plot line depicts Barry and a classmate preparing a reading of the climactic confrontation from the 2008 film “Doubt” for the wildly inappropriate venue of a former classmate’s memorial service — the show explores the dark side of both of Barry’s professions. In one scene, Barry contemplates the repercussions of being a killer. In the next, Barry’s classmate Sally, played by Sarah Goldberg, is sexually harassed by her agent.

“This sad thing was that’s just a truth of the industry,” Hader said. “And then that flipped into what Barry does at the end, where he’s trying to, in his mind, do something nice. But then we see it from her point of view.”

In the scene Hader is referencing, Barry shows up to a party comically dressed in exactly what he found on the mannequin at a J. Crew store. Emboldened by their budding romantic relationship, Barry attempts to gift Sally a laptop and then gruffly breaks up a flirtatious conversation in an extremely misguided attempt to be a desirable partner.

“Most of the women in the room were like ‘That’s super creepy,’” Hader said. “The kind of guys in the room were like ‘no that’s just a nice thing to do.’ And [the women were] like ‘no that’s super weird.’”

Berg said the change in tone for the scene, which was initially written as a way for Barry to woo Sally, is “a tremendous argument for having diverse voices in a room.”

“If it was a bunch of white dudes in a room, he would’ve given her a laptop and she would’ve went ‘thank you! Oh my god, you’re so sweet!’” Hader added.

Hader and Berg began working on the show in 2014 after being connected by HBO. Berg, a veteran of “Seinfeld” and “Silicon Valley,” said the show grew from “the idea of being very gifted at something that you derive no pleasure from.” Hader, a cast member of SNL for eight seasons, often speaks about the anxiety he experienced performing on live television each week. Now tasked with acting in, writing and directing a show about a man uncomfortable in his own skin, Hader finds himself at ease.

“Doing all that is still easier than being a cast member on Saturday Night Live,” Hader said. “It sounds silly, but it really is just taking care of yourself… When you’re acting you go ‘oh no I’m just thinking about today’s scenes, not next week’s scenes’ or whatever. We’re just going to talk about today.”

Hader and Berg put together a more-than capable cast to direct. Henry Winkler steals all of his scenes as the hackish grifter, Gene Cousineau, who barely attempts teaching the talentless misfits of the acting class. Stephen Root plays Barry’s handler, whose bumbling antics constantly drag the wannabe actor back into the violent world he so desperately wants to escape. Glenn Fleshler and Anthony Carrigan rival the absurdity of the bad acting scenes with their back-and-forth as a Chechen mob boss and his top lieutenant.

The first three episodes of the eight-episode first season were directed by Hader and the final two by Berg. In between, Hader’s soon-to-be ex-wife Maggie Carey directed episode four and Hiro Murai directed episodes five and six. Murai began his career as a music video director and, before “Barry,” his experience in television was largely limited to 10 episodes of FX’s “Atlanta.” Hader, a fan of Donald Glover’s hit show, said he practically hired Murai on the spot after they first met.

“He did such a good job too,” Hader said. “Because the aesthetic of the show is not like Atlanta… [All the directors] did a really good job of matching what the aesthetic of the show is, which is a bit different than the other shows they’re kind of known for.”

“Barry” is a bit different than most half-hour comedies and, because of that, it’s worth watching. Hader and Berg take the prestige television anti-hero trope and make it fresh by pairing it with clownish Los Angeles stereotypes and criminal buffoons.

“Barry” airs Sundays at 10:30 p.m. on HBO.