I've been working on a comical D&D setting, which means I've been thinking a lot about humour in relation to roleplaying game design.
I've finally decided that there's three principles I'm sticking to going forward. I'll go into depth on them another time, but for now I just want to get them down in writing.
1. Roleplaying games are already funny
Humour naturally occurs in roleplaying, so we merely need to give ourselves the license to allow it. We often avoid allowing silly situations and comments because it would affect the tone or theme of the story, but a comedy game gives us an excuse to allow these antics. There's very little we actually need to do to run a comic game, and trying too hard to be funny is a certain way to ruin it. Which leads us nicely to...
2. Humour is inherently contradictory
Explaining a joke is never funny. We are as amused by repetition as we are by surprise. What I find hilarious you might find repulsive. Comedy is filled with irony, and the drudgingly familiar can become absurdly alien when viewed from another perspective. And where there is comedy there needs to be the contrast of danger.
3. Laughter is magical
Magic is not a science, and nor is comedy. But it is nevertheless a powerful force, filled with enchantment and wonder. An honest laugh is a magical thing and should be delighted in. You can't put laughter in a box.
These are of course incredibly broad, but they're my guiding principles at the moment.