I write mysteries. But, in a way, so does every other writer. Every good story, in every genre, contains some element of mystery. There has to be tension, conflict, or suspense and the reader is left wondering how that is going to be resolved. Maybe it isn’t who done it but, in a Romance, who will the heroine pick—the rich playboy or the boy next door? In a thriller, how will the hero save the day? Or in a comedy, where will the next pie come from? I oversimplify, but every genre will keep you wondering about something.
But with a good mystery there is an extra element. The author needs to give the reader a chance to figure out who done it by leaving a trail of clues along the way. Near the end of the mystery, Ellery Queen turned to the reader (or the audience) and asked if the reader had figured it out. And that is where a mystery differs from the other genres. A reader can read just for fun or can try to figure out the puzzle.
The art of leaving clues is not easy. There have to be enough to give the reader a chance at solving the puzzle, yet too many will make it obvious and take away the challenge. And there have to be the infamous “red herrings” to mislead the reader (herrings turn red when they are cured and were used by fugitives back in the 1600s to throw bloodhounds off the scent). The clues have to build in a timely fashion…the author doesn’t want to give it away too early. And the author can’t cheat and pull the culprit out of thin air. I have thrown away several books where a character appeared in the last chapter.
You have to give the reader a chance to solve the mystery before it is revealed. And if readers don’t get it right, they have to be able to look back and, with a slap to the forehead, realize which clues they missed. Not an easy task, but lots of fun if done well.