There’s more than a hint of Chuck Jones and Jay Ward in “The SpongeBob Movie: Sponge Out of Water,” the second feature drawn from the long-running Nickelodeon TV series. Combining the anarchic zaniness of Looney Tunes with the inside-joke abandon of Rocky and Bullwinkle, the movie improves on the previous installment and should amuse most adults while predictably enchanting the series’ kid fans.

For those unacquainted with the show, the script thoughtfully lays out the basics upfront, in the form of a story read, in one of the segments that mix live-action with animation, by a pirate named Burger Beard (Antonio Banderas) to a flock of seagulls from a magical book—an ex-library book, we see in an inspired sight gag, previously checked out by the likes of Davey Jones and Blackbeard. The tale he relates explains how the nefarious Plankton (voiced by Mr. Lawrence) goes to extraordinary lengths to steal the secret recipe for the Krabby Patties that short-order cook SpongeBob (Tom Kenny) serves up in Mr. Krabs’ (Clancy Brown) Krusty Krab shack. Plankton’s elaborate schemes result in a tussle over the prize with SpongeBob, the outcome of which is in doubt until the formula simply vanishes.

That leads all the residents of Bikini Bottom to turn on Plankton, and the underwater town itself to experience an abrupt Armageddon, suddenly turning into a primitive dog-eat-dog society in the absence of the delicious patties. But SpongeBob, who knows Plankton’s innocent of this crime at least, rescues him and together they’re off the find the missing formula. And here the picture, which has already been pretty surreal, goes fill throttle in that direction as the unlikely duo use a hastily-constructed time machine in their quest. It takes them, among other places, to a space observatory where a talking dolphin named Bubbles controls the movement of the planets, while in one especially outrageous sequence Plankton sneaks into the napping SpongeBob’s very brain, which proves a veritable cornucopia of candied delights. Ultimately, however, they, along with Mr. Krabs, his dour clerk Squidward (Rodger Bumpass), SpongeBob’s pal Patrick the Starfish (Bill Faggerbakke) and Sandy Cheeks (Carolyn Lawrence), wind up in the “real world,” in another sequence mixing live action and CGI animation. There, transformed into an oddball team of superheroes, they work to retrieve the recipe from the villain who’s stolen it.

That final confrontation, it must be said, goes on too long, and despite Banderas’ enthusiastic work, it gets a mite tiresome. The transformation of the Bikini Bottom characters into superheroes, moreover, has a predictable feel to it—kids like superheroes, so let’s give them some even in a “SpongeBob” movie. But even at these points when the movie is at its weakest, it maintains an easygoing, anarchic vibe that makes it easy to take.

The voice work, of course, is fine—after all, these folks have been working on their characters for years, and have honed the sound down to a fine art. And while Mike Mitchell’s direction of the live-sequences is a tad pedestrian (as, frankly, are the visual effects in them), Paul Tibbetts keeps the animated ones percolating nicely, with very few wasted minutes thanks to editor Phil Meheux. Visually the picture follows the TV formula, except in the live action-CGI scenes. Bright colors dominate, and the character animation is typically flat and sketchy. Nor does the 3D format contribute all that much to the effect. But one doesn’t expect artistic mastery in a SpongeBob Squarepants cartoon any more than one does in “South Park.”

All in all, “Sponge Out of Water” is a breezy, colorful, giddily zany return trip to Bikini Bottom, and if the side trips above water don’t quite match the undersea action, they’re still pretty amusing.