In Adam, a beautiful, simple, heartbreaking film, Rose Byrne and Hugh Dancy play New Yorkers who meet in the laundry room of their glorious Manhattan brownstone. She’s lovely, he’s handsome. She’s a schoolteacher who wants to write children’s books, he’s got Asperger’s Syndrome, which essentially means he’s a high-functioning autistic.

Whoa! The record scratches.

The film, which could easily be written off as the most typical of love stories, is actually a moving, haunting, romantic journey as Beth (Byrne) and Adam (Dancy) move through their courtship without the typical outline of social conventions, which are completely foreign and unfathomable to someone with Asperger’s.

Adam necessitates routine and consistency, avoids eye contact, lacks social graces, rambles on incomprehensibly about science or history until his companion is bleary eyed. But he also creates a planetarium just for Beth, is only capable of complete honesty, offers her the most thoughtful favors and welcomes her into his safe, small world.

Writer-director Max Mayer struck upon the idea of an Asperger’s love story after hearing an interview on National Public Radio with a man who has the condition. Mayer was deeply stirred by the young man’s description of “how life felt to him, his sense of isolation from other people. And I don’t get that moved that often so I thought, ‘You better investigate this.’”

He began researching Asperger’s and soon realized it worked as a perfect metaphor for relationships in general. Though he was married at the time, Mayer eventually got divorced because of difficulties that are at the center of the film.

“The issue of deep communication or deep trust,” he explains, “not being able to penetrate and get into another person’s brain, walk around and feel safe.”

He decided to use Adam and Beth’s relationship as a mirror to “this paradoxical human condition that we’re all in where we need these relationships, we want to be connected, but we don’t really know the person on the other side. We can’t do the Vulcan mind meld and know who they are in some deep way.”

Despite the dissolution of his marriage, the film Mayer created is sweet, sentimental, insightful and, ultimately, optimistic. When brought to his attention, Mayer chuckles and replies, “John Patrick Shanley said, ‘I’m much smarter as an artist than I am as a man.’ That makes sense to me.”

During the casting process, Mayer says Byrne was always his first choice, but he was a little less certain about Dancy upon their first meeting.

“[Hugh’s] incredibly charming and social and adept and … British,” Mayer laughs. “[I thought], ‘This is exactly the wrong guy.’ It took me about an hour to realize he had the requisite problems and insecurities to play this part.”

Dancy, whose performance calls to mind the brilliance of Tom Hanks in Forrest Gump (a film which actually gets a shout out) mixed with a less quirky Ryan Gosling in Lars and the Real Girl and elements of Dustin Hoffman in Rain Man, was immediately struck by the “clear intelligence” and intriguing structure of Mayer’s writing.

“I was aware of the richness of the script and all the things I would have to do to get it right,” Dancy says in his captivating, lilting British accent, before quickly adding, “and I also knew how many ways I could screw the whole thing up.”

The actor had no knowledge of Asperger’s before taking the part.

“I wasn’t even unfamiliar with it, I was ignorant,” he admits, and he had only a month to prepare before a rapid-fire 20-day shoot that demanded a tremendous performance.

Adam releases in select theaters July 29.