Murder mysteries, detective novels, who-dunnits, and many variations have been a staple of modern entertainment since the publication of Wilkie Collins' The Moonstone in 1868.
California, though late to the game, has made its own distinctive contribution to the genre.
Mystery, or detective, novels flourished with British writers Arthur Conan Doyle, Dorothy Sayers, and Agatha Christie. The murder mystery genre early took on a decidedly British aspect, with protagonists Sherlock Holmes, Lord Peter Wimsey, Miss Marple, and Hercule Poirot. All very civilized, country houses, seaside hotels and all that. The British tradition continues strongly to this day, in books, the cinema and on television.
But a particularly American version actually originated in California. In the 1920's Dashiell Hammett wrote classic detective stories based on his real life experience as a Pinkerton operative in San Francisco. His character, Sam Spade, was the archetype of the hard-boiled private investigator, living by his wits in the urban jungle of American cities.
In the 1940's Raymond Chandler took the same idea, of a cynical lone wolf working outside the system and in constant danger, with his shamus Philip Marlowe, but placed him in Los Angeles. It would seem that this sort of fiction would be a natural for New York or Chicago, yet it keeps coming back to California.
Movies were made of both Hammett's and Chandler's books, classics of film noir. The Maltese Falcon starring Humphrey Bogart is on everyone's list of the greatest movies ever made. Director John Huston moved the setting forward to 1940's San Francisco, but it is otherwise remarkably true to the book. There are also classic supporting roles by Mary Astor, Sidney Greenstreet, Peter Lorre, and Elisha Cook Jr.
Humphrey Bogart also played the role of Philip Marlow in the movie versions of Raymond Chandler's The Big Sleep, again squarely in the film noir idiom, co-starring Lauren Bacall and set in Los Angeles. A less successful Big Sleep was made many years later starring Robert Mitchum and Sarah Miles.
Another classic Dashiell Hammett story, The Thin Man, was filmed in 1934 and kicked off a whole series of "Thin Man" movies starring William Powell and Myrna Loy. These are light-hearted romantic comedies, set in both New York and San Francisco, and far from the usual dark and dangerous feel of most detective fiction. Urbane Nick Charles is something like Lord Peter Wimsey, a wealthy amateur detective who just happens to stumble upon murders everywhere he goes. The appeal of the movies lies not in the mystery or action, but in the witty banter of Nick and Nora and by-play with their dog Asta.
British director Alfred Hitchcock began making films in England but followed the path of opportunity to Hollywood. Suspicion (1941) was set on the coast of England but filmed north of Santa Cruz. Shadow of a Doubt (1943) was set and shot in Santa Rosa. "Hitch" owned a ridge-top ranch above Scotts Valley in the Santa Cruz Mountains, as well as a house in Bel Air, and several of his best movies were filmed in the west.
Vertigo is full of scenes of San Francisco as it was in the 1950's, plus San Juan Bautista (though the church tower was a set). The Birds starts in San Francisco but most of the action takes place in Bodega Bay on the north coast. Psycho progresses from Phoenix through California to the Bates Motel in Oregon (which was really a set at Revue Studios in Universal City, where Hitchcock's television program was filmed). North By Northwest takes place partly at Mount Rushmore in the Black Hills of South Dakota.
Just as detective fiction of the pulp novel variety flourished in the 1930's and 40's, television shows featuring private investigators became a staple in the 1970's and 80's and a whole new cohort of detective appeared. The Rockford Files starring James Garner was set in Malibu, where he lived in a dilapidated trailer in a beachside restaurant parking lot. Peter Falk played Columbo, another LA resident, a police lieutenant who seemed to specialize in crimes by the rich and glamorous (which he was decidedly not). Rock Hudson and Susan Saint James portrayed McMillan & Wife, a San Francisco police commissioner (and wife). Tom Selleck was both sexy and funny as Magnum, P.I. in Honolulu.
Contemporary western writers continue the murder mystery and detective fiction tradition.
Dana Stabenow lives in, and writes about, Alaska. One of her protagonists, Kate Shugak, is an Aleut (Native American). In addition to mystery and suspense they offer excellent portrayals of the land and people of Alaska.
Nevada Barr's protagonist, Anna Pigeon, is a national park ranger, which provides for some interesting locales. Not surprisingly, Barr was once a park ranger in real life. The park settings are very faithfully portrayed - I have recognized numerous locations described in her books, and even took a panorama at the exact spot where Pigeon fell off a cliff in the Guadalupe Mountains.
Sue Grafton places her alphabetically titled works in a thinly disguised Santa Barbara.
Tony Hillerman's unique novels feature a Navajo tribal police detective and mostly take place in the Indian Country of Arizona and New Mexico.
Detective fiction continues to thrive in television. One in particular deserves special mention here. In Murder She Wrote the character Jessica Fletcher (Angela Landsbury) is an elderly lady living in fictional Crab Cove, Maine, which is really Mendocino, California. Many of the screenplays and a spin-off series of novels were written by Donald Bain - no, not me, just the same name. This other Donald Bain sometimes writes under the nom-de-plume Jessica Fletcher, completing the circle of confusion. I have one of his early books, a sexy potboiler named Club Tropique on my paperback fiction shelf, to the amazement and amusement of my students. I love to watch their faces as they read the rather shocking first page.