“Zack and Miri Make a Porno” sees Kevin Smith doing lots of things that he has never done before — moving out of his favored New Jersey locale and into a slightly different but equally industrial corner of the northeast, casting Jason Mewes as something other than the lovable drug dealer Jay, and avoiding the usual final-scene meltdown where all the characters realize that they had everything that they needed to be happy all along. Well, maybe not the last part, but at least he avoided turning the denouement into such sentimental pap that it makes the rest of the movie seem somehow less entertaining (I’m looking at you, “Clerks II”).

“Zack and Miri” centers on the titular platonic roommates who have serious cash-flow issues — Zack (Seth Rogen) is more interested in buying Fleshlights and ice skates than paying the rent, and Miri (Elizabeth Banks) racks up giant Amazon.com bills buying vibrators. After meeting the former star quarterback of their high school football team and his gay-porn-acting boyfriend at their 10-year reunion, they decide that the only way out of debt is for them to make an adult film. To this end, they recruit Delaney (Craig Robinson), Lester (Jason Mewes) and Bubbles (Traci Lords), among others, to help them bang their way out of debt.

With a title prominently involving the word “porno,” perhaps a writer-director-editor could be excused for turning the film into a series of loosely tied together scatological jokes without any real cohesion or semblance of character development. In this case Smith, never known for his restraint discussing or depicting the more private functions of the body, avoids semen jokes entirely — no mean feat for a director whose most mainstream movie to date, “Chasing Amy,” included the nickname “Fingercuffs.” There is one impeccably timed and little-referenced poop joke, but it is so well placed and set up that it comes off seeming less like cheap humor and more like innovative comedy.

“Zack and Miri” also steps out of the normal Kevin Smith oeuvre by casting accomplished comic actors in the lead and supporting roles. Gone are the lovable amateurs that normally comprise the supporting cast of Smith’s movies, and in their place come actors recognizable from Judd Apatow productions past and present. The highlight of these actors is unquestionably Robinson, who steps into a more central role after successful cameos in “Knocked Up” and “Pineapple Express” as the producer and benefactor Delaney. She provides comic relief as well as moral impetus and delivers some of the best lines of the movie with a panache that would make Dave Chappelle stand up and cheer without making his role into a minstrel show.

Rogen and Banks also turn in strong and ultimately believably and oddly romantic performances that seem actually plausible; too often in romantic comedies, the couples that end up together seem almost comically mismatched and without chemistry. Uniquely, in this one, they seem to genuinely like each other — although the conclusion seems like a bit of wishful, in the vein of “When Harry Met Sally”-esque thinking that will doom countless boys and girls worldwide to a string of platonic relationships that Hollywood tells them will eventually conclude with sex on camera.

Although Smith occasionally falls into his old trap of having characters reel off monologue after monologue almost like they’re soliloquies at each other rather than to each other, for the most part, the dialogue is sharp, snappy and most of all, funny. While in other Smith movies, the two lovers talk to each other in 30-second blocks while seeming to pay little to no attention to what the other is saying, “Zack and Miri” has its characters talking like, well, real people and not dialogue automatons programmed to say lines. Some of this is attributable to the overall quality of the acting, but it might also be a sign that Smith is growing up and shedding the authorial voice that made him a cult superstar, but also insured that he would never truly break out into the mainstream.

Smith has a little Apatow in him with “Zack and Miri,” and manages to create a cohesive film that straddles the line of good taste without bounding over it.

Print