Posted by Jennifer B. at The Writing Cocoon.
But, I'm having a bit of a problem with the ending. I like it, but I'm the writer, so my liking it doesn't guarantee that it doesn't suck. What I'm afraid of is this: I think I may have a bit of a deus ex machina going on at the end, and it's bothering me.
What's a deus ex machina? So glad you asked, 'cause I've been doing some research to try and determine if I've got one, and I'd like to share it with someone, and get another opinion:
Deus ex Machina (literary term)
If someone reads your work and tells you that they've found a deus ex machina in your plot, they're not paying you a compliment, my friend.
Definition: A deus ex machina, literally "god out of the machine," is a plot device where an impossible situation or problem is suddenly resolved by the introduction or intervention of a new character, event, ability, etc., that departs in some way from the internal logic of your story.
Let me give you an example: You've written a story, and you've really put your character through their paces. It's the end and your MC (main character) is up the proverbial creek without a paddle. MC, after a long chase scene, is backed up against a one-thousand foot cliff, with man-eating crocodiles waiting at the bottom. The enemy is before them, MC has dropped his only weapon, and the Villain has given his Villain Speech. There is nothing left for MC to do but die. But wait! Even though you've written an adventure story set in the Outback, with zero fantastical elements, MC suddenly spots an object in the sky. Its a spaceship from Mars and your main character has just been caught in its tractor beam. Hooray, your character has been rescued from certain death!
The problem is, if you've written 250 pages of a typical western-type novel, and on page 251, you have your MC suddenly rescued by Martians before you wrap up the plot on page 252, your reader is going to use your novel as toilet paper on their next camping trip. (Props to the film, The Life of Brian for the spaceship as deus ex machina. Click here for a top ten list of film deus ex machina.)
Why it doesn't it work? Okay, this example was extreme, but in general, the deus ex machina is an unsatisfying solution because it rips the reader right out of the story and the world the writer built. The reader played along, bought into the writer's premise, and the writer repays them how? By using a cheap plot device instead of doing the hard work and writing a plausible solution that respects the internal logic of the story. So, if Martians are going to rescue the MC, they damned well better be part of the larger story.
In short, write a serious deus ex machina into your story, especially the ending, and you will get a lot of groans, contempt, and gnashing of teeth. I'm trying to avoid that.
Avoiding the dreaded DEM: Going back to our example above, if MC is able to confront the Villain, mono e mono, at last, and disarm him, thus turning the tide of the fight and winning, that is much more satisfying as an ending. Perhaps MC (a disgraced former Marshall) has been practicing (and we've seen this throughout the novel) hand-to-hand combat. Maybe he boxes at night for cash. He's able to take on the Villain without his gun. Or, perhaps he notices that the Villain is about to back into an old mine shaft, (which we aren't surprised at the existence of because, earlier on, a character discovered that they were in abandoned mine territory when they nearly fall to their death through a shaft), and he uses his wits to maneuver the Villain towards the hole.
Back to my dilemma: I looked around on-line and came up with a movie ending that kind of has the type of deus ex machina that my ending has. Gloriously, the example is from the movie Star Wars, Episode IV.
This is one of those that some consider a deus ex machina (I've seen it argued), but I think that Lucas handles it well and avoids the DEM. In case you don't have it memorized, at the end of our film, just as Luke is about to be blasted from the tunnel leading to the Death Star's exhaust port, Han Solo comes flying in at the last minute to blast Darth Vader's two wing men, one of which catapults into Darth Vader's ship, sending him careening off into space. Luke is then able to go ahead and make the shot into the port, which starts the chain reaction that...well, you know how it ends.
Now, Han does come in at the last minute, just when it looks like all hope is lost for our hero, but this situation doesn't feel like a true deus ex machina to me. Here's why: its been set up for us throughout the film, it is part of Han's character development. In fact, right before Luke sets off for his fateful flight, he has a confrontation with Han, who is packing up his reward and heading out of town instead of joining the attack on the Death Star. Luke takes a parting shot at Han's cowardice and we see Han flinch. The barb has found its mark and it starts to eat at Han. We, the viewer, can't believe our lovable scoundrel is about to turn and run from this fight. So, when Han DOES swoop in to help our character save the day, we are not thrown for a loop, but instead, we are relieved. Han's not a asshat after all. The scene makes sense in the greater context of the story. We're not really even all that surprised; we knew he would come through!
The problem, the reason that some consider it a deus ex machina (and the reason I'm waffling on my own ending), is that the hero himself did not solve the problem. You want the hero to be able to save his own arse and have the tools needed to do so.
In my novel, a second character is needed/used in my MC's final triumph in the Climax. In a nutshell, the MC is able, in an extreme situation, to transfer power from her dying mentor (the actual mechanism is too complicated to explain in this over-long post) and use that power to wipe out the bad guys and survive until morning.
At first it seemed brilliant, but that's because it solved all my plot problems. Now I'm thinking: my MC spent the second half of the novel chasing down a way to realize her magical powers and in the second-to-last scene she (more-or-less) absorbs it from a dying mentor? You see my problem? Can I make this plausible by planting the seed for this outcome in the rewrite of the earlier chapters? I'm waffling between planting the seeds and keeping the current ending OR rewriting the ending. I may even write an alternate ending to test on different readers.
To sum up: A deus ex machina is usually a weakness in the plot. The character is unable to resolve his own problems, and the writer steps in and rescues him from the plot with some improbable and/or inconsistent plot device. In general, it is considered a sign of weakness in the writing, so it should be avoided.
Where do we get this term? The term, deus ex machina, comes to us from ancient Greece. In ancient Greek tragedies, men playing gods were lowered onto the stage by cranes. The god would be introduced to the play by machine (the crane), at a moment when all was lost or seemingly insurmountable, and resolve the plot.
Sources and Further Reading:
Deus ex machina entry, Wikipedia
Cartoon on LOTR deus ex machina
More examples from literature and cinema