1982 saw the publication of Roald Dahl’s The BFG and the release of Steven Spielberg’s ET, both tales involving a formative relationship between a child and an otherworldly being. Author and filmmaker share an approach to childhood that is at once wondrous and disturbing, often pitting kids against malevolent adults. It was inevitable that Spielberg should eventually adapt Dahl, and apt that The BFG should be the one.

It’s taken a while, which is probably a blessing, for the technology that brings the Big Friendly Giant to life alongside real humans has been taking giant strides of its own in recent years. Combined with Mark Rylance’s remarkable performance, the BFG couldn’t be more vivid.

Dahl’s book concerns the coming together of two lonely souls, one a 10-year-old orphan, the other a giant as old as the Earth. Like many children’s books The BFG quietly promotes tolerance for anyone out of the ordinary, though Dahl makes the important distinction between the friendly, nay vegetarian giant, and the cannibalistic variety.

Insomniac Sophie (Ruby Barnhill) is wandering the halls of a London orphanage in the middle of the night, when she spots a stealthy shadow in the street outside her window. This is the BFG, on one of his clandestine visits to the city. Fearing that she will report his presence, he captures the girl and returns with her to Giant Country.

The kidnap and introduction to the giant sees Spielberg at his best. The detailed discovery of the giant’s home is full of mystery and wonder. The director also understands the value of making his initial appearance and utterings sufficiently fearsome; after all, he has no intention of letting the girl go, and so her plight appears a gloomy one.

And this makes the truth about the chap all the more pleasurable. “You has me wrong” he pleads. Indeed, in his brood he’s the exception rather than the rule – the “runt” who is dwarfed by the others, a sweet-natured man amongst trailer trash, a vegetarian as opposed to what he describes as the “cannybullies” who feast on “human beans.”

And whereas the others do little more than sleep and eat, The BFG has a hobby – catching dreams, from a mystical place to which only he has access, bottling them, and at night blowing the happy ones into the bedrooms of human children.

Once Sophie’s fear is dispelled, she must tune into his deliciously nutty vocabulary, which not only affords new nouns (Frobscottle, his favourite drink with the surprise effect; the Snozzcumber, his staple vegetable) but some cheerfully confused phrases, as when he refers to himself as “a feature of habit.”

Rylance dispenses this language with the dexterity of a true Shakespearean, adding hugely to the fun of the piece. More than this, anyone who has seen or heard the actor being interviewed will recognise his own, eccentric benevolence informing the BFG’s personality. And such is the quality of the computer animation that we really feel we’re seeing Rylance reconfigured as a giant. The effect is uncanny.

Surprisingly, it’s the storytelling that is a little lacking. Though the adaptation by ET scriptwriter Melissa Mathieson is perfectly good, this doesn’t feel like Spielberg at his most nimble.

The long section in which Sophie and the BFG win an audience with the Queen (Penelope Wilton) drags horribly, stopping the story in its tracks. And the magic ingredient needed to fuse fantasy with a version of reality – an ingredient that Spielberg usually has at his fingertips – is absent here. Overall, then, the result has plenty of charm but is not the classic we might have expected.