"Tag," a genial comedy about best buds who have been playing the same game of tag for 30 years, is about arrested adolescence at its core. And this haphazard collection of setups, stunts and gags has that same scattershot, digressive energy.

The best way to appreciate this fitfully funny collection of japes and jests is to treat it like any teenage boy in your midst: Focus on the positives and know that even its worst is only a phase.

Based on a Wall Street Journal story about 10 men who, every February, relive the tag game they started as high school students in Spokane, Washington, “Tag” whittles the group down to five, who choose the merry month of May to engage in all manner of high jinks, disguises and carefully choreographed pranks to tap one another on the shoulder and announce “You’re It.” (Whoever is It at 11:59 p.m. on May 31 has to live with the ignominy for a year.)

As the movie opens, Hogan (Ed Helms) goes through elaborate motions to tag Bob (Jon Hamm) and to tell him that Jerry, the only member of the group who’s never been tagged, is getting married later that month.

Their quarry firmly in their sights, the guys — who live in various cities across the country — join forces to descend on the wedding and finally bring the elusive Jerry to heel, even if it means sabotaging his vows.

As a “Hangover”-esque bromance-slash-action comedy, “Tag” is mostly set pieces during which the principals try to outsmart and corner each other: Director Jeff Tomsic stages these sequences as typical slow-motion shootouts, only with powdered doughnuts and knitting bags as ammo.

The weaponized silliness results in some painful pratfalls, including one character’s plunge from an apartment fire escape and, later, having a thermos of hot coffee thrown in his face.

But it’s all in good fun within the world of a film in which the bruises and scrapes are never more than cosmetic and competition is a barely sublimated form of dude-love at its most ride-or-die.

With the exception of a bizarre recurring joke involving miscarriage and an overarching delight with f-bombs and garden-variety raunch, “Tag” wears its innocence on its polo-shirt sleeve, even sneaking in a shameless play for sympathy late in the third act.

The key to “Tag’s” success lies in the ensemble of accomplished comic players, who mesh here with antic, good-natured chemistry.

Helms and Hamm are joined by Jake Johnson (playing a shiftless pothead), Hannibal Buress (the master of spacey non sequiturs) and Jeremy Renner, who plays the ninjalike Jerry as if he’s auditioning for his next “Bourne” movie.

Isla Fisher is less ingratiating as Hogan’s unpleasantly cutthroat wife, and Annabelle Wallis often looks utterly at sea as the Journal reporter who joins the guys on their greatest “get” ever.

But thanks to the movie’s nimble group of actors, their deadpan interior monologues and some well-executed ambushes and booby traps (including a memorable “gotcha” at a shopping mall), “Tag” winds up being an undemanding, if instantly disposable, pleasure.

As much fun as the movie often is, an end-credit montage suggests that the real-life guys are probably more amusing and ingeniously diabolical than their fictional counterparts.