EVERYONE HAS A PET NIGHT-mare. Some enjoy scaring themselves with zombies, a vision of humanity as mindless, rotting husks. Others go for vampires, governed by passion; or serial killers, those ordinary non-supernatural monsters. Me, I like the end of the world.
The BBC's new drama Survivors – a reinvention of the 1970s series by Terry Nation – is just the latest incarnation of a genre that comes to the fore in times of global uncertainty. In the show a deadly flu virus has killed most of the population. It has more action and fewer tedious discussions about growing crops than the old series, but the theme is the same: what happens after the end?
My own obsession with post-apocalyptic stories began at school, where, among the usual safe curriculum books, lurked one called Empty World, by John Christopher. This novel about a survivor of a worldwide epidemic was terrifying, not least because of its teenage hero's strangely blank reaction to mass extinction – he's traumatised even before the "Calcutta Plague", due to the deaths of his family in an accident. He's already emotionally dead, Christopher suggests, and that's what helps him survive.
It was the perfect read for a disaffected teenager at a time when the possibility of nuclear war seemed as real as the miners' strike. On TV there was Threads, with nuclear winter survivors in a blasted landscape. And there was Raymond Briggs's graphic novel When the Wind Blows, about an old couple dying from radiation poisoning.
Then new fears pushed nuclear war aside in the public consciousness – Aids, terrorism and climate change have all taken their turn to inspire metaphorical disasters.
This is not new. Noah's Ark is the world's first post-apocalypse story. Probably the first novel on the subject was by Frankenstein author Mary Shelley. After that book's release three of her children and her husband died. In grief, she wrote The Last Man, in which plague strikes at the end of the 21st century.
The rise of science fiction, and spread of industrialisation, sped up the theme. A good example is RC Sherriff's terribly British novel The Hopkins Manuscript, written in 1938 and recently republished, in which the moon's orbit heads inexorably towards collision with Earth – and people play cricket by moonlight.
After the Second World War, the threat became nuclear in Nevil Shute's On the Beach (1957), with Australia the last refuge, gradually succumbing to south-spreading radiation. Latterly, in New Zealand soap The Tribe, all the adults have died, leaving feral children with only crazy hair dye to sustain them.
John Wyndham's The Day of the Triffids (1951) is less about the killer plants than its film and TV adaptations were and more about the difficulties of rebuilding society. Reluctantly, the heroes have to join a polygamous colony, but it could be worse. In the movie 28 Days Later, Christopher Eccleston's army officer is ready to sanction gang rape.
But there are upsides: in a cataclysm, the bad can die with the good. Written in 1949, George R Stewart's Earth Abides unusually depicted interracial marriage as no big deal; in a depleted population, artificial divisions might vanish.
Post-apocalypse fiction tends to have a pessimistic view of human nature: not only do we usually screw up the aftermath, we probably caused the disaster in the first place. In the new Survivors, the killer flu turns people's immune systems against them. There are hints of a secret laboratory behind it. It's a fear that speaks directly to our sense that we're screwing up the world, heading for a global catastrophe of our own making.
Stephen King's The Stand is an epic of good versus evil, driven by a manmade biological weapon turned deadly virus. The nice survivors gather around a mystical old black lady who speaks to God. The bad ones go to Las Vegas with a folksy cowboy who is really the devil. It's not subtle but King has an evangelistic message: only by getting rid of the useless trappings of modern civilisation and remembering what we are underneath can we survive. And we should listen to old ladies.
In Survivors Abby (Julie Graham) rallies a disparate band by declaring: "We stand together or die." But one asks her: "When was the last time you did anything truly practical?" It's a theme that's even more relevant now than when the original series was made, with the rise of the web. Why bother learning something if you can just Google it? But if the internet fails, how equipped are most of us to cope?
This question lies at the heart of the perverse appeal of these stories. We want to think that we'd be one of those who make it, but what would we be willing, or able, to do to survive? Could you hunt and kill your own food? Treat yourself if you got sick? Protect yourself in a lawless world? In Survivors, Max Beesley plays Tom, a criminal who lives through the virus in jail while all around him die. He kills the last remaining guard to escape and says: "Old rules don't apply, do they?"
It's a scary, yet tempting, prospect – a blank slate where we can throw away the mistakes of the past and start again. But first we have to survive. Dwelling on the end of everything may seem foolish, or morbid, perhaps, but it's comforting too: forewarned is forearmed. You won't be laughing when you're fighting over the last tin in the local shop while I'm safely holed up somewhere to sit out the initial chaos. I've been planning this for years.
• Survivors, Sunday, BBC1, 9pm.