To begin talking about the indie film “The Way, Way Back,” I want to go way, way back.

Praise for the movie’s excellent cast, anchored by Sam Rockwell, Toni Collette, Steve Carell, Allison Janney and teenage rock Liam James, will come later. As good as the actors are, we must begin with the originality of the screenplay by Nat Faxon and Jim Rash.

The writers, who also co-direct and have small roles in the film, take a fairly straightforward story of coming of age in a time of divorce and make it feel fresh.

And real. Authenticity gives the movie its witty, heartwarming, hopeful, sentimental, searing and relatable edge. It is merciless in probing the tender spots of times like these, and tough-guy sweet in patching up the wounds. A nifty balancing act by the first-time directors, who almost didn’t get to make their film.

Way back in 2007, “The Way, Way Back” was on that year’s Black List of best, unproduced scripts. The characteristics that put it there haven’t been lost either. The dialogue remains too pure, too quirky, too conversational to have been tampered with by studio execs or nervous backers — so a shout-out to all the folks who kept their notes to themselves.

The sting is there from the film’s opening moments — one of those summer red-eye car rides to the beach. The only ones awake are Duncan (James) and Trent (Carell), the car salesman who hopes to marry Duncan’s mom, Pam (Collette). Trent’s frustrated eyes in the rearview mirror are all we see as he digs into the kid.

“Hey, buddy,” he taunts, “on a sliding scale of 1 to 10, where would you put yourself?”

When the 14-year-old finally ventures a “6,” Trent’s reaction reveals exactly what Duncan is up against. The crushed curl of Duncan’s shoulders, the headphones that can’t block out that voice, the hurt in his eyes capture how unprepared the boy is for Trent’s treatment.

James, whom you may know from the AMC hit drama “The Killing,” is a standout. Carell should play bad guys more often.

The movie itself will roll between two worlds. Ground zero for conflict is Trent’s beach house on the Boston shore, where a full assault is under way. Trent’s out to squash any resistance to his plans to marry Pam.

Kid paradise, or something close, is the Water Wizz Water Park, one of those local spots that give small-town life its charm. Owen (Rockwell) runs the place in the way of a cool dude forever giving in to his inner Peter Pan.

Rockwell, most acclaimed for his nearly silent tour de force a few years ago in “Moon,” is a comic revelation as the wisecracking good guy who takes Duncan, and other strays, under his wing. In that punch-him-in-the-arm playground style of support, he tries to help the kid find himself and some self-esteem. A flunky job at Water Wizz will work wonders.

The core of the film rests in the contrast between Owen and Duncan’s who-you-really-are heart-to-hearts and the tension played out on the home front with Trent. A meltdown over Candy Land is classic.

Even the small turns are not slighted. Maya Rudolph’s Caitlyn is a nice aside as the one who loves Owen, but with reservations. Faxon and Rash are Water Wizz characters, one’s eyeing bikini bods, the other escape. Owen and the gang soon represent the family Duncan feels the divorce cost him.

The difficult dynamics at Trent’s become apparent as soon as the car parks at the beach house, aptly named Riptide. Pam, barely a year past divorce and desperate to make a new family with Trent work, comes alive as Collette walks that wire. All her insecurity is immediately embraced by Trent’s outrageously naughty narcissist next-door neighbor, Betty. Janney is a total gas in the role, playing Betty in tight pants and with nonstop patter that, like shots of tequila, is better in small doses.

Betty’s daughter Susanna (AnnaSophia Robb) is one of the cool kids who begins to redefine Duncan’s life. Their awkward attempts at teasing is a lovely first flirt. Trent’s daughter, Steph (Zoe Levin), like most of the girls, is there to be beautiful, sullen and dismissive. Rob Corddry and Amanda Peet play Kip and Joan, Trent’s best friends and complicating factors.

Though Trent represents the torturer dealing out daily humiliations and Owen the savior, what really drives Duncan and the movie is his mother’s indecision. What he sees so clearly, and what she refuses to admit, becomes the dividing line that the film keeps working toward. How Pam and Duncan eventually cross it comes as close as the movie ever gets to giving into a Hollywood moment.

Faxon and Rash, actors who won an Oscar in 2012 for their first screenplay, adapting “The Descendants” with director Alexander Payne, do deft work navigating between the humor and the pain of relationships, slipping in substance where you least expect it. In other words, don’t be fooled by the sun-drenched beach where “The Way, Way Back” unfolds — not even the angst escapes the burn.