There is a good sense of humor percolating through Bryan Singer’s “Jack the Giant Slayer,” an uncommonly wet and messy movie, and it is that winking energy that saves it.

That and Ewan McGregor.

As Elmont, leader of the fairy tale king’s personal guards, McGregor carries himself with such ridiculously pragmatic fearlessness that you just know that none of the dozen or so screenwriters whose names are attached to this monstrosity would dare kill him off.

He is also one of the few characters who gets to do any acting. The rest, from the valiant young Jack (Nicholas Hoult) to the grotesque two-headed giant general (Bill Nighy. Yes. You read that right. Bill Nighy), pretty much fill in crayon outlines picked up from a “Princess Bride” coloring book. Westley, Buttercup, Humperdinck – they are all here under new names.

And, other than the skulls, rib cages and tibia tossed around the giants’ lair, Singer makes no bones about it. Jack is called “Farm Boy,” the princess is betrothed to a murderous creep whose only lust is for power, and we even get to hear “On ... your … knees!” in one scene.

Singer adds CGI giants well rested from their appearances in “300,” some magical landscapes repurposed from “Avatar” and an overall “Hobbit”-y seasoning to his stone soup and, oddly enough, it comes out OK. Reheated, but OK.

The story is a tweaked version of “Jack and the Beanstalk”: Once upon a time in a kingdom far, far away, a group of monks trying to reach heaven via a plant grown from magic beans accidentally discovered a land of flesh-eating giants in the space between Earth and God. The giants killed the monks and came to Earth, where they were eventually defeated and sent home by a king wearing a crown forged from their leader’s heart.

The tale is the stuff of ancient legend in the time of poor farm boy Jack and the princess Isabelle, but beans and crown remain, and the current king’s evil adviser Roderick (Stanley Tucci) intends to put them to bad use.

Before he can, a monk has swiped the beans and pawned them off on Jack, who is told to take them to a monastery in exchange for a fair amount of money.

This enrages Jack’s uncle, whose horse the monk rode out on. You’ve been cheated, he tells Jack. “Monks don’t have any money. They’re monks!”

That is all part of the well-crafted but longish expository start. Soon after, Singer kicks things into high gear – let’s say when they’re about halfway up the stalk, which carried the princess Isabelle along with it when it shot to the skies. As the rescue effort begins, Singer bumps off members of his little fellowship of the bean with brutal abandon, including some departures that come along surprisingly early, giving the story some neat little plot shifts.

Let’s admit right here that the comically violent pace keeps things interesting on both ends of the haricots verts gone wild, also much like “The Princess Bride.” What is missing is the consistently clever banter of the first film. Jack and Elmont have their Westley-Inigo moments, but those are far too few to hold up against the weight of the effects. (Just a note, “Jack” comes in 3-D, but isn’t really worth the extra price for it; the best parts of the movie work fine in 2-D.)

And, while there are just enough oddball moments to keep nightmares at bay, the body count is pretty high for a kids movie, and the PG-13 is well-earned.

Consider it OK for video-game-jaded adolescents; leave the nursery rhyme gang at home.

Rating: 2½ stars

Starring: Nicholas Hoult, Ewan McGregor, Stanley Tucci. Eleanor Tomlinson

Director: Bryan Singer

Running time: 114 minutes

Rating: PG-13 for intense fantasy violence and scary situations.

The Lowdown: An adventurous farm boy with magic beans reconnects an ancient kingdom with a land of giants in the sky, leading to much mayhem in an action-packed CGI fairy tale.