A highly combustible mix of space opera and camp comedy, “Guardians of the Galaxy” explores a corner of the Marvel comics universe inhabited by rocket-riding reprobates rather than superheroes. It extends the brand into a realm of buffoonish antiheroes, frankly raunchy humor and unabashed absurdism.

What sounds like a strained miscalculation turns out to be one of the most shamelessly enjoyable pranks ever pulled by a multibillion-dollar entertainment conglomerate. This is what happens when blockbuster filmmaking sits on a whoopee cushion.

The film is crammed with fun, though you wouldn’t predict that from the setup, a 1988 curtain-raiser about a frightened kid and his cancer-ravaged, widowed mother. He’s young Peter Quill (touchingly played by Wyatt Oleff), and his plight simply breaks your heart. But he’s soon whisked into a world of fantastical escapism by the Ravagers, space pirates who abduct him for reasons that are initially mysterious.

Jump ahead a couple of decades and into the far reaches of the cosmos, where adult Peter is reintroduced as a courageous, charming goofball (Chris Pratt). He’s got the swagger of a self-styled top dog. In fact he’s adopted the alias Star Lord, a majestic moniker that inspires exactly zero awe in everyone he meets.

There are still touches of the boy Peter used to be. He’s a walking repository of Reagan-era pop culture who travels everywhere with his beloved Sony Walkman. When he purloins an alien orb from its cavernous hiding place, he’s re-enacting the Indy-in-the-jungle scene from “Raiders of the Lost Ark” beat for beat. And his sense of humor is aggressively juvenile. When Pratt delivers a naughty joke about bodily fluids in space, he smirks like a sophomore. You wouldn’t catch Captain America doing that, but Pratt’s still-a-kid-at-heart attitude carries the day.

The plot is the plot of many a Marvel film, with a big creep on a space throne planning to destroy a planet for obscure motives. Whatever. For a variety of reasons, everyone wants Peter’s stolen orb, or the bounty on his head. Among those on his tail are green-skinned humanoid weapon Gamora (Zoe Saldana), the testy, trigger-happy Rocket, a cybernetic raccoon (excitedly voiced by Bradley Cooper) and his partner Groot, a lumbering treelike creature. Groot’s conversation consists of one brief sentence: “I am Groot.” Yet Vin Diesel’s gravel-throated performance and the creature’s computer-generated expressions are so sweetly eloquent that he takes the film’s acting honors. Remember how endearing Diesel was as a big lug alien in “The Iron Giant”? He’s that good here.

When that quartet bumble their way into space prison, they encounter Drax (wrestler Dave Bautista), who has skin like tooled leather and a lack of humor that is entertaining in itself. Since they all have a beef against the cosmic warlord Ronan (Lee Pace, playing ominous until it’s his turn to snatch some laughs), they team up. Gamora calls their coalition “the biggest idiots in the galaxy,” and their frustration with each other is a riot. As are the richly flavorful pop-ins by indelible character actors John C. Reilly and Michael Rooker.

Hats off to the producers for handing this property to writer/director James Gunn. He’s no bland Hollywood clone, but a graduate of schlocky Troma Entertainment, home of off-the-wall projects like “The Toxic Avenger.” Gunn’s warped comic sensibility percolates throughout, creating an alternate dimension of runaway silliness. Surely no other filmmaker could work so many Kevin Bacon “Footloose” references and a Rob Zombie vocal cameo into a movie about saving the universe. Or stage a space battle scene that mimics the antique arcade game Galaga.

There’s much more than quippy dialogue and visual comedy on display here. “Guardians” is a showcase of breathtaking production detail. Peter’s space hot rod, the Milano, is a two-tone blue and orange dreamboat, a craft that seems destined to become as iconic as the Millennium Falcon. The scenes of desolate alien worlds have an eerie beauty. The little things are perfectly rendered, too. When Rocket wakes up from sleeping on the floor, he has an epic case of bed head. Viewers who scour the corners of the frame will find the film stuffed with tongue-in-cheek surprises. Was that a pack of Alf trading cards in Peter’s orbiting bachelor pad?

In another departure from the Marvel formula, the studio withheld the traditional bonus scene following the finale from the version of the film shown to critics and preview audiences. No big deal. When the end credits announcement popped up that “The Guardians of the Galaxy will return,” that was enough to send me out of the theater beaming.