Planescape: Torment has you jump through numerous hoops to get the best ending, but it's oh so worth it. Having faced down your previous incarnations and being forced to watch as the Transcendent One (aka your own mortality made sentient) butchers your party one by one, you finally confront it and convince it to give up its hopeless plan to be independent from you and rejoin with you, ending your immortality. After this, you restore your friends, bid one final farewell to them, and finally, finally die and begin your penance for the crimes of the First Incarnation. Yes, it seems bittersweet, but the Nameless One still has the knowledge that his friends are all alive, in some cases (Dak'kon, Morte) absolved of their guilt/servitude, and can leave their adventures with him better people who will likely go far. Besides, The Nameless One now has all the power and knowledge of all his many incarnations, so it's not like he'll be defenseless in the battlefields of the Blood War.
Mass Effect 2: To get the best possible ending, you don't actually have to go for a 100% Completion, as there is a threshold of preparedness, past which you may just wing it to the Golden Ending. However, to maximize your chances, you have to recruit every available companion, mine a ton of metals to purchase every ship upgrade (especially the ones with no gameplay benefits), complete all Loyalty Missions before going after the Reaper IFF, then secure the loyalty of your last companion, and immediately jump through the Omega 4 relay. Once in the Collector Base, you will have to make all the right decisions based on your knowledge of your companions and the setting lore, and only then will you be treated to an ending where every crew member of the Normandy, squad and otherwise, lives on to fight the Reapers in part three.
Mass Effect 3: within about the first 15 minutes, the first Reapers ever are detected in human space, effortlessly overrun all defense lines, and forcing a general retreat of all human forces and civilians out of the cities. The situation looks just the same for the Turians and the Bataarian species has become virtually extinct, pretty much removing all major military forces from the picture. The rest of the game deals with finding a way to destroy the Reapers, hopefully while there is still at least someone left alive. However, that last point is not neccessarily very high on the priority list.
Destroy is the only option in which Shepard survives, provided you have a high Effective Military Strength.
Control has Shepard take over the Reapers, using them to rebuild and protect the galaxy.
Synthesis has Shepard sacrifice themself to convert all life to organic/synthetic hybrids, possessing the strengths of both and the weaknesses of neither. This causes the Reapers to end their cycles and assist the galaxy in rebuilding and growing.
Depending on the player's choices, the Krogan cure the genophage and start to get along with the Turians, the Quarians regain their homeworld, the Geth gain true sentience, and the Rachni are given the chance to redeem themselves in the eyes of the galaxy by fighting against the Reapers.
The Geth/Quarian resolution is the best example: it takes a fair amount of prep in this game and the previous one, arranging a good Reputation score, a couple of non-obvious calls and killing a Destroyer-class Reaper the size of a building while on foot.
Garrett:Tell my friends that I don't need their secret book, or their glyph warnings, or their messengers. Tell them I'm through. Tell them it's over. Tell them Garrett is done.
Artemus:I will tell them this: nothing is changed; all is as it was written. The Trickster is dead. Beware the dawn of the metal age.
Kingdom Hearts' ending forces Sora, Riku and Kairi to get through the series up to near the end of Kingdom Hearts II (nearly 3 different video games, and technically a fourth if you count the year that Sora was sleeping and Roxas and Riku were running around) before they can joyously reunite with each other. Then they have to finish off the Big Bad before they can return home.
And as if that wasn't enough, Sora and Riku now have to become true Keyblade Masters and earn happy endings for every single good guy that's been killed or somehow similarly lost.
The Final Fantasy series is mostly comprised of this; after spending over forty hours of your life on average per game, it's appropriate to get a good reward.
Final Fantasy VI has this, though they could have emphasized it a lot more with more programming freedom.
Final Fantasy XIII's characters definitely earn their happy ending, after what they went through in the game to get there. Well, except Hope. Poor Hope.
On the other hand, although Hope's lost his mother, the Web Novelisation epilogue Final Fantasy XIII -Episode i- features him discovering that his father is alive. Given that said novelisation is also a lead-in to the coming sequel, Final Fantasy XIII-2, it counts as canon.
Final Fantasy XIII-2 averts this in ways that are downright insulting: not only is the downer ending canon, but if you get 100% Completion, all you really accomplish is allowing Caius to break the fourth wall and recognize your status as the player who was controlling Noel all this time. He then proceeds to insult you for wasting a significant portion of your life strenuously completing the challenges, desperately attempting to defy fate when the canon end was written a long time ago by people that you can't defeat, especially when you always had the option of just quitting and accepting what happened instead of wasting a hundred hours pretending that it didn't.
And it does: Lightning awakens 13 Days before the world will end and she needs to save the souls of people and help the World Tree grow, so that Bhunivelze can awaken on the final day and create a new world for everyone to be reborn in. During the 13 Days, Lightning learns how terrible life has been for everyone in the last 500 years, Noel and Snow have succumbed to depression due to blaming themselves for Sera's death and Vanille is willing to sacrifice herself to cleanse the soul of the dead, so they no longer have to suffer. On the final day, it turns out that the ritual Vanille is to perform will destroy all souls, Bhunivelze's plan was for this to happen so that everyone is reincarnated into the new world as blissful puppets and Lightning has been trained to be the next Etro. Happiness comes when Lightning defies Bhunivelze and fights him, but chooses to remain behind as the new goddess of death, but is saved by admitting her own weakness to herself. Then the souls of all her friends arrives and help her in killing Bhunivelze, the thousands of Yuel's born and died over the years and in control of the Unseen Chaos take over the role of Etro, leaving Lightning and everyone to be reincarnated into a world without wars. Lightning is last seen stepping off of a train in a european landscape, saying she'll go and meet... someone. (Likely her friends/or Hope, as implied by the game's scenario writer)
Metal Gear Solid has the situation getting worse and worse in the last three chronological games (MGS, 2, and 4), with MGS4 revealing the one happy part of MGS2's ending went horribly wrong shortly after. This persists right up to the very last scenes, promising Downer Ending after Downer Ending yet averting each one at the last moment for a genuinely uplifting finale.
Subverted near the end: Metal Gear Solid V: The Phantom Pain and Metal Gear Rising: Revengeanceprove that the world's still a horrible place and that even a happy ending doesn't mean that the main characters can turn away from what they've become, but also explain that mankind is petty because there's a whole world of science and discovery out there, and humanity isn't going to obediently sit down and stop looking for new things to do. The main characters are going to keep on torturing and killing, but also continue living in hopes of finding greater and more joyous things. Like epic cyborg battles, new futures for the poor, and aerospace package delivery. And nobody's stopping them from doing this anymore. Granted, the subversion was expected for Metal Gear Solid V: The Phantom Pain since it's a Prequel to Metal Gear.
This is a truly bizarre but awesome example, since the series properly establishes that Anyone Can Die, and in the end, a lot of people manage to live.
Not necessarily a completely happy ending, but the hopeful future that looms at the end is definitely heartwarming. Plus, even though Snake is going to die in a few months, Raiden reunites with his wife and goes home to be a father, Otacon will continue watching over Sunny, and Meryl gets married to Johnny.
Ar tonelico: Melody of Elemia does this in two ways: the game has multiple endings, in some of which you can redeem the Big Bad instead of killing it off; Also, in the visual novel-like adventure within the "soulsphere" of Lady Shurelia, which plays like a Magical Girl TV show, you get a surprising Bittersweet Ending, unless you go back again- then you find out that it was actually due to tampering by the Big Bad itself, and you get the chance to earn a happy ending instead.
Of course, in the second game you find out that it was actually SHURELIA who tampered with the story to make it have a happy ending, not Mir/Jakuri tampering with it to give it a Downer Ending. In fact the only reason Mir interfered in the first place was because she was pissed that Shurelia tampered with her story.
The Suikoden series actually makes this into a game mechanic: the characters will suffer through all the tragedies and losses of war and then some, but if you recruit all 108 Stars of Destiny, everyone gets a truly happy ending. Keep in mind that this is not at all easy, and neglecting to get even one of them will result in a much more bittersweet, or even downright tragic ending.
The Silent Hill games have an incredibly literal example of this; in each of the games, there is a potential good ending, but the player has to earn it through his actions while playing the game with the exception of Silent Hill 3 and Origins, which actually force a good ending on the player the first time through. But, well, the characters still literally go through Hell to get it, so...
The Baldur's Gate series leans heavily towards this, though the vagaries of being a somewhat open-ended RPG with a great deal of choice as to the nature of the protagonist keep it from being blatant. That said, the player does go to hell. Twice. Among other things.
Neverwinter Nights: The city is safe, the Old Ones finally destroyed; but Aribeth is dead and the Luskan army has torn up the city beyond all recognition.
Shadows of Undrentide: The eponymous floating city is destroyed along with the Big Bad and her dreams of world conquest, but Drogan is dead, and the fate of your own character is uncertain, until...
Hordes of the Underdark: Getting lost in Undermountain, exploring the Underdark, waging a war against the Drow, accidentally freeing Mephistopheles, one of the Archdukes of the Nine Hells, dying, saving the soul of Aribeth battling the hordes of demons and devils around the prison of the Knower of Names, and then finally returning to life to battle Mephistopheles for the fate of Toril. The epilogue afterwards gives everyone important in the story their properly deserved endings.
A Dance with Rogues contains a secret Golden Ending that can be cleared by making a very specific sequence of choices across the last two chapters and then defeating a whopping company (200+) of orcs without a moment of respite. Succeeding at this means the Princess is crowned Countess of Delberg, with all the power, prestige and resources that come with it to continue her fight against the Dhorn Empire. On top of that, she has graduated from an foot agent of the Family to a valuable ally, finally able to repay in full the kindness Master Nathan showed to her all the way back (just in case saving him and the rest of the outfit from a Fate Worse Than Death wasn't enough!).
Neverwinter Nights 2 as well. The original campaign not so much, but definitely in Mask Of The Betrayer.
In Depression Quest you play as a person struggling with depression and trying to get their life back in order. If you make all the right choices (therapy, medication, etc.) you'll be able to avoid breaking up with your girlfriend and becoming happier overall.
The Legend of Spyro series by Sierra ended its trilogy based on this trope. The world literally cracks apart after the Dark Master has seemingly won and accomplished destroying the world. But Spyro uses his powers to save the world at the last moment with Cynder at his side. All their friends are okay and Ignitus, thought dead, is now the new Chronicler. The bittersweet part is that Spyro and Cynder are apparently dead... until its revealed they miraculously survived and after all the crap they've gone through, they've earned the happy ending they both deserved after all those scenes of angst. Oh, and apparently Cynder loves Spyro so they're more then likely in love now. Only took the end of the world for the relationship to become canon.
Persona 4 features an extreme incarnation of this trope, as most players will unexpectedly receive a bad ending after picking the wrong choices of dialogue in two different scenes. Achieving the good ending is such a Guide Dang It! that beating the game actually makes you feel like you accomplished something. All of this is doubly true for the True Ending since the game actively tries to steer you away from it during the "ending sequence." Nobody said reaching out to the truth was easy.
Persona 5 requires you to get through two extended dialogue trees and clear 4 additional dungeons to get past the two bad endings that stand in the way of the true one.
Valkyrie Profile is this trope embodied. Not only does the player have to go through endless frustration to get to it, but in order to achieve the happy ending, the main character herself must become the Lord of Creation in order to remake the worlds.
Max Payne 2 has the player literally earn the happy ending. Only by beating the game on the hardest difficulty level do you see the ending where Mona Sax lives.
Max Payne 3 brings the trilogy to a satisfying close with Max walking off into the sunset.
In the second game, surprisingly enough, pulls this off in its third ending. After grueling fights, a lot of sacrifice, and torrents of blood having been spilled, the game ends with both the dragons and the Gods fading away, and leaving mankind free to pursue their own destiny. Meaning that Nowe and Manah will get the normal lives they longed for, Eris won't have to sacrifice her future and become the new Barrier Maiden, and the world finally regaining a semblance of peace. Also, a literal use of this trope since, to achieve this ending, the player must complete the game twice at the lower difficulty settings, and then finish the game in Extreme difficulty.
In Drakengard3's ending D, they FINALLY pull off a positive Bolivian Army Ending, with the Grotesqueries destroyed before they really start to wreak havoc, at the sacrifice of the main character and the time-traveler who made it possible, but she has at least nine sisters who are willing to deal with any more Diabolus ex Machina in the future.
In NieR: Automata, the route to the final ending E has the following scenarios: the main characters find out that both their human creators and their enemies' alien creators are both Dead All Along, making their Forever War ultimately pointless; the entirety of the YoRHa androids become infected by the Logic Virus including 2B; 9S slowly loses his sanity over learning how his struggle was meaningless and becomes hell-bent on destroying everyone; Pascal gets broken from seeing his entire village either get corrupted by the Logic Virus or kill themselves out of fear; and 9S kills A2 at Ending D while also ungracefully accidentally impaling himself with A2's sword, killing him as well. Despite all of this, if you help Pod 042 beat the nightmarishMini-Game Credits after Ending D, he and Pod 153 will find A2's, 9S's, and 2B's body parts and data and put them back together to come back to life after the war has finally ended, giving them a new chance at life that's filled with far less anguish. Can't do much about reviving the rest of YoHRa or helping Pascal, but it's probably the most optimistic ending to a game that could have come from the game's creator.
In the game version of I Have No Mouth and I Must Scream, if the main characters manage to overcome their flaws and face their past (Gorrister dealing with his guilt about his wife, Benny being able to show compassion for others, Ellen conquering her fears, Ted proving his love for Ellen and Nimdok atoning for his Nazi Warcrimes), this initiates a Logic Bomb for the mad AI, who cannot fathom why the humans are not complete bastards. The players can then proceed to take down AM and revive the human population hibernating on the Moon.
The Shadow Hearts trilogy pretty much DEMANDS this in all three games, playing through normally, with no, or few, side trips, nets you the bad end. in fact the first games Bad End is established as canon in the second. However, if you put the effort in, you can and WILL Earn your Happy Ending. The second game's Good End even implies that the main character, Yuri, gets transported back in time to just shortly before the events of the first game, memories intact, meaning it's quite possible he went through those events again, and that canonically, he got his Happy Ending.
Actually, this is canon. In Shadow Hearts 2, which doesn't happen if Shadow Hearts 1 has a good ending, Bacon performs the Emigre Manuscript's ceremony to raise the dead. In Shadow Hearts 3, upon seeing the Emigre Manuscript's ceremony performed, Roger comments that he's never seen it done before. Since, in Shadow Hearts 2, he does it himself... it means that the only way this makes sense is that Shadow Hearts 2 never had to happen. Yuri got his happy ending in the end.
If you leave enough of them to die, you get the arguably worse ending of being recruited by your Corrupt Corporate Executive bosses for your rampant disregard for your coworkers and skill in getting them killed.
Devil Survivor is a bit evil with this: there's an event on Day 3 involving Haru. If you don't do it, you cannot get any ending except for Yuzu's because it disables the Belial fight on Day 6, thus screwing up the War of Bel, and making the Laplace email predict something completely different. Not to mention, of course, that you have to fight at least one friend regardless of your ending.
The game also qualifies story-wise. The only way to win is to fight. Screw This, I'm Outta Here! is a quick way to wreck the world, even if you can fix the mess in Overclocked. On the other hand, if you do seize the Tower of Babel, you can make a difference and save the world.
In IV, it gets harder, as there are very few Neutral choices, so if you want to go Neutral, you have to carefully balance your responses through Law and Chaos responses. To add insult to injury, the final alignment question can knock everything to pieces if you're too Neutral, as the value it adds to either side can potentially prevent you from staying in Neutral territory. But it's all Worth It, from seeing Humanity once again unified as Isabeau leads the citizens of East Mikado to Tokyo, where their combined hopes and dreams manage to recreate the Great Spirit of Hope, and all of them cheering on for you to recover the Great Spirits of Goodwill and Spite, denying the temptation to forever retain the status quo and to bring forth a devastating revolution. But the best is finally seeing the desolated streets of Tokyo as the Firmament is removed and the sun shines upon the city for the first time in decades. The Goddess of the City thanks you as the sea rushes in and the city is truly restored after decades/millennia in the darkness, and it's then that you know humanity will indeed survive.
Mega Man Zero 4 finally featured the human side of the Robot War's story (showing the humans' perspective of the Reploids, which border on Fantastic Racism). However, over the course of the game, the humans and Reploids finally learn to put aside their differences, creating true peace that lasted for almost two centuries. Subverted, since the ones who fought so hard and so long for this peace gave their lives in the process just so the war could finally end.
Stalker Shadow of Chernobyl has one of these, about 2/3s of the way through the game you get a brief text prompt telling you to backtrack to the first map. If you don't notice this, then it is impossible to get an ending where the player survives, you never learn who or where Strelok is, and the game ends without closure of any sort. Backtracking will wrap up most of the storyline's threads kind of. Hope you were checking your journal.
ICO. Ico has to lose everything first. There's a superb essay about it here. And by the end, he and Yorda reunite on an island.
Xenogears. The game starts with an unending war between two countries, and it just gets worse from there. The unbelievable bastardry of humans towards each other and the sheer power and cruelty of Deus provide a soul-crushing and emotionally draining atmosphere, where if anything good ever happens, it is because something unimaginably bad is sure to follow. Most people die horribly or are grotesquely mutated into biological parts for Deus, resulting in a Class 2 Apocalypse. The dismal nature of the game makes the ending all the more satisfying- Fei slays Deus and the Urobolus factor that binds humanity to it, and even rescues his lover of 10,000 years after many lifetimes of being Star-Crossed Lovers.
The Burning Crusade expansion of World of Warcraft definitely ended this way for the Blood Elves. After having their homeland ravaged by the Scourge, becoming addicted to magic due to the Sunwell's loss, abandoned by the Alliance and betrayed by their own Prince, they finally manage to redeem themselves and cure their addiction through the combined efforts of Velen, Lady Liadren, the Shattered Sun Offensive and, of course, the player. The fact that they managed to banish Kil'Jaeden from Azeroth was icing on the cake.
In American McGee's Grimm, Grimm seems to be a believer in this. A main reason of his hatred for Lighter and Softer Fairy Tales other than being disgustingly saccarine is the fact that he believes that none of the protagonists truly deserve the happy endings since they're all either Too Dumb to Live or because he sees them as Karma Houdinis. He Grimmifies the stories so that the hypocrisy becomes much more clear or that the characters get a more "proper" ending (which in some cases allows female protagonists who go through plenty of crap like Cinderella or Mulan a chance at brutal revenge).
Cave Story. The story is dark enough, with cute NPCs dying or being transformed into monsters, and the Big Bad threatening to unleash said monsters on the world (not to mention that the death count rivals Hamlet). But, by making the right choices, it's possible to not just defeat the apparent Big Bad, but to avert the Bittersweet Ending by saving two main characters (who would otherwise die), preventing the island from crashing, and killing The Man Behind the Man so this threat will never arise again. This requires the protagonist to storm Hell, the hardest level in the game—so both the characters and the player have to earn the good ending.
This is pretty standard for the Wild ARMs series. Pretty much every game has the heroes go through hell emotionally and psychologically, but in the end, they overcome the obstacles and save their beleaguered world...though more often then not at a price.
Much like Silent Hill, Fatal Frame has the protagonists going through hell, almost literally, to get to the end, but it's really up to the player to do what's necessary to unlock the Good Endings. The requirement this time is to play the games in higher difficulties.
The effort put into this becomes kind of pointless when the series is infamous for making the worst possible endings canon...
Phantasy Star IV has the happy ending earned by every single character in the series. We find out that Algo and its inhabitants were created solely to produce heroes meant to keep the Sealed Evil in a Can in its can, and that the struggle against Dark Force has gone on for thousands of years because of a flaw in the seal; Chaz loses his mentor and has a crisis of faith when he realizes that the forces of Light are just as ruthless and manipulative as the Darkness, and refuses to fight on its terms— but chooses instead to fight for the sake of all the people who came before, and lived, fought, died, and were forgotten or lost in their struggle. The ending finds the heroes of the game continuing on and happily living the lives they always wanted to, and the souls of the heroes from the previous games finally being able to rest.
Of all things, God of War ends with this, in that it is revealed that deep down, Kratos was driven by hope from Pandora's Box. The ending has him travelling through deep within his mind, witnessing the worst that he has done and learning to forgive himself. In one of his rare moments of selflessness, he ends up performing a Heroic Sacrifice to release the power of hope back into the world.
Arguably subverted in The Bard's Tale. The best ending for The Bard is to side with the Demon Queen and kill the Hero Antagonist leader of the Druids, upon which you and Caleigh end with a Happily Ever After over a ruined world and to the utter disgust of the Narrator, whereas the good ending for everyone else in the world has the Bard side with the Druids and kill the demonic princess, but then he ends up in the exact same position he was in at the beginning (completely broke and having to con people for a living).
A wonderful example of Earning your Happy ending would be in Breath of Fire: Dragon Quarter. The game is so ridiculously hard that it can easily take restarting the game more than once to actually beat it. The ending, however, is well worth it.
Legacy of Kain has some form of this, if not an actual definitive ending. After two complete games spent chasing Kain, learning about his world's history and prehistory, and moping about his fate, Raziel is eventually absorbed in the Soul Reaver after having gone through multiple trials to enhance his soul through absorbing Ariel, only to grant Kain the ability of seeing the Elder God, his true enemy. More like, Earn your Bittersweet ending, really.
Radiant Historia has this. Stocke goes back and forth between the real history and the alternate history, trying to right the wrongs committed. Even the slightest mistake can result in Stock's friends' lives being ruined and at worst, entire races going at war. What's worse, even after Stock fixes most problems in the history, he will still have to sacrifice himself in the end to save the world. However, if the main character manages to fix everything which takes enormous amount of time and effort, Big Bad witnesses the new history that the main character created and decides to sacrifice himself in Stock's place, allowing Stock to return to his friends.
The good ending for the PS3 game Heavy Rain has this, at least for Ethan. It starts out with one of his sons died in a car accident and then the other was kidnapped. If Ethan survives, the epilogue will end with a high note as Ethan starts to move on.
Actually, Ethan cannot have a happy ending unless another person finds out who the killer was or Shaun was at least. Ethan going in alone will wind up getting him killed.
If you complete the Bear Trial without failing any QTEs, Ethan won't break his ribs and the police won't shoot him.
Silent Hill: Shattered Memories. The monsters in the game mutate as you progress, based on the memories of your missing daughter. If you're a slowpoke, they become emaciated, and zombie-like ("I could be dead by the time daddy comes to save me. I was never very important to him."); if you're a boozer, they become diseased ("Alcohol is bad for you, daddy"), and if you're a man-whore, they become curvy and buxom, and wear high-heels ("All those women weren't mommy"). But if you make all possible haste, they become more like cranky modern-art pieces, and less disturbing ("It's going to be OK. Daddy will be here soon").
The Resistance trilogy. Over the course of the first two games, humanity is slowly overwhelmed by the Chimera. By the start of the third game, the Chimera look set to wipe out what's left of humanity. But once Joe Capelli destroys the wormhole the Chimera are using to freeze Earth, things start to turn around as the humans finally begin to beat back the invasion.
The Resistance example is arguably the most surprising example of this trope. In the lead-up to the third game, Word of God all but promised that the Chimera would erase humanity.
Ezio Auditore of Assassin's Creed II fame spent most of his life fighting the Templars as an Assassin, but lived to retire peacefully, find love again, and raise a family. And after one last adventure aiding a fellow Assassin in "Embers", he dies peacefully.
At the end of MOTHER 3, the player is personally assured that everybody is alright, and that you helped Lucas and the others save the world. To get to that point:
Kumatora has to watch as, one by one, the people who raised her, the Magypsies, disappear, and she is forced to help make it happen.
Salsa and Samba are kidnapped and tortured by the Pigmasks.
Countless (note: sentient) creatures across the Nowhere Islands are torn limb from limb and reconstructed into Chimeras.
By the time Lucas is old enough to go out and do something about the state of the world most of the kind happy villagers have been brainwashed and turned into major jerkasses. Especially toward Lucas and his family.
The Director's Cut version of Afraid Of Monsters has four endings. The first three are Downer Endings that are each more bleak than the last, and the final, happy (albeit bittersweet) ending can only be achieved by first seeing the first three endings, as well as solving a game long puzzle.
Asura's Wrath: it's taken him 12,500 years. He's been killed four times over, and came back angrier every time. He's watched innocents die, held his dying wife in his hands, and seen his daughter cry. He's had to destroy fleets of space ships, battle planet-sized cyborgs and charge down into the heart of the planet to destroy the monster nesting there. He watched his best friend die, in order to empower him. And he's had to go toe-to-toe with Godhimself, and punched the shit out of that asshole. But dammit, Asura rescued his daughter and won his happy ending.
The best ending of Dishonored can only be achieved by having a low Chaos rating and killing as few people as possible, meaning that the player has to literally earn a Happy Ending for Corvo and Emily.
Call of Duty: Black Ops II, it took over 40 years of bitter fighting and some of the worst acts of shadowy actions. But David Mason can save the world and reconcile with his father while making sure the Big Bad never get his wish becoming a martyr for his cause.
By the end of the Modern Warfare series, there have been countless battles waged around the world between many various factions, with millions dead on all sides, billions in damage and losses, and several nuclear weapons used, with World War III only having been stopped just short of full-on nuclear annihilation. Along the way, Task Force 141 has been disavowed, accused of treason, and had each and every single member die at some point or another, until only one remains. After the peace talks made possible by rescuing the Russian President in "Down the Rabbit Hole", which itself took the Heroic Sacrifice of the Delta Force members sent to assist Price and Yuri, it's safe to say NATO and the Loyalists have certainly earned their happy ending. The final level, "Dust to Dust", is about Price earning his.
Tales of the Abyss: Sure, we stopped the Big Bad, a lot of the main characters and secondary characters have survived, at least two party members (Jade and Guy) have come to terms with their dark pasts, the world has been saved, the miasma has been destroyed, and tentative peace reigns between Kimlasca and Malkuth. Too bad to get to that point, the heroes had to destroy a city (by accident); sacrifice ten thousand replicas (on purpose); fail to prevent the deaths of Frings, Ion, the Class I and Class M scientists; and kill two-thirds of the God-Generals, who are some of the most tragic anti-villains ever, especially in the cases of Largo and Arietta. Then, both Asch and Luke make a Heroic Sacrifice in the fight to free Lorelei - one of them is saved in the ending, but it's not specified which. On top of that, the Planet Storm has stopped, which will eventually cause fonic artes and fon machines to lose their source of power. Jade predicts that, along with the technical dark age due to the loss of fonons, it's likely that war is on the not-so-distant horizon thanks to the upheavals in the Order Of Lorelei.
Tales of Xillia 2 has this be the case for Elle in what is considered the Golden Ending. The party has gone through multiple fractured dimensions, had their hearts broken several times because of the circumstances in those dimensions, learned that Elle is from a fractured dimension and Ludger is her father, had to lose party members to balance the world again and Ludger also had to kill his dear, older brother to make it to the Big Bad. Then Ludger decides to sacrifice himself as the millionth crystal, so that Elle can continue to live. Even if she is not the 'real' Prime Elle, who hasn't been born yet, even if she considers herself a fake, Ludger loves her like his family and wants her to continue to live. The final scene depicts a Time Skip and Elle is now a teenager, you see how Jude has won the Howe Prize, the two worlds are at peace thanks to Gaius and Rowen's work, Leia is a successful reporter and even Rollo has found love and lies peacefully next to Elle with his offspring.
Lollipop Chainsaw: At the beginning, Nick had to be decapitated because he was bitten by a zombie, and was kept alive as a talking head hanging from Juliet's hip for the rest of the game. But in the final chapter, Juliet sacrifices Nick by attaching him to Swan's body and destroying Killabilly, thus saving everyone. Morikawa-Sensei, who died earlier in the game, decides to give Nick a second chance because of his sacrifice, so he brings him back to life, but with Sensei's body. Neither Nick nor Juliet mind though, because all that matters is that he has a body again. Then, Juliet's dad, who was believed to be dead, reveals himself to be alive, then he, Juliet, Nick, and Juliet's sisters all go back home to celebrate her birthday. If you rescued all saveable classmates, then we are treated to a very heartwarming after-credits scene where they all return home, and Nick gives Juliet a nice birthday present. Awwwww.
The Night of the Rabbit: Jerry Hazelnut manages to get one after all his trials and tribulations. At some point he returns his home world just to find out that he had been missing for years, his home is condemned, his mother is no longer around (possibly dead) and his father has been erased from existence and from everyone's memory. Fortunately at the end he manages to get back to his own time and place with both of his parents alive and well.
In Ghost Trick, Sissel is murdered, watches people he grows to care about die (some multiple times), and goes through it all without his memories. As the game progresses, he ends up trapped on a sinking submarine with two characters he's bonded with, forced to face the reality that there's no way to save them at all, as far as he knows. All while it looks like he'll vanish and never find out his past. By the end of the game, he manages to save everybody (including the guy who was the villain for most of the game), regains his memories, and lives out a happy life with his friends in a new timeline. This also applies to Missile, who in the first timeline was shot and learned that his two owners were also killed, and while he got ghostly powers, he lacked the ability to save them. The only one who could help him refused to do so, forcing him to go back in time and spend ten years working on an elaborate gambit to save his mistresses. In the rest of the game, he dies twice to save Kamila, and willingly stays dead to continue to do so. He ends up living in the better timeline with Sissel, while his alternate-timeline self passes on, happy with the knowledge that he ultimately succeeded.
In Tsukumogami, two of the endings - one Downer, one Good-yet-Bittersweet - are very easy to get - depending on your actions throughout the game, you may get locked into the Downer Ending, but if you're heading for the Bittersweet Ending, you can still stumble into it by making the wrong choice during the Final Boss fight. However, the Golden Ending, where everything that adds a bittersweet edge to the normal one gets avoided, requires you to jump through a number of hoops, including defeating 4 powerful Optional Boss monsters, completing a sub-quest that spans most of the game's areas, and of course Catching Em All. Oh, and you need to have made the 'right' choice in every choice throughout the game, which can be quite a Guide Dang It! - the first choice, in particular, is counterintuitive. Mess that up, and you can go through the whole game doing everythign else right, and still get stuck with the Bittersweet Ending...
After all the crap Earth has endured throughout the Command & Conquer: Tiberian Series, the campaigns of Tiberium Twilight actually merge into a unified ending that is this trope. And it's not earned easily. First, while not spoiling anything, tiberium has "evolved" into a new form that's not responding well to the traditional methods of control, which forces an Enemy Mine situation between the two main factions. The campaign revolves around this reluctant alliance. In the end, it works. The new system keeps tiberium under control and actually turns it into an abundant energy source, so people don't have to fight over energy. Meanwhile, the infamous Kane and his Brotherhood of Nod leave the world for parts unknown, meaning Earth no longer has to live in fear of him. Oh, and The Hero Dies. And Earth's still a mess. But at least humanity can look around, declare the worst is over, and actually get started cleaning up.
Also the Scrin invasion has been retconned away.
Five Nights at Freddy's: Completing all seven (terrifying) nights will get you fired from your job. Compared to the fates of the other protagonists (possibly accused of multiple murders that he didn't do, possibly accused of arson that he might or might not have done, the friggen Bite of '87 victim) this is a happy ending.
In Dark Souls II, the pervasive, crushing despair that's a lynchpin of the series finally ends when you beat all three DLCs. the memory of King Vendrick imbues all three old crowns with an enchantment of a true ruler; as long as your wear one of the three crowns, you can't hollow. It's certainly not the perfect solution, but the player character has succeeded at what they, and every protagonist of every souls game has sought out; a cure for the curse of undeath.
This becomes a Subverted Trope when you start a New Game Plus. The crowns lose the function unless you redo all the actions to empower them again.
The first half of Fire Emblem: Genealogy of the Holy War ends with a Shoot the Shaggy Dog played absolutely straight, with the hero being betrayed by his best friend, a Duke, who frames him for treason, steals his wife, gloats about the latter right to his face, and then murders him. He then has his men then slaughter the hero's army, that is, all the characters you've become attached to up to this point, appoints himself Emperor, gives his various crooked noble friends stewardship of the other countries on the continent and has them run said countries straight into the ground. Fortunately, the murdered characters left some very pissed-off kids behind, and once they come of age they get to lead a revolution, put the rightful heirs back on the thrones of the various countries, and send all the nobles, the Emperor, the evil bishop manipulating him, and the dark god manipulating him packing. Even the Emperor gets to redeem himself somewhat by freeing his daughter from the bishop's captivity, and she becomes the key to striking the dark god down.
In This War of Mine it's possible, though very difficult, to survive until the army and the rebels reach a ceasefire (after about 45 days). Any of your characters who have managed to survive without doing too many terrible things or needlessly killing people will get a happy ending.
Subverted in Walker. The player needs to choose the arcade mode and beat all four levels to finally see the ending, but the fate of the protagonist remains unclear.
Played straight in Dynasty Warriors 8, as the hypothetical scenarios for each kingdom (the good endings) require you to fulfil a number of extra objectives before the story branches out
The heroes of Lufia & The Fortress of Doom and Lufia: The Legend Returns both go through a lot for their happy endings. Embarking on epic quests, fighting four evil gods, learning that the girl they love is the reincarnation of one of those evil gods, watching their loves die in order to prevent the Sinistrals from resurrecting, and then eventually reuniting with their love interests, who have lost their memories but are no longer one with the Sinistral of Death.
Fallout: New Vegas is set in a Crapsack World where multiple factions battle for dominance, but if you jump through enough hoops and do a lot of careful political planning, a Good Karma NCR or Independent Vegas ending can bring about a happy ending for just about every faction and individual in the wasteland. Or at least to the ones that deserve them.
In Fallout 4, pursuing the story path with the Minutemen results in this. The Minutemen have had a rough couple of years before you strolled into the scene: their base was wiped out by a Mirelurk Queen, their general was killed, most of them ran off to be Raiders or Gunners, the few who remained were slaughtered and only one of them protecting a handful of now-homeless settlers to the last bullet survived through your intervention and sheer dumb luck. With your help, they can rebuild their strength, ally with settlements (and build some new ones), retake their base, and finally lead an assault on the Institute. With the Railroad being a non-factor (assuming you allied with them and sounded the evacuation of the Institute before you blew it up) and the Brotherhood of Steel being cowed by the show of firepower, the Minutemen become the unchallenged protectors of the people of the Commonwealth, establishing outposts, patrolling the roads and even moving into Diamond City. And all with minimum loss of innocent life.
IF you want to get the best ending in Undertale, you are going to go through hell to reach it. No killing is allowed whatsoever and if you kill even just one mook, you're screwed out of the ending unless you start over/reload your save file. Since you can't kill anyone, every fight becomes a boss fight in itself since you have to figure out a way to get enemies to stop fighting you without resorting to violence. Not only that, you'll also have to befriend several major characters so that they see you as a true friend and also endure some grueling boss fights towards the end of the game. If you preserve in the end, you'll get what is considered to be the ultimate happy ending for everyone.
The hero in Dragon Quest V went to a lot of crap during his life. He saw his father dying next to him, was enslaved for 10 years, after he get married, became a father and finds out he is the king of a land, he and his wife were turned to stone for 5 years, then, he is finally reunited with his thought to be dead mother, only to see her die a few minutes later. Let's just say that he deserved to save the world and rule his land with his wife and children.
Likewise, the hero from Dragon Quest VIII went on an adventure to find a cure for his king and princess' curses, the latter of which he has a crush. He fought the man who curses them and defeated him, only to find out that it didn't break the curse. Saw one of his friend being possesed by the staff the man hold, has to beat the real source of the evil. In addition, he finds out the truth about his origins and has to crash a wedding between the princess he loves and her disgusting fiance. In one of the endings, he succeed in marriing the princess after exploiting a loophole.
Pokémon Super Mystery Dungeon pulls this off twice. By the climax, before which the heroes witness a mountain's worth of horror, betrayal, and sacrifice to bring them to Dark Matter, everyone, including all of their friends and the Legendary Pokemon, are turned into stone, and the Tree of Life that sustains the planet is dying. It took sheer determination to continue fighting and ultimately defeat Dark Matter to revive the Tree of Life. The hero gets rewarded with saving the world by being forced to watch their partner disappear to bring back Mew to truly finish Dark Matter. The player character has to then go through two brutally hard dungeons to meet Mew in hopes of finding a way to bring back their best friend, only to find out that Mew doesn't even know that he's the reincarnation of the partner. The player character then has to go through another difficult dungeon to rescue Mew from kidnappers who believe that if Mew continues to live, Dark Matter would return. Refusing to say good bye to anyone again, the player character vows that they are willing to fight Dark Matter over and over again to save their new friend. This declaration of friendship just so happens to be the key to bringing back their partner back to life at the dungeon; the whole kidnapping was planned by Nuzleaf and his lackeys who want to make up for their actions under Dark Matter's control. They end up getting accepted back into Serine Village, and the reunited heroes are free to live a happy life together filled with exploration and discovery. And as for the petrified Legendaries and allies? Now alive and well and are front and center to aid the expedition team.
In Grand Theft Auto V, the two bad endings of the game are earned after some relatively easy missions, and both result in one player character dead and the remaining two ceasing all contact. The third ending follows Franklin fighting to get Michael and Trevor to set aside their differences so they can secure their freedom by killing their enemies. It is one of the tougher missions in the game, but completing it results in the best ending where all three player characters survive, get off scott-free, and remain on good terms.
In Phoenix Wright: Ace Attorney, Phoenix has to take on four seemingly impossible cases, go through all sorts of stress and hardships to win them, suffers the blow of his mentor being murdered, and ultimately has to tackle a case so difficult, it went unsolved for fifteen years. But it all pays off in the end, when all the clients are found innocent, von Karma is proven to be the guilty party behind the DL-6 Case, and Edgeworth realizes that his father's death was not his fault.
In the last trial of Justice for All, Maya is kidnapped, and Phoenix is given the Sadistic Choice of getting his client (who actually is guilty, for a change) off the hook, or having Maya be killed by her kidnapper. As Gumshoe, Mia, Edgeworth, and even Franziska scramble to find some way to catch the kidnapper and save Maya, Phoenix finds himself having to either abandon his ideals and pin an innocent woman with the crime, or let Maya be killed. All the while, his reputation plumets as the audience of the courtroom has no clue why he continues to defend a man who's obviously guilty. At the very end though, thanks to last-minute evidence scrounged up, he's able to get the kidnapper to release Maya and turn on his client.
In Apollo Justice: Ace Attorney, Phoenix is disbarred, framed for using forged evidence, and reduced to playing poker at a restaurant to make a living. He spends several years quietly investigating the truth behind the case he lost, putting all the pieces together. And by the end, the truth is revealed, he's proven innocent of forging evidence, and is able to retake the bar exam and become a lawyer again.
In Dual Destinies, the legal system is in the middle of the Dark Age of the Law, where prosecutor and lawyer alike seek victory at any legal cost and trust in the legal system is at an all time low. And the catalyst for the Dark Age, Phoenix's disbarment and Simon Blackquill's incarceration for the murder of Athena's mother. While the former was dealt with in the previous game, the later is still very much a problem. And that's not even getting into what happens in the game: A courtroom was bombed right at the begining of the game (though it happens later chronologically). The victim of the forth case was Apollo's friend, and Athena gets accused of his murder, causing Apollo a conflict of loyalties, Blackquill is just one day from his execution by the day of of the final case, and getting him acquitted will only get Athena convicted of the murder of her own mother. While Trucy is held hostage at the Space Museum with several others, and the kidnapper is Blackquill's older sister who's desperately trying to save him. In the end, both Athena and Blackquill are proven innocent, Trucy is safe and the real culprit is bought to justice, with the Wright Anything Agency intact and ready to put an end to the Dark Age of the Law.
In the campaign for The Flame In The Flood, Scout and her Canine Companion Aesop travel over forty miles on a raging river, facing predators, disease, deprivation, and increasingly cold weather to find some vestige of civilization in a post-apocalyptic world. Survive to the end, and Scout makes it to the Kingdom, an abandoned amusement park that's been converted into a thriving settlement.
In Rebuild: Gangs of Dreadville, achieving the Golden Ending (the only one that's not at least bittersweet and at worst a downer) requires completing many tasks as early as the second city. If you happen to miss any of the steps, you won't get a chance to win in the best way possible. Oh, and you're not likely to know that something might be important, especially since the game is full of Red Herrings. In Wenatchee, you need to get your hands on the Agabayani research. In Pentiction, you have to help 1337cREw break into the Government database to get a data dump of European research into the zombie virus, after which you have to decode it. In Kelowna, you have to help one of your engineers research the antivenom to a zombie bite. In Abbotsford, you have to research the cure. Also, prior to Abbotsford, you have to complete the extremely time-sensitive Monkey Blood sidequest to ensure the Golden Ending. Finally, in Vancouver, you have to use the cure and stop the Government without nuking it.
In Demon Gaze, the Player Character finds out that he is a demon who has a human soul as an attempt to defeat the demons who wandered the land. During the story, he has to serve as The Atoner after being responsible for the death of his mentor, Lancelorna. At end, he finds out that in order to eliminate all the demons, he has to die. (Being the demon Terra). In the end however, his human side survives (and his demon powers are kept) and stays in the inn with his Love Interest and raising a daughter together.
SOS is made of this trope. Since it's about escaping a sinking luxury cruise liner, you have to find and escort enough people as well as certain persons depending on what character you're playing as. You get one real time hour to do this. But if you can pull off an escort mission to end all escort missions, you can get the happiest ending, allowing you character and the people they care about to not only move on from the disaster but become better people.
In the end of Wolfenstein II: The New Colossus, after years of brutal Nazi occupation, the Resistance spark a new hope in the world. Blazkowicz's body is no longer crippled and dying, so he'll live to see the eventual defeat of the Nazi regime and the resulting peace. He has avenged Caroline and Super Spesh by killing Frau Engel, ensuring the Nazi regime is headed by an ailing Adolf Hitler who will likely die in a few years without an effective successor. He has proposed to Anya and has twins on the way. And best of all the Second American Revolution is under way, and if the credits sequence is any indication, results in an utter defeat for the Nazi regime which forces them to flee into space.