Deus ex machina is Latin for “God from the machine”. It’s a literary term for when all hope seems lost and KABLAMMO! everything is saved.
That has to be the only paragraph in history with both a Latin phrase and “kablammo” referring to the same thing. Let’s see how much more awesome this post can get.
A Deus ex machina is a contrived way to let the author keep his characters alive. Consider, for instance, the eagles from the Lord of the Rings. Thirteen dwarves, a wizard, and a hobbit are at the top of the same tree as wolves and goblins prowl the land below and a fire licks up from the trees around. Well, it looks like Bilbo’s done for this time. Nope! The eagles are coming!
Deus ex machina is annoying. It’s contrived. We want to see Bilbo suddenly cut the tree loose and slide down the mountain like a roller coaster with no minimum height restrictions. We want to see Gandalf pull something new out of his hat. We want to see Bombur eat something, sending the tree crashing down to crush the goblins while simultaneously breaking open the dam that just happened to be nearby, extinguishing the fire. Because it isn’t Deus ex machina when they use their surroundings– only when someone else saves their bacon without any warning. We want to see character cleverness, not omnipotence from nowhere.
In Inheritance, the fourth book of the Inheritance Cycle by Christopher Paolini, the world is saved by a Deus ex machina in a big way. I can’t say because of spoilers, but he should have died just for using that Deus ex machina.
But Deus ex machina isn’t only for keeping characters alive. In the Hunger Games, Katniss loses hearing in one ear from an explosion in the Games. After she wakes up in the Capitol again, she finds that her hearing is back. Deus ex machina? I think so. I was really annoyed with that. She won the Games, but shouldn’t she have some sort of sacrifice to go along with it? Life being perfect while she just killed everyone in sight isn’t quite enough of a downer for me, it seems.
This goes along with the “yes but/no and” plot twist philosophy, which I’m sure I’ll explain eventually in more depth. This philosophy basically says that with any question in the story, the answer is either “yes but” or “no and”. Can they get across this bottomless cliff? Yes, but there is a monster on the other side; or no, and there’s a monster on this side too. The odds keep getting worse and worse, which, if done correctly, makes for a better story.
With a Deus ex machina, you’re basically saying, “Yes, and.” Can we get across this bottomless cliff? Yes, and there’s an ice cream shop on the other side and we have money! Yay! Can we get off this tree before the goblins and wolves get to us? Yes, and now we’re this much closer to the Lonely Mountain! Yay!
A short aside: the “yes but/no and” philosophy also goes along with ending a chapter with a plot twist. You never want to end a chapter with the yes and start the next with a but. You want to start the chapter with a yes and end it with a but.
Deus ex machina. A bad idea, even according to Ancient Greek playwrights. Look it up.
So how do you fix it? Some say back to the drawing board, but that isn’t necessary.
A Deus ex machina can be solved so simply. All you have to do is add foreshadowing.
In the Lord of the Rings movies (I’m not sure about in the books, because I always forget to pay attention in those spots), Gandalf whispers to a moth about ten minutes before the eagles show up. Perhaps it’s a coincidence– Gandalf just likes moths, and enjoys tickling their antennae. In the three times it happens– twice in the Trilogy and once in the Hobbit– the moth seems to herald the eagles. Why? No one knows. But the inexplicably detailed moth scenes must be important somehow, and the eagles always follow. We see him talking to a moth, then he jumps onto an eagle’s back. At that point, we realize, Hey! That moth was actually worth it!
Foreshadowing works by going backwards. You barely notice the innocuous precedents, but when something big happens you look back and realize that it worked out since the beginning. If you took away the foreshadowing, everything would be a Deus ex machina. Oh, sure, Bilbo just happened to find a Ring that made him invisible so he could sneak past Gollum. Even silly things like Katniss having a bow and arrow can be a Deus ex machina. If she hadn’t seen her style weapons in the Cornucopia beforehand, and if she hadn’t figured they would give her something like that, it would have looked like a huge coincidence. For that matter, if we hadn’t known that she knew the bow from the arrow in the first place, we would have put the book down once she shot her first opponent. Of course, she’s a perfect shot! She just got that bow today… didn’t she?
But Deus ex machinas that aren’t are unimportant compared to Deus ex machinas that are. In order to shoot someone, you must have the gun on the mantelpiece long before. Often, the foreshadowing is hidden by comedy. You can have a thief steal the main character’s sword, and the whole book is filled with, “Where did you put my sword?” “I’m not telling.” “When I get my sword back, you’ll regret this.” “Then I’m definitely not telling.” Then, in the final battle, when the main character has a bloody nose and a monster is dragging him by the ankles into its lair, he suddenly finds, hidden in the upholstery of a beat-up couch, his sword! “So that’s where my sword went,” he says. “Eat steel, monster scum!” You can imagine the rest.
Be careful: solutions to the Deus ex machina become very obvious if overdone. Foreshadowing is a light seasoning– when something is that important, you want to be subtle about it until it’s time to bash the reader’s over the head with it. Don’t pull it out too soon. That makes for predictable plot twists.
Foreshadowing makes a Deus ex machina go KABLAMMO! There, I used all the relevant terms in one sentence.