Beware! Spoilers for Harry Potter and the Cursed Child follow.
They spent so much time at loggerheads while Harry stayed at Privet Drive but a stray reference in Cursed Child revealed that they remained in touch, which puts an interesting perspective on their relationship...
The early years
Dudley and Harry showed very little signs of friendship in their early years growing up. You probably spotted that. And this perhaps comes from Dudley’s chief sources of influence: mum and dad. Dudley’s parents treated Harry terribly, and the spoilt cousin never intervened, encouraging them at many points because he received 'cupboard love' (that is, an insincere form of affection in return for something) from them. Meanwhile, Harry was getting a whole other type of cupboard love.
It should be noted that Dudley did find himself on the wrong side of magic on a few occasions – including encounters with a certain snake and a little pig's tail – and that could be seen as furthering his dislike of Harry.
Between Harry Potter and the Prisoner of Azkaban and Harry Potter and the Order of the Phoenix Harry and Dudley's relationship more or less plateaued, reaching the point where they both resented one another and didn’t rile each other up as much as they used to.
A run-in with Dementors
Darker magic didn't intersect with the Dursleys' cosy, suburban lifestyle until later on in the series and one of the biggest crossovers was when Dudley and Harry found themselves besieged by Dementors in Order of the Phoenix.
Harry’s Patronus repelled the Dementor that tried to kiss Dudley and it marked an important moment in the boys’ relationship. While we totally knew Harry would never allow the Dementor to take Dudley's soul, the whole experience left Dudley shell-shocked in more ways than one.
Is it possible that the attack held a mirror up to Dudley, who saw for the first time that Harry wasn’t a freak, but actually a gifted wizard who saved his life? At first, he was quick to pin the Dementor attack on Harry, but in later years we'd realise how much this rescue really meant to him. So why the initial accusation? Was this really hatred of Harry, or an ignorance of magic?
The aftermath of this saw Dudley change to an extent; he became less belligerent and even civil to Harry. The Dementor attack was the catalyst for a change in Dudley's personality that started in Order of the Phoenix, and we saw the end result in Harry Potter and the Deathly Hallows.
When Harry was preparing to leave Privet Drive for a final time, he stepped on a cup of tea left on the floor right outside his room. Knowing that the only person who would do such a thing was Dudley, he assumed it was a prank when, in fact, it represented his cousin holding out an olive branch.
When Dudley and Harry were saying their goodbyes, Dudley's apparent disappointment at having to say farewell to his cousin and his home genuinely surprised Harry. The fact Dudley thanked Harry for saving his life was a huge change from the last time the cousins had a proper interaction.
They both mentioned the encounter with the Dementors, which hung over them, and Dudley went as far as to shake Harry's hand.
'Blimey, Dudley,' said Harry, over Aunt Petunia's renewed sobs, 'did the Dementors blow a different personality into you?'
Harry Potter and the Deathly Hallows
It's an encounter that symbolises the door shutting on Dudley and Harry's shared childhood and their time together. It wasn’t particularly emotional and still had a kind of stiffness to it that you regularly find with the Dursleys, but it meant something to each of them. With all the many shocks in Deathly Hallows, this was one of the biggest.
In adult life
In Cursed Child, it seemed that handshake led to a friendship of sorts in their adult lives. We see Dudley rather thoughtfully send Harry the blanket he was found wrapped in back when he was a baby, a move that suggests a genuine sentimentality. Little Dudders! Who knew?
'When your Great Aunt Petunia died, hidden amongst her possessions, surprisingly, Dudley found this – and he kindly sent it on to me...'
Harry Potter and the Cursed Child
From childhood bullying to sentimental gestures. How far this pair have come. And really – maybe a young, spoilt-rotten Dudley wanted a cousin to care for all along, and was just too young and influenced by mum and dad to realise. Who knows? The wizarding world may hold many strange things, but Muggles have their moments too...