Re-booting or re-imagining the old “Rocky and Bullwinkle Show” mainstay “Mr. Peabody’s Improbable Adventures,” form the imagination of Jay Ward, “Mr. Peabody and Sherman” is in the middle of the pack of recent animated films; it’s better than most of Dreamwork’s output, and I’d much rather watch it than endure more of Pixcar’s ‘Cars” or cheapo hack jobs like “Open Season and “The Nut Job.” Most importantly, it has no small amount of heart to it; the characters make mistakes, own up to them, face the consequences, move forward with hard-won knowledge. Plus, there’s Peabody (Ty Burrell), a genius talking dog in a red bow tie and glasses who owns a time machine; his ward is Sherman (Max Charles), a similarly-bespectacled young lad he loves with all his heart.

Burrell’s work as Peabody is nearly perfect — dry, witty, overly enamored of puns, saying things like “I hold you in high regard as well, Sherman,” when Sherman says he loves him. The plot begins as Sherman’s school day goes awry, with classmate Penny (Ariel Winter) taunting him about being a dog until he bites her in their feud; the resulting hubub means that Peabody has to invite the Petersons over for a dinner to smooth things over, while Sherman has to entertain Penny; in classic reverse psychology, when Mr. Peabody tells Sherman to not tell Penny about the WABAC — the time machine he’s invented, located in his New York penthouse like he was some canine Tony Stark — Sherman then takes the bored Penny through a whirlwind tour of Egypt, where she winds up engaged to the boy-king Tutankhamen. And when you create problems with a time machine, as everyone from Marty McFly to Shane Carruth has demonstrated, you do at least have a time machine to fix them … or make them worse.

Directed by Rob Minkoff (“The Lion King,” “Stuart Little,”) and written by Craig Wright (whose on-screen credits include “Six Feet Under,” “Lost,” and “Dirty Sexy Money”), “Mr. Peabody and Sherman” is better with little jokes and big animated scenes of action than it is with the storytelling in between them; there’s a serious nemesis problem, for example, with Ms. Grunion from social services utterly aghast at the idea a dog has adopted a boy and dead-set on splitting the two up; Ms. Grunion is a pink-clad wide-bodied shrew voiced by Allison Janney whose original objections never get a story reason and whose ultimate end basically suggests all she needed to lighten up is some Bronze age lovin’.

So while the gender politics of “Mr. Peabody and Sherman” are a bit off, there’s still some stuff to like in it. Penny actually becomes Sherman’s friend, and we can see that happening over time, just like real kids; there’s also the pleasure of Patrick Warburton — voice-over artist extraordinaire — playing the Trojan warrior Agamemnon as a beefy, hearty bro. ( A reviewer at The A.V. Club notes that Agamemnon makes a joke about Achilles from inside the Trojan Horse about events that take place after the Trojan Horse; I would suggest that the presence of the talking dog in a bow tie should be the first giveaway that history is less important than hysteria here.)

Your kids will not get some of Peabody’s more erudite puns, but the film notes that and makes a joke of it; there’s also pratfalls, bumbling, stumbling and the sight of Robespierre getting tazed. Like the “Bill and Ted” films, “Mr. Peabody and Sherman” turn history into a playground, and gets laughs out of fracturing the facts. It’s also better-looking than most Dreamworks animated films; unlike “Megamind” or “The Croods,” the character designs stay stylized without looking ugly, and while nothing in it approaches the majesty of “How to Train Your Dragon,” it’s at least a step up from most of the studio’s output aesthetically. “Mr. Peabody and Sherman” teaches a older pop-culture dog some new tricks, and if the results need a little refinement, it’s still fun to watch the attempt.