The "whodunit" flourished during the so-called "Golden Age" of detective fiction, during the 1920s, 1930s, and 1940s, when it was the predominant mode of crime writing. Many of the best writers of whodunits in this period were British — notably Agatha Christie, Nicholas Blake, Christianna Brand and Edmund Crispin, Michael Innes, Dorothy L. Sayers, Josephine Tey. Others — S. S. Van Dine, John Dickson Carr, and Ellery Queen — were American, but imitated the "English" style. Still others, such as Rex Stout, Clayton Rawson, and Earl Derr Biggers, attempted a more "American" style.
Over time, certain conventions and clichés developed that limited any surprises on the part of the reader to the details of the plot and of course to the identity of the murderer. Several authors excelled, after misleading their readers successfully, in revealing to them convincingly an unlikely suspect as the real villain of the story. What is more, they had a predilection for certain casts of characters and settings, with the secluded English country house at the top of the list.
A U.S. reaction to the cozy conventionality of British murder mysteries was the American "hard-boiled" school of crime writing of Raymond Chandler, Dashiell Hammett, and Mickey Spillane, among others.
Finally, recent additions to the subgenre of the whodunit include the novels of Simon Brett, the Thackery Phin novels of John Sladek, Lawrence Block's The Burglar in the Library (1997), which is a spoof set in the present in an English-style country house, Kinky Friedman's Road Kill (1997), Ben Elton's Dead Famous (2001), and Gilbert Adair's The Act of Roger Murgatroyd (2006).
An important variation on the whodunit is the inverted detective story (also referred to as a "howcatchem" or "howdunnit") where the guilty party and the crime are openly revealed to the reader/audience and the story follows the investigator's efforts to find out the truth while the criminal attempts to prevent it. The Columbo TV movie series is the classic example of this kind of detective story (Law & Order: Criminal Intent also fits into this genre). This tradition dates back to the inverted detective stories of R Austin Freeman, and reached an apotheosis of sorts in Malice Aforethought written by Francis Iles (a pseudonym of Anthony Berkeley). In the same vein is Iles's Before the Fact (1932), which became the Hitchcock movie Suspicion. Successors of the psychological suspense novel include Patricia Highsmith's This Sweet Sickness, 1960, Simon Brett's A Shock to the System, 1984 and Stephen Dobyns's The Church of Dead Girls, 1997.
One of the earliest parodies of the whodunit genre in general is Englishman E. C. Bentley's (1875 - 1956) novel Trent's Last Case (1913), which introduced Philip Trent, a detective who gets everything wrong right from the start: Assigned to investigate the murder of English millionaire Sigsbee Manderson, who is found shot in the library of his country house, Trent makes his first major mistake when he falls head over heels in love with the main suspect. In the course of his investigation he jumps at the wrong clues, in his reasoning he carefully eliminates the wrong suspects, and finally he arrives at a conclusion concerning the identity of Manderson's murderer which turns out to be completely wrong (though Trent is not presented as a bumbler at all). At the end of the novel, the real perpetrator casually informs him during dinner that he/she has shot Manderson. These are Trent's final words to the murderer:
A more recent example of a spoof, which at the same time shows that the borderline between "serious" mystery (if there is any such thing) and its parody is necessarily blurred, is U.S. mystery writer Lawrence Block's (born 1938) novel The Burglar in the Library (1997). The burglar of the title is Bernie Rhodenbarr, who has booked a weekend at an English-style country house just to steal a signed, and therefore very valuable, first edition of Chandler's The Big Sleep, which he knows has been sitting there on one of the shelves for more than half a century. Alas, immediately after his arrival a dead body turns up in the library, the room is sealed off, and Rhodenbarr has to track down the murderer before he can enter the library again and start hunting for the precious book.
Murder by Death is Neil Simon's spoof of many of the best-known whodunit sleuths. In the 1976 film, Sam Spade (from The Maltese Falcon) becomes Sam Diamond, Hercule Poirot becomes Milo Perrier, etc. The film makes particular fun of the relationship between each detective and his or her sidekick. The characters are all gathered in a large country house, given meaningless clues, and all of them fail to solve the mystery.
Another example is the Lord Darcy stories by Randall Garrett. Despite their fantasy fiction setting, they are "straight" whodunits. However, the names of many of the supporting characters are puns, suggesting Garrett's friends, or the lead characters in other detective stories. Often, the personality of the character also reflects this.
In 2006 Gilbert Adair published the first of three novels so far which combine many aspects of the golden age of crime fiction, most notably the works of Agatha Christie.
In the video game The Elder Scrolls IV: Oblivion there is a quest for the Dark Brotherhood titled "Whodunit", which involves murdering five people in a locked house.