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.
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 and Metal Gear Rising Revenganceprove 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.
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 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.
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 a literal 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.
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.
Drakengard2, 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.
Subverted, the supplemental material shows that the best ending still gets screwed over. But 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 Diablous Ex Machina in the future.
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 (Gorrison deal 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 definatly 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 Mc Gees 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 enchance 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.
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 Assassins 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 2, 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.
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.
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 series, the campaigns of C&C 4 (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.
"Five Nightsat Freddys": Completing all seven (terrifying) nights will get you fired from your job. This is a happy ending because the protagonist is now safe from killer animatronics.
In Dark Souls II, the pervasive, crushing despair that's a lynchpin of the series finally ends when you beat all three DL Cs. 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.
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.