“The BFG,” based on a Roald Dahl book and directed by Steven Spielberg, has childlike wonderment and whimsy out the wazoo. The title character, a Big Friendly Giant who’s made of computers, motion-capture, and Mark Rylance’s charming voice, speaks in the gentle West Country accent of a kindly old British pensioner and has colloquial names for everything. (Farting is “whizz-popping,” for example.) He befriends a precocious orphan named Sophie (Ruby Barnhill) and takes her to Giant Country, where he’s actually at the small end of the spectrum and is the only giant who doesn’t subsist on human flesh. He spends his nights mixing dreams to deliver to Londoners. So, yes, whimsy, etc.

What “The BFG” doesn’t have is enough story to sustain itself for two hours, or any real purpose to speak of. Once Sophie is at the BFG’s cottage, the film (adapted by the late, great Melissa Mathison, who wrote “E.T.”) spins its wheels for too long, neither advancing the plot nor building the characters. Marvelous though it is to look at, this lengthy, aimless sequence becomes frustrating. What’s the story here? Where are we going with this? It reminded me of the first part of the first “Hobbit” movie, where they horse around in the kitchen for 45 minutes instead of going out to have adventures.

Eventually, the idea is for Sophie and the BFG to enlist the help of the Queen of England (Penelope Wilton) to stop the bad giants from eating children. This seems like an afterthought, though. It’s not clearly explained why the eating of children has only now become an issue, and the movie underplays the BFG’s facility with dream-mixing (which my 9-year-old nephew Logan, who accompanied me to the film and liked it more than I did, tells me gets more attention in the book). Everything with the Queen and her associates (played by Rebecca Hall and Rafe Spall) feels half-considered: quaint and mildly amusing but insubstantial, like they brainstormed ideas, scribbled them down, and chose one at random.

The visual effects are effortlessly amazing, of course. Nobody is better at making high-tech wizardry look casual and easy than Spielberg. I like Rylance’s humble performance as the BFG, whose friendship with young Sophie is sweet, and there are moments of great discovery in their journey together. That journey just needs to be nimbler and better focused, because some of the magic has seeped out.

C+ (1 hr., 57 min.; PG, mild peril and some farts.)