Coming-of-age tales come in all chronological forms, but 1994 seems a peculiar year to choose for what. That’s the “summer of” setting, though, of “The Wackness,” the comedy-drama about Luke Shapiro, a New Yorker graduating from high school that year, written and directed by Jonathan Levine, who just happens to be a New Yorker who graduated high school then.

But, Levine said in a recent Dallas interview, that doesn’t make it autobiographical, or at least completely so. After all, Luke’s a drug-dealer who sells weed out of an ice-cream cart. He’s also infatuated with a classmate whose father is a wild-eyed psychiatrist whom he supplies with marijuana in return for free therapy sessions.

“It’s not as autobiographical as a lot of people like to think,” Levine said. “But of course it is very much part of who I am and my experience growing up, as far as the borough I grew up in, as far as the music I was listening to—the details. I guess I just like to specify that I didn’t deal pot. That’s really the biggest difference.”

Nonetheless he felt the drug aspect of the plot—treated without special pleading—was essential to capturing the time and place: “For me, that was very true to the time. In New York, especially, that was the time when hip-hop culture was sort of transcending just being an African-American culture. And a very significant part of that was marijuana use, for better or worse. So it was very much my goal to just try to present it and not really take a position on it. Every character in this movie takes awful decisions and makes terrible mistakes. And every character has no idea how they’re going to live their lives. They all have their own weaknesses, whether it’s smoking marijuana or taking prescription medicine. They all have things they rely on to get through the day. So it was important to me to make it bigger than to debate whether they should be doing drugs or not. [It’s] about what people need to get through their lives… For me, it was always let’s just show it and not judge it, and let the audience figure that out.”

One of the most talked-about aspects of “The Wackness” is sure to be Ben Kingsley’s virtuoso turn as the psychiatrist, himself suffering a sort of mid-life crisis, with whom Luke develops an odd father-son bond. Surprisingly, Levine said, getting him to take the role wasn’t difficult. “He read the script quickly and liked it,” he said.

But getting Kingsley to say yes required a personal meeting, and Levin went to Vancouver to talk to him. “That was the scariest part, but it wasn’t that difficult because he was so nice,” Levine recalled. “He spoke about the role in very broad terms. He compared his character to Falstaff in ‘Henry IV’ and Luke was Prince Hal. And I just said, ‘Okay, sounds good.’ I thought the Falstaff reference was apt, though I never would have compared a movie about a kid selling pot and his crazy shrink to something Shakespearean. I thought that was very nice of him. That was Saturday, and on Monday we found out that he was going to do it. That was exciting.”

For Shapiro, Levine made a surprising choice, casting Josh Peck, best known for his role on the long-running Nickelodeon teen comedy “Drake and Josh,” who hails from New York too. “That was never a prerequisite when we were casting,” Levin said. “But when I met Josh and I found out he was from New York, it did give us a kind of shorthand that made things very easy on the set.”

Peck embraced the change of pace the role represented for him. “It was oddly this selfish endeavor for me, because I was really turned on by the material,” he said. “‘The Wackness’ was a movie I’d want to see—that’s what immediately jumped off the page for me. All the elements just spoke to me creatively, and you rarely get the privilege to be able to perform in something like that. Where I was at the time that I read it, I had an understanding of where this kid was in his life, and I felt that I could bring some truth and honesty to who he was. I think Luke is sort of the framework for a lot of young men in their angst and disillusionment with the world. It’s a tough time when you’re eighteen and wondering what constitutes a man. What does it mean? And so whether it’s universal or something less common, it’s your responsibility to bring reality to that character, because people have lived it. So I just jumped into who this kid was.

“I’ve been doing ‘Drake and Josh’ and I sort of grew up in the Nickelodeon family since I was fourteen, so that was a really big chapter in my life, and I really am in debt to them. I am who I am because of them, with that kind of fan base. It’s a blessing, and I hope that when they’re old enough, they’ll buy ‘The Wackness’ on DVD.”

And “The Wackness” isn’t Peck’s first brush with tough material. “I was lucky enough to be in a movie called ‘Mean Creek’ when I was sixteen, which was in the same vein of something that was dramatic and edgy, something I could be really proud of,” he said. “A lot of time you have to acquiesce your ideals or values on a project, but on this I didn’t have to do that at all.”

Of course, it also gave Peck the opportunity to act with Ben Kingsley. “He’s insanely gracious–it’s like playing basketball with Jordan, and he’s on your team,” he said. “You know that you always have someone there who’s going to be setting you up—he’s only going to be making you better. I think that’s one of the greatest luxuries you have with an actor like that. You’re going to fly kind of holding onto their wings, and you can just enjoy the ride. It’s a beautiful experience.

“He’s my favorite actor—it begins and ends with him for me.

“So I’ve peaked—it’s over,” he added with a little laugh.