A happy ending is an ending of the plot of a work of fiction in which there is a positive outcome for the protagonist or protagonists, and in which this is to be considered a favourable outcome.
In storylines where the protagonists are in physical danger, a happy ending mainly consists of their survival and successful completion of the quest or mission; where there is no physical danger, a happy ending may be lovers consummating their love despite various factors which might have thwarted it. A considerable number of storylines combine both situations. In Steven Spielberg's version of War of the Worlds, the happy ending consists of three distinct elements: the protagonists all survive the countless perils of their journey; humanity as a whole survives the alien invasion; and the protagonist father regains the respect of his estranged children. The plot is constructed such that all three are needed for the audience's feeling of satisfaction in the end.