I called him Mold, because when I was a toddler they tried to teach me the Norwegian pronunciation of his name (“Roo-al”, with a regal, long stretched “Roo”; “al” like the end of mall; silent D), but my baby tongue couldn’t get to grips with it, and instead Mold he was, ever after. Sometimes Moldy. He smoked Dunhill cigarettes (he called them “gaspers”), and he smelled of West Indian Limes shaving soap and the air outside. He had a voice as familiar and warm as the creak on a floorboard, the beginnings of a fire.

My mum became pregnant with me as an unmarried teenager, and a lot of my early childhood took place at his home, Gipsy House, in Buckinghamshire. Before health and safety, there were old decaying cars in the orchard, which my 14-year-old aunt, Ophelia, would tear around in as I cheered, and a goat called Alma would wander in and out of the house, shitting everywhere, often chased by a bellowing Mold. In most of the pictures from this era, my mum, aunts, Uncle Theo and I all seem to be wearing dungarees. Mold was in his uniform of Aertex shirt, trousers and cardigan.

A meal at Gipsy House was never just a meal; it was instead a recipe from a prince in Dar es Salaam, rescued from the jaws of a hungry python, at the crucial moment, by my grandfather. (In this story and its variants, Mold was always the blue-eyed interloper diverting the disasters he stumbled upon.) So grateful was the fictitious prince, he gave the lanky Englishman his treasured recipe for crab-stuffed baked potatoes. (Or toast with bacon and marmalade, or whatever else happened to be on the menu in rainy Buckinghamshire that day.)

He had all the accoutrements of magic: Amaretto biscuits whose wrapping papers you lit and watched shoot into the sky

Mold had all the accoutrements of magic, like a proper magician should. Amaretto biscuits whose wrapping papers you lit and watched shoot into the sky like titchy hot air balloons, falling back to earth in a wispy question mark of ash; a miniature steam train, that huffed and puffed round the dining room table if you filled it with water; the house dotted with Witch Balls – ancient, mirrored spheres that hung from a window so that, should a witch be so bold as to come knocking, she would be confronted with her own hideous reflection and flee, never to darken the door again. Mold was famous for writing the names of his children, and later on, me, in the grass with weed killer while we slept. “The fairies have been,” he’d say over breakfast. “Let’s go and see what they’ve been up to.”

There were few things more magic than the red Tupperware box that appeared at the end of lunch or dinner, heralding the most important and longed for bit of the meal. It was a medium-sized rectangular box. The box itself was kind of irrelevant, and it could have been blue, green or see-through. But its postbox redness lent an air of jaunty dissolution to the proceedings, and ultimately became part of its own myth. If you had been good at the table, not too much of a bore, eaten things without a fuss, you could collect the box from its home in the kitchen and bring it to the dining room while the grownups were having their coffee.

The Tupperware contained chocolate. Lots of chocolate, in appealing child-sized bars, nothing fancy but always compelling. And it was here, over this rectangular plastic box, that Mold and I did a great deal of communing. We both loved chocolate. Our taste in the stuff was similar. Cadbury’s Flake, Aero, Curly Wurly, Crunchie, Kit Kat and the Dime bar, a Scandinavian crunchy concoction that Mold delivered to me with great ceremony after a book tour in Sweden. Maltesers, Rolo, Fruit and Nut; a mutual horror of the Creme Egg. We were partners in a quest for the ultimate bite (light, airy, possibly featuring almonds). His knowledge of chocolate was encyclopedic. He could recall specific dates and years of invention with the glee of a patriotic child recalling the kings and queens of his country.

Mold grew up fatherless, in an era before chocolate was readily available. His father died of pneumonia when he was three – a few weeks after Mold’s sister Astri died of a burst appendix – leaving their Norwegian-born mother to care for four young children on her own in Wales. Sweetshops peppered his boyhood and boyhood writing: lemon sherbets, bootlaces, gobstoppers and toffees; hard-boiled sweets served by boot-faced proprietors. Chocolate was later, the stuff of dreams, exotic and faraway.

Magic and food permeated his books, and so did orphans, real or metaphorical. James Henry Trotter, who escapes his loveless, lonely life in a giant flying peach, and the gutsy girl protagonists of The BFG and Matilda. This is Mold’s legacy for my daughters, and for countless other children: heroines and heroes who are brave, sometimes scared, funny and always innovative in the face of adversity. Survivors. He writes of Matilda, who is ignored by her parents but “Nurtured by the voices of all those authors who had sent their books out into the world like ships on the sea. These books gave Matilda a hopeful and comforting message: You are not alone.”

A few weeks ago, I met a Syrian teenager from Daraa, a refugee, who had just finished James and the Giant Peach. It was the first English-language book he had read. My friend Andrew, who is dyslexic and struggled to engage with reading, says that he loved my grandfather’s books because they don’t patronise, they don’t dumb down the fear that we all feel sometimes. Often, they celebrate it.

“I will not pretend I wasn’t petrified. I was. But mixed in with the awful fear was a glorious feeling of excitement. Most of the really exciting things we do in our lives scare us to death. They wouldn’t be exciting if they didn’t.” So says the boy hero of Danny, the Champion of the World, on a moonlight joyride on country roads.

My grandfather loved the countryside. He loved the green hills of the Chilterns, the woods that spilled behind his house. His garden was beautiful. When his seven-year-old daughter Olivia, my mum’s older sister, died suddenly from measles encephalitis, he spent many weekends with his other children planting a detailed alpine garden on her grave. He met loss after staggering loss with written words, a thirst for answers, and his hands in the earth.

It’s so easy to fetishise the dead. We rose-tint or villainise them, and so often in the retelling they are saints or sinners, rather than flawed humans muddling along like the rest of us. My family is as complicated as the next family. We have our joys and our tragedies, and we bear both with a black humour that is in our genes. My grandfather, Roald Dahl, was born on 13 September, 100 years ago this week, and he died when I was 13, on 23 November 1990, aged 74, which seems, now, so young.

I miss him very much.

• See roalddahl.com for details of Roald Dahl 100.