In a particularly apocalyptic cycle of moviegoing (this summer’s “The World’s End,” last summer’s “Seeking a Friend for the End of the World” and “Melancholia” the year before that), “This is the End” – the directorial debut of the reliably vulgar Seth Rogen and Evan Goldberg (“Superbad,” “Pineapple Express”) – occupies an odd middle ground between their Apatow-produced bromances, the giddy gruesomeness of the recent “Aftershock” and the confined social abrasiveness of “It’s a Disaster.” Thankfully, that blood-splattered, bong-sanctioned Venn diagram has resulted in a frequently hilarious riff on the personalities of Rogen and many of his famous friends.

Rogen plays “Seth Rogen,” lifelong chum to “Jay Baruchel” (Jay Baruchel) and housewarming guest of “James Franco” (you get the idea) when the party is interrupted by nothing less than the end of the world ... or at least the Hollywood Hills. An expansion of Rogen and Goldberg’s 2007 short, “Jay and Seth vs. the Apocalypse,” the strain on “End” to further elaborate on that high-concept, small-setting premise is felt now and again, as the star-studded ranks are swiftly culled to six survivors -- Rogen, Baruchel, Franco, Jonah Hill, Craig Robinson and Danny McBride -- and discussion then turns toward rations, supplies, one another’s careers, sleeping arrangements, waning friendships, newfound alliances, inevitable betrayals, cannibalism and all-around rape vibes.

World-ending urgency takes a backseat to a shaggier pace more amenable to both improv-heavy dialogue and overly juvenile digressions -- bodily fluids and Biblically proportioned genitalia make their respective appearances -- while a sequence of extended mock masturbation between celebrities threatens to serve as an entirely-too-apt metaphor for the film itself. It’s all worth tolerating, though, for an eagerly self-effacing ensemble (a coked-out Michael Cera gets to steal his own handful of scenes) that also happens to share a credible chemistry (or, in the case of Franco and McBride, animosity) throughout. Furthermore, Rogen and Goldberg ensure that gags like Franco’s obsession with collecting props from his own films actually play into the plot, and their knowing incorporation of genre conventions makes for its own delights, such as cinema’s single most sarcastic exorcism scene.

Improbably enough, the fraying friendship between ostensible leads Baruchel and Rogen proves to be a sufficiently recurring emotional throughline without imposing enough blatant sappiness to slow up the gears of goofiness at work. Whenever the scope does broaden beyond the Franco household and the fragile egos holed up within, Brandon Trost’s lensing and Henry Jackman’s score exude the same smoky, sweeping grandeur of more straight-faced disaster flicks, and just when the film seems to have blown its load of cameos, the climax doles out some gleefully left-field reveals best unspoiled by yours truly. Let’s be honest, though; it’s not like finding out ahead of time would be the end of the world.