The worst way to write a comedy is to try and be funny. Watch “Disaster Movie” that does nothing more than spoof other movies, but because it’s trying to be funny, the jokes get tedious and dull after a while.
If you study the funniest comedies, they have a serious story as its foundation. “Dr. Strangelove” was actually based on a serious novel called “Red Alert.” Even though the plot is identical, the novel tells the story dramatically while the movies uses comedy.
“Groundhog Day” initially started out as a drama about a man trapped into living the same day over and over again. “Beverely Hills Cop” also started out as a serious drama.
So the best way to write a comedy is to start with a serious story. Once you get the serious story down, then you can tell that story with humor.
Keep in mind that humor is more than just jokes. Humor is often about people going to extremes and finding themselves in absurd situations that they respond to in a serious manner.
In “Bridesmaid,” there’s a scene where the hero gets mad during her best friend’s party and she tries to knock everything over, including a fountain that she can’t budge. While the hero is throwing a tantrum, everyone else just watches her get crazier and crazier.
In “The Hangover,” a bunch of friends are looking for the groom but they can’t remember anything from the night before. Gradually they realize they stole a tiger, knocked out a tooth, and picked up a prostitute.
Every comedy could be a serious drama but it’s not. However without a serious story as a foundation, comedies won’t work. Humor needs a foundation first so focus on telling a compelling story and then worry about making it funny later.