Edgar Wright got the idea for 'Shaun of the Dead' after spending an entire night playing zombie-themed video games.

The 46-year-old filmmaker helmed the 2004 horror comedy, as well as co-writing it alongside lead actor Simon Pegg, and has said the idea for the zombie apocalypse film was in part inspired by the 'Resident Evil' video game series.

Speaking about his inspiration for the movie, Edgar said: ''A flash point came when I ventured out once to buy milk at five in the morning, after staying up playing 'Resident Evil'. I was taken with how deserted and eerie the streets were.

''What would a British person do if zombies appeared now? In American zombie movies, everyone had high-powered weapons. What would someone do without all that? This turned into the first scene I filmed, where Shaun walks to the shop completely oblivious to the zombie attack.''

The film is also inspired by George Romero's 'Dawn of the Dead', as both Edgar and Simon were ''obsessed'' with the 1978 zombie horror.

Edgar added: ''Simon Pegg was the first person I'd ever met who was as obsessed with George Romero's 'Dawn of the Dead' as I was. One evening, I was round at Simon and his pal Nick Frost's flat for drinks when I said we should make our own zombie movie, a horror comedy. It would be from the point of view of two bit-players, two idiots who were the last to know what was going on, after waking up hungover on a Sunday morning.''

And the director recalled having to convince people the movie would be ''worthwhile'', as many people - including those on his film crew - thought the production would fail to be a success.

Speaking to The Guardian's 'How We Made' series, Edgar said: ''An extra came up to me one day and, thinking I was a crew member, said: 'Straight to video, this one.' The success rate for British films was still quite low and one of the biggest jobs was convincing everyone the effort was going to be worthwhile.

''Later, we sent all the people who said nice things about the film a name tag, like Shaun's but with their name on it. I got an email from Stephen King telling me he was wearing his. And when Simon and I eventually met George Romero, he had his on.''