If the wayward denizens of “Star Wars’” Mos Eisley Cantina rose up and demanded their own starring vehicle, it would probably look something like “Guardians of the Galaxy,” an alt-“Avengers” in which a ragtag band of misfits and mercenaries make the world a safer place almost by accident. An unusually prankish and playful Marvel Studios vehicle, director James Gunn’s presumptive franchise-starter is overlong, overstuffed and sometimes too eager to please, but the cheeky comic tone keeps things buoyant — as does Chris Pratt’s winning performance as the most blissfully spaced-out space crusader this side of Buckaroo Banzai. While these “Guardians” seem unlikely to challenge the box office benchmarks set by their Marvel brethren, this inaugural outing should nevertheless inject some much-needed life into Hollywood’s sagging summer fortunes.

Introduced in the January 1969 issue of “Marvel Super-Heroes,” the Guardians have been spun off, recast and rebooted several times over the decades, though largely in keeping with creators Arnold Drake and Gene Colan’s vision of an intergalactic (and interspecies) Dirty Dozen traveling through time and space to protect the universe from various unfriendlies. For the film, Gunn and co-writer Nicole Perlman have taken most of their inspiration from the 2008 incarnation of the series created by Dan Abnett and Andy Lanning, which offered a new Guardians team consisting of various supporting players from the Marvel annals, all under the questionable leadership of one Peter Quill (aka Star-Lord), a half-human, half-alien space jockey with a comically square jaw and an air of preening self-regard.

But perhaps because the “Guardians” source material isn’t as sacrosanct as the likes of “Captain America” or “Thor,” the filmmakers seem to have been given more than the usual license to play and reinvent. They’ve tossed out a few regular characters (including the messianic “cosmic being” Adam Warlock), reduced others to insider cameos (look fast for Cosmo the telepathic Russian space dog), and made haste with the comic’s pesky space-time fissures in favor of a more streamlined, accessible storyline. Above all, they’ve turned Quill (Pratt) into an amiable, good-vibing doofus who seems congenitally incapable of taking anything seriously but can, when the occasion demands, kick serious butt.

When we first see Quill, he seems more garbage man than guardian, a galactic scavenger working in the employ of blue-skinned Yondu (Michael Rooker), his adoptive father (and, in Marvel lore, one of the original, ‘60s-era Guardians). In a scene lovingly modeled on the opening sequence from “Raiders of the Lost Ark,” Quill enters a cave on an abandoned planet to retrieve a mysteriously powerful silver orb and, instead of a rousing John Williams fanfare, the soundtrack erupts with Native American rockers Redbone singing “Come and Get Your Love.” It’s the first of many ’70s FM classics (Blue Swede, Elvin Bishop, Ashford and Simpson) that emanate from the mix tape inside Quill’s trusty Walkman, and which give “Guardians” a funky, off-kilter energy even when the plotting turns toward the conventional. (Where else have you ever seen a prison break scored to “The Pina Colada Song”?)

If the Avengers are Marvel’s top-of-the-class all-stars, the Guardians are its underachieving freaks and geeks, and Gunn and Perlman have essentially crafted a new origin story about how these riff-raffers come together to keep said orb (a variant on “The Avengers’” hot-potato Tesseract) out of the hands of Ronan the Accuser (Lee Pace), a warmongering baddie hellbent on destroying the Earth-like planet Xandar. Fighting the good fight alongside Quill are Gamora (sci-fi “it” girl Zoe Saldana), rebellious daughter of an even bigger baddie called Thanos; the hulking, elaborately tattooed Drax (ex-WWE wrestling champ Dave Bautista), who holds Ronan responsible for the death of his family; a genetically modified humanoid raccoon named Rocket (voiced by Bradley Cooper); and his resident muscle, an anthropomorphic tree called Groot (voiced by Vin Diesel).

It’s difficult to imagine Gunn being asked to do anything like a straight comicbook movie on the basis of his previous “Super” (2010), a darkly funny, brutally violent portrait of superheroism as a kind of psychopathy. With its large budget and crowd-pleasing ambitions, “Guardians of the Galaxy” can’t venture nearly as far out on a limb, but to Gunn’s credit, he’s delivered a movie that’s idiosyncratic enough to stand out from the crowd without ever crossing over into the full-tilt dadaism of a “Buckaroo Banzai.” The adventures here comprise a fairly standard set of Saturday-serial cliffhangers and hairsbreadth escapes, and Gunn puts them across with a B-movie savoir faire that keeps “Guardians” from ever getting too high on the hog or too bogged down in its own mythmaking. Even when we arrive at the requisite CG-enhanced scenes of competing entities zipping and zapping each other with waves of electromagnetic energy, the movie retains a welcome lightness of touch, as if to say, “Yes, the fate of the universe hangs in the balance, but what else is new?”

For all that Gunn and Perlman have pared away, “Guardians” still has more characters and incidents than it quite knows what to do with, some of which seem planted here as seeds for the inevitable sequel. Benicio Del Toro pops up briefly as an exotic “collector” who looks like Liberace after a bleaching accident, while Glenn Close is around just long enough as a senior Xandar peacekeeper to make you wonder how many man-hours went into crafting her elaborate hair bun. “Doctor Who” co-star Karen Gillan is so hastily introduced as another daughter of Thanos that, when she eventually comes into possession of the orb, it takes a moment to remember who she even is.

But the core characters are lovingly fleshed out by the performers, especially Pratt, who seems to be grooving to his own private soundtrack even when he doesn’t have his headphones in his ears, and Cooper and Diesel, who nearly walk off with the movie as a couple of fractious yet inseparable platonic soulmates firmly in the R2D2/C3PO mold. (It helps that their computer-animated avatars are both marvelously detailed and seamlessly integrated into the live-action scenes.) Cooper is so good at finding the pathos in his existentially conflicted critter that you half expect the little guy to plead “I am not an animal!” Except, of course, he is.

Elsewhere, the movie sports a rich, varied look courtesy of cinematographer Ben Davis (“Kick-Ass”) and production designer Charles Wood, from the rusty, tiered interior of the floating prison known as the Kyln to the anodyne pastels of Xandar, which suggests a cross between Oz and Century City. Special effects makeup designer David White does a superb job of creating distinctive looks for the movie’s expansive gallery of humanoid and alien species.