“My father and I grew up in the same Pennsylvania town,” says Alison Bechtel (Amanda Collins) as the musical Fun Home opens. “He was gay, and I was gay. He killed himself, and I became a lesbian cartoonist.”

The entire play, currently at the Cape Rep in Brewster, is pretty much encapsulated in that beginning: the humor that’s Bechtel’s trademark always has a dark undercurrent running in the background, and there are moments of bellow-out-loud humor followed by moments of intense sadness and even shock. Once again, Cape Rep’s choice and performance of material makes for absolutely dazzling entertainment.

A complicated coming-out story told in a series of flashbacks to the 1970s and 80s, the musical follows cartoonist Alison as she reflects on both her unusual childhood and the bittersweet realization that she was gay. “I leapt out of the closet and, four months later, my father killed himself by stepping in front of a truck,” she tells the audience early on.

Resembling a young Rachel Maddow, Collins spends the play reflecting back on two of her former selves, the child (Carly Williams) and the college freshman (Ashlyn Inman), battling to understand themselves and to maintain a relationship with the soon-to-be-suicidal father (played with amazing sensitivity as he teeters between abuser and victim by Richard Jay Sullivan).

It’s an odd way to grow up. Mom (played with subtle pathos by Mo Hanlon) is a playwright, though we never learn much about any of her work and she virtually disappears from view even while on stage. Dad is an English teacher, a restorer of houses, and the director of a funeral home. Hanlon has perhaps the most subtly difficult role, living passively in the mousy-brown world to which she been relegated, while Sullivan has a range of emotions to play out—rage, tenderness, confusion, pain—and manages to make the father understandable if not ever completely likeable.

The musical alternates between a decidedly somber tone and moments of joy. It’s clear that Dad has never been able to come to terms hiding—sort-of—his identity as a gay man, while Alison’s first lesbian experience at Oberlin with Joan (Brittany Rolfs) is a bright contrast, showing the next generation that won’t have to live in the shadows.

But that doesn’t mean that there aren’t moments of—well, fun—to be had in Fun Home, such as the scene in which the youngest Alison and her two brothers (Tyler Brackett and Julien Lajoie) record an advertisement for the funeral home, complete with disco lighting and Jackson Five-esque music. (I was sitting next to a couple from Western Massachusetts who found it hard to contain their mirth at this point—“we own a funeral home, too,” the woman whispered to me gleefully.)

Written by two women—Lisa Kron and Jeanine Tesori—Fun Home was the first Broadway show to feature a lesbian protagonist. And it’s a wonderful journey to watch Alison morph into herself, from a little girl who doesn’t want to wear taffeta to a late-teen who sings an ode to her new love (and Inman’s voice is exceptional; you never want her to stop singing) to an adult, professional, mentally healthy woman.

As the oldest Alison, Collins spends most of her time as a detached narrator assigning captions to the various stages of her life, but when she finally gets to be part of a complete scene, singing Telephone Wire, she touches on feelings that any audience can identify with. It’s unfortunate that Dan Prior, in his multiple roles, doesn’t get much stage time; but he does enable other characters to tell their stories by appearing as a sort of Everyman throughout the play.

Everything about this production was, dare I say it, perfect. The music. The direction. The lighting. The set. I could list everyone who deserves being called out, but just go to the show and look at the program: everyone in it gets an A+.

And while everyone in the cast deserves kudos, it’s ultimately the couple—Sullivan and Hanlon—that truly shines, working through their incredibly dysfunctional marriage and trying in ways kind and not-so-kind to be parents in a world they themselves are having troubles navigating.

(Fun Home plays at the Cape Rep in Brewster through October 14. More at caperep.org. Photo: Bob Tucker/Focalpoint Studio)