It’s impossible to talk about Ray Galton without talking about Galton and Simpson. It always sounded to me like the name of a light engineering firm. “Galton and Simpson by appointment, artificers of high-class existential comedy.” They were definitely the first scriptwriters whose name I noticed, and I’m sure I’m not the only one who found out from them that scriptwriting was a thing you could do for a living. The brightest modern comedy shows come from the darkest places – loneliness, isolation, frustration, embarrassment. But compared to what Ray Galton and Alan Simpson did, they are all The Good Life.

Galton and Simpson met literally at death’s door, when they were in Milford Sanatorium in Surrey in August 1948. It was Galton who saw Simpson first – a shadow glimpsed through ward 14. The first work they did together was for the sanatorium’s radio station – sketches sending up life on the wards. That’s where their blue plaque sits and that’s where it should be.

Their masterpiece – Steptoe and Son – came about as a result of their sacking by Tony Hancock. He fell into tragedy, they rose into genius. Harold and Albert Steptoe seemed to be literally trapped in a labyrinth of clutter, always searching for a way out, or maybe some mistakenly discarded treasure. One big theme of the modern classic sitcom seems to be the frustration of ambition – “like you’re always stuck in second gear” as the Friends theme has it, or in Slough, or on Craggy Island.

Harold was a working-class autodidact – a man with intellectual ambitions and pretensions, a character you barely see on the screen any more. Living in the gutter, his attention was fixed on the stars. Harold’s frustrations were more universal, less easy to escape from than anything you’d find at Wernham Hogg. For one thing, Steptoe and Son were father and son, not friends or colleagues. Their bond was unbreakable, a burden of responsibility you knew Harold would never be able to put down. It was tragic to the extent that being human is tragic.

Facebook Twitter Pinterest Alan Simpson and Ray Galton in 1977. Photograph: Ronald Spencer/ANL/REX/Shutterstock

The show was like Harold – its set-up was simple, its world familiar but its ambition enormous. After going to see Pinter’s The Caretaker, Hancock famously said to them: “I don’t get it. You’ve been writing this kind of stuff for years.” There’s something poignant and powerful in this sense that all their work has – that we are dependent on each other whether we like it or not. Especially given that part of Hancock’s tragedy was surely his failure to realise how much he needed his writers.

If this makes their work sound miserable, it never was. First of all there’s that cornucopia of unforgettable lines. “A pint!? That’s very nearly an armful.” “Does Magna Carta mean nothing to you? Did she die in vain?” If you think that The Office, for instance, played with the fourth wall, just take a listen to Hancock. What the hell is going on? Hancock lives in a house with some mates but apparently has a radio show – in which Hancock is a character played by Hancock – that people talk about but which we never hear. We’re supposedly hearing their real lives in East Cheam, but every week Kenneth Williams pops up with a killer opening line – usually “oh, don’t be like that” – but every week he’s a different character. It’s complicated. It’s playful. Above all, the comedy comes from character and situation. It really is the mother of all sitcoms. Its influence was and is enormous. The Beatles asked for Wilfrid Brambell to be in A Hard Day’s Night as a kind of tribute and later the Libertines album Up the Bracket took its title from one of Hancock’s phrases from the show. It’s as inescapable as Steptoe’s yard.

Sometimes we talk about influence as though it’s some invisible thing drifting through the air like pollen, but it’s worth remembering that Galton and Simpson benefited enormously from their association with Beryl Vertue, who fought hard for recognition for scriptwriters, making sure they kept ownership of their formats and helping them sell them abroad. By helping make the job of scriptwriting financially viable she opened the door to people like Galton, Simpson and Johnny Speight.

In the world of internships and its consequent poshing of the arts, we are in danger of losing those voices. The work of Ray Galton is a as good a reminder as any of what a devastating loss that would be.

• Frank Cottrell Boyce is a British screenwriter and novelist