A lot of humorous novels build the comedy into the characters. We watch two hapless lovers stumble toward each other in rom-coms or pull themselves out of increasingly bizarre situations in screwballs. You can write this kind of humor with nothing more than insight into human nature and enough love for your characters to laugh at them. But you need a different set of skills to create a book where the comedy is built into your fictional world, whether it’s the alternate aristocracy of Jeeves and Wooster or the physics-bending fantasy of Terry Pratchett’s Diskworld.
A funny world has to be consistent, for instance. Not in terms of its physics or metaphysics – in fact, the bafflegab  can be less plausible in parody worlds. But place you create has to have a consistent comedic sense. A cosmos in which spaceships travel by creating random whales in low earth orbit feels like the same sort of cosmos in which the answer to the great question of life, the universe, and everything is 42.
Some time ago I edited a book set in an alternate universe in which some fictional characters in our world – Sherlock Holmes, Romeo and Juliet, James Bond – had actually lived. Some, but not all – Romeo and Juliet were real, but Hamlet was not. In fact, it quickly becomes clear that fictional characters are only real in the alternate universe when it lets the writer get away with a gag. The gags weren’t bad, but the ad hoc nature of the world made it harder to believe in, and thus harder to enjoy.
One way to keep your world consistent is to think of it as just another character, with its own sensibility and voice. This is not hard since most comic novels rely a lot on an omniscient narrator – the humor often depends on readers knowing things the characters don’t. Just give your omniscient narrator the personality of your world, as if he or she is the god with the odd sense of humor who created it.
You also have to populate your comic novel with characters your readers can love. If there’s nothing more to your book than the gags, with characters who are props, you’ll leave your readers exhausted after only a couple of chapters. I once had a beginning client who was so caught up with his jokes that he managed to create more than 200 characters in less than 400 pages. Readers didn’t get to know any of them long enough to care, which left the book nearly unreadable.
Most comic novels are satire, and creating lovable characters in a satire with its built-in acerbic edge can be tricky. It’s easy to cross the line from mocking society to attacking your characters. Note: there’s nothing wrong with mocking your characters, as long as you don’t hold them in contempt. Bertie Wooster is clueless, callow, and vapid, but he’s also kind-hearted and innocent, and it’s clear that P. G. Wodehouse loved him.
Your book also needs a story that goes beyond the jokes. Readers need to feel they’re going somewhere, even when the territory they’re traveling through is ridiculous and improbable. The characters they care about need to engage in some kind of conflict, even if it’s just scouring the universe for the perfect cup of tea, and that conflict needs to build toward a climax that brings resolution. You can have a string of jokes, but you need a plot thread to string them together.
I recently worked with a client on a comic novel whose first seventy pages were little more than a sequence of unconnected gags. Many of them were funny, and he did eventually settle into a story about a cult leader planning to conquer the Vatican with an army of trained monkeys and use the captured Catholics as sacrifices to obtain immortality. The boy genius hero thwarted him by invoking the Jinx God to destroy his hubris. It was a fun story. The problem was, readers wouldn’t stick with the book for seventy pages until it began. They needed something to carry them forward until things got interesting, and jokes were not enough.
Preaching is another temptation of the comic novel. Since Gulliver’s Travels, satires have been used to show up human foibles. But it’s very hard to judge how well your point is coming across to readers, so a lot of satirists go over the line into telling their readers what to think. Along the way, they twist the comic sensibility of their world to make points and have their characters act out of character to drive the points home. As is always the case when the message  takes over, the story suffers as a result.
Some time ago, I worked on a manuscript told in part from the viewpoint of a group of stray dogs the main character had picked up. The dogs met every evening to talk about how the MC was living her life and what they could do about it. It was a good comic conceit, except that the dogs also discussed matters like the relationship between freedom and responsibility and the effects of a constitutional democracy. At length. While it might be entertaining to watch a dog preach a sermon in real life, it was a lot less so in fiction.
Finally, remember that even in the most comic novels, serious things happen. The Harry Potter Books are built on a comic sensibility – you can see it in the narration of the opening chapter of the first book. But the dangers Harry faces feel real, even though they take place in a school where the portraits argue with one another and textbooks sometimes attack students. In fact, if you get everything else right, it’s impossible to avoid serious moments, even if you collapse them into humor.
[Spoiler alert!] At the end of Life, The Universe, and Everything, Arthur Dent is living his dream of pitching a ball on Lord’s Cricket Ground, even though he has just spent the last few days trying to stop a supercomputer bent on destroying the universe and, at the time, the cricket pitch is being attacked by killer robots, one of whom is standing at the wicket with a bat. The instant he is about to release the ball, Arthur realizes that it’s not a ball, it’s actually a multi-dimensional bomb, created by the supercomputer, that will destroy the universe once the robot strikes it. But he realizes this too late to stop the pitch. As the ball is leaving his hand, he sees that, through his own selfishness and pride, he will be the means of the destruction of everything that is.
Then he trips. The pitch goes wild. He is so distracted by everything else that he forgets to fall (gravity being nothing more than a widely-shared delusion) and is able to fly to the killer robot and disarm it.
Because even the most ridiculous characters deserve a happy ending.
So what are your favorite comic worlds? How do they do what they do? Any examples of a comic world that doesn’t work?