Back From the Brink

"Martian Officer: Sir, the Arcturans have destroyed the remainder of the fleet. I've sent a distress signal to all ships across the galaxy, but, we're heading straight into their sun and our engines are about to explode!

Enforcer Drone:

Martian Officer: Now would be a great time to start!"

- Spaced Invaders

In any video game where the player's country/faction is involved in a conflict before the game starts, the game will begin with the enemy about to deliver a deathblow to the allies -- they're about to kill off the last regiment, destroy the last base, or capture the last territory. Then the player will immediately take control and suddenly It's Up to You to fight Back from the Brink, completely reversing the course of the war up until that point.

Oddly enough, despite the fact that the enemy has the entire country/continent/planet/galaxy under his control except for the tiny corner where the game begins, the strike force that the enemy sends to finish you off in the first mission will always be almost pathetically weak, easily defeated by the player.

Used in nearly all genres of video game, but especially prevalent in Real Time Strategy and Turn-Based Strategy.

Compare Late to the Party, except that the main character has been around for the whole time, just not under the player's control. Related to Always Close, but with an entire war. If you tilt your head and squint just right, this trope appears to be connected to Conservation of Ninjitsu: The less territory a side has, the more difficult they are to defeat. This may be a sort-of Truth in Television--barring things like nukes, a side with less territory but roughly the same personnel and material will have more people and machines protecting an area of a given size; supply convoys and so on won't have as far to go and thereby remain exposed less often; etc.

The most famous Real Life example would be John Paul Jones, and is actually the original source of the quote "I have not yet begun to fight" which has then been parodied ever since. With his ship, the Bonhomme Richard burning and sinking, and the flag (aka "the colors") shot away ("striking the colors" was a symbol of surrender); one of John Paul Jones officers, apparently believing his captain to be dead, shouted a surrender. The British commander asked if they had struck their colors. Jones replied: "I may sink, but I'll be damned if I strike!" Eventually Jones won the battle and transferred his command to the captured enemy ship as his own ship sank.

See also Eucatastrophe.

Action Adventure

 * The Legend of Zelda Twilight Princess: By the time Link starts fighting back the twilight, it's taken over all of Hyrule but the area where The Chosen One lives. In fact, they would have gotten that area too had Link not come back at just the right time to kill off the Twilight Beasts.
 * The second part of The Legend of Zelda Ocarina of Time begins with Ganondorf in almost complete control of Hyrule.
 * Same as well in The Legend of Zelda a Link To T He Past Zelda is the last of the Maidens to be free, and Link saves her, loses her and then frees the others. This happens quite a bit in Zeldas..

Fighting Game

 * The beginning of Dissidia Final Fantasy informs you that the forces of Cosmos, goddess of harmony, have pretty much lost the war with Chaos, god of discord, with the ten playable heroes being Cosmos's last soldiers.
 * This thematic element carries over into the gameplay, as well. The Cosmos Judgment ruleset allows a filled Ex Gauge when HP is drastically low and opponent's is very high and can restore a losing character's summons, thus allowing a losing character to come Back From the Brink. There are abilities and accessories whose effects only activate when a character is in a losing position, allowing that character a chance to come Back From the Brink. The auto versions of many summons, such as Odin, Phoenix, and Bahamut, activate when a character has been put at a disadvantage--sometimes a very severe one--allowing that character a chance to come Back From the Brink. And with proper timing, entering ExMode will free the character from any attack short of an opponent's ExBurst--potentially allowing a character to free themselves from an attack that would kill them and gain the benefits of the ExMode, thus allowing an opportunity to--you guessed it. This game is a fan of Back From the Brink in general.
 * Contrast the Chaos Judgment rules, which subvert this by punishing players who aren't on the brink for not pushing it for all they're worth.

First-Person Shooter

 * In the original Halo, the game begins with your ship fleeing from an enemy armada that just wiped out an entire human fleet and the planet it was protecting... then you go on to annihilate most of that fleet (okay, the Flood helped, too). It's not mentioned much in-game, but it's All There in the Manual. Or rather, All There in the Novelization, anyway.
 * Then the Covies annihilate most of Earth's population between 2 and 3.
 * Pretty much any Quake game except the third (with even more of an Excuse Plot than the others) is like this.
 * Quake begins with everyone in the base but the protagonist dead.
 * Enemy Territory Quake Wars features the human fight against the Strogg on Earth.
 * In Quake II, humanity's managed to fight back desperately against the Strogg, and launch a counter-offensive; but Bitterman (the PC), is the only space marine who survives past the intro.
 * Quake IV. In the beginning, you are separated from the main Earth forces. When you join them mid-game, however, it gets only more difficult.
 * Once you start reading the Luminoth Lore in Metroid Prime 2: Echoes, you begin to realize just how close to complete destabilization the Ing brought Aether before you grabbed up that Energy Transfer Module. Then again, you ARE Samus friggin' Aran...
 * More specifically, the Ing were two rooms away from destroying the planet when you chanced upon them.
 * Home Front feels like this. North Korea has seized practically all of the United States, and you play as a recruit of a small resistance faction that eventually tries to meet up with the remains of the US military and start turning the war against North Korea, even though they have all but won already.
 * Resistance 3 starts off with 90% of Earth's population either killed or converted by the Chimera. It's the player's job to ensure that they don't wipe out the remaining 10% with their terraforming plans.

Hack and Slash

 * Somewhat justified in Drakengard, as the main reason the Union comes back from the brink of destruction despite your character having been around the whole time and whooping ass is that he's just gained the allegiance of a dragon. The second level which you play involves killing the entire besieging army with the dragon. Not content to be one-upped, The Empire deploys some interesting Schizo-Tech during a later climactic battle, and when even that fails, just screws everyone over.

MMORPGs

 * World of Warcraft: Wrath of the Lich King basically has the good side start with a few cities where the player (almost singlehandedly) takes back huge sections of regions and fights and kills thousands of overratedly-overpowered undead, all the way to the Lich King's throne.
 * Furthermore, when you fight and get the Lich King down far enough in health, he instantly kills your entire raid, at which point the LK's ghost father conveniently comes out of nowhere, resurrects everyone, and then stunlocks the Lich King long enough for your raid to leave, have tea and biscuits, and finish him off.

Real Time Strategy

 * Command & Conquer: Red Alert 2 - the first Allied mission.
 * Command & Conquer 3: The first GDI missions (excluding the intro).
 * Shockingly enough, used in Command & Conquer: Red Alert 3. Given the Melee a Trois nature of World War Three in this setting, two of the campaigns begin with the player heroically throwing back the nearly-successful invasion of Britain/St. Petersburg; the Imperial campaign features one later where, despite winning the war against the USSR, the Empire is nearly destroyed by a surprise Allied counterattack. It also plays in gameplay a few times: in Allied Mission 7, the player begins with a large base, which is promptly annihilated by a triple Psionic Decimator strike and must rebuild quickly to finish off the Imperial defenders; meanwhile in Imperial Mission 9, Zelinsky's last defense obliterates the entire mission area except a few of your troops and a few of his, and it's up to you to finish the mission with the handful of survivors.
 * Uprising's mini-campaigns feature this a few times as well; since the Empire and the Soviet Union lost the war in Red Alert 3, their armies are weakened at the beginning of the campaign, leading to some guerrilla-style tactics involving stolen or improvised equipment. Also, in Allied Mission 2, your base is disabled by a Tech Inhibitor... but since you have Special Agent Tanya on your side, it's not really that big of a deal.
 * Standard in Super Robot Wars is to have the player open a chapter with just a few units against an enemy's forward force. Defeat the weak scouting party, and the real army shows up. This is about the time that the player's mother ship makes it's appearance, along with the force you've already collected.
 * Averted in the Homeworld game, where the grand evil empire has already -won-. The forces you fight in the first few missions are either petty space pirates or the fringe fleets of the empire who just happened to be in the area. Some of the middle missions, your intelligence officer even makes it rather obvious that your chosen flight route is designed to -avoid- having to deal with the bulk of enemy forces.
 * Total Annihilation uses this with its campaign for both sides: play Core, and your first mission to save your last remaining Commander (which is, incidentally, deactivated) from being found by Arm scouts on the Core homeworld, the last planet Core can stake at least a bit of claim to. Play Arm, and you have to defend your last Galactic Gate on their homeworld from the invading Core who have taken over everywhere else. In other words, which side is losing and which side is winning depends entirely on which side you choose to play as. There's some reason behind this, since the game's nanomachine-based construction enables both sides to fart out military-industrial complexes, making strategy much more vital than resources. In essence, both sides are fighting the war with rather chunky Gray Goo: Unless you destroy every single builder unit, the enemy can regain it's strength at an exponential rate. Hence the name, Total Annihilation. No other type of victory will do.
 * Supreme Commander oddly has the reverse of this. Your side is just about to win. The 'enemies' are themselves making their final desperate attempt to fight Back From the Brink and the single player campaign simply has you... delay them a bit.
 * More dramatic than it sounds... both enemy factions make very, very good final and desperate attempts: whichever side you play, the final battle takes place on Earth with the clock on the planet-killing Wave Motion Gun ticking.
 * Specifically the Aeon are just about to win in all three campaigns. The EA campaign has you trying to get said weapon built in time, while the Cybran campaign is about shutting down interstellar travel to play for time. In the Aeon campaign you have to keep an omnicidal splinter group of the Aeon from being the ones to finish the conquest, and then do it yourself.
 * Played straight in the expansion, Forged Alliance: The Coalition, the titular "forged alliance", is fighting off an alien invasion, and losing... badly. The briefing for the first mission states that the enemy has somehow found your last major (secret) stronghold, and as the mission begins, they start bombing the base you will get control over, and they just barely managed to get your ACU through the base's Quantum Gate, literally seconds before the Gate gets destroyed.
 * Myth starts out with only a single major city of The Light still standing through forty years of war. After discovering a powerful magic artifact which allows several victories to be scored, pushing back the torrential hordes of darkness with great difficulty, the magical coup that allowed them turns on you and causes a civil war amongst The Light's already dwindling ranks. Upon regrouping, a desperate plan is concocted in which almost all of your remaining allies are implied to have purposely sacrificed themselves to provide a distraction, allowing you to capture the Big Bad. When you finally destroy him, the ending Cutscene indicates that you and your entire squad were wiped out in the resulting explosion.
 * Myth 2 retcons it: one guy lived. It wasn't you (or rather the narrator, since you aren't actually a character). He did a decent job rebuilding, too.
 * Starcraft Episodes IV and VI start that way. And, of course, some individual missions.
 * Averted in Rise of Legends, in which Miana is simply one of several dozen Vinci city-states and your fight is primarily a war of conquest.
 * Played straight in the Alin campaign, however, where the Alin Kingdom has been pushed back to the city of Azar Harif by the Dark Alin by the time Giacimo gets there.

Roguelike

 * The Roguelike Freeware Game Chess Rogue is a most extreme example - the player is the White King, the only surviving white piece, who must overcome an entire army of black pieces.

Role Playing Game

 * In Final Fantasy VI, The Returners have a stronghold of sorts in the mountains east of Figaro--however, it's about the time that you start the game that the Empire starts occupying cities to build their own power, but also to try and stamp out the Returners. This is a slight aversion of the trope, as your objective as the player is not to win back control of the cities, but, eventually, to solve the issue diplomatically.
 * It sort of happens again in the second half of the game. It becomes Up To You to
 * In Dragon Quest VII, after the last battle between Good and Evil, most of the world was sealed away by the Demon Lord. Ultimately, it deteriorated to the point where the only scrap of land left is a small island. On the bright side, there's no monsters on land...! Oh, and there's a set of Ancient Ruins where the heroes can eventually Set Right What Once Went Wrong and restore the world bit by bit.
 * Final Fantasy III does this a lot, first with saving the last crystal from the forces of darkness and then bringing back stability to the world.

Shoot'Em Up

 * Zero Wing opens with CATS capturing all your base, setting up you the bomb, and asking how you gentlemen are. You must move ZIG for great justice and prove you have chance to survive make your time.
 * What you say!?
 * In Star FOX Assault, the Cornerian fleet is about to be decimated by Andrew's forces before the Great Fox suddenly warps in, whereupon Star Fox basically wipes out most of Andrew's army in a matter of minutes.
 * Later on, in Star Fox's absence. As soon as they arrive to take care of business, the crisis is quickly averted.
 * Dying repeatedly without killing your opponent on multiplayer results in respawning with the Demon Launcher, basically a BFG.

Simulation Game

 * This trope is a staple in the Ace Combat series, present in almost every game.
 * Ace Combat 04 Shattered Skies, Ace Combat Zero and Ace Combat X start with the player defending the allies' last remaining airbase from enemy attack.
 * During the opening cutscene, Ace Combat 5 The Unsung War kills off every pilot on the base except for the player, his squadron and their commander. To be fair, however, there's never really a Back From the Brink point within the game itself.
 * Played with by Ace Combat 6 Fires of Liberation, where the first mission is a surprise attack by the enemy which ends with allied forces being driven from the area and abandoning their capital to enemy occupation, so it's not until the second mission that you're defending your last remaining airbase from enemy attack. The title of the second mission is, in fact, "On the Brink".
 * Which is a perfect demonstration of why the trope is necessary: The first mission is laughably easy But Thou Must! retreat anyway. Even though the player could (and eventually does) almost single-handedly wipe the floor with the entire Estovakian military.
 * In the same vein as above, Airforce Delta Strike starts out with one of these missions.
 * In Stellar 7, Earth is being invaded by aliens so they send you, one lone pilot, to fight through them all the way to the alien general and stop the invasion.
 * Double Subversion in Starsiege, which involves a civil war between humanity interrupted by the return of the cybrids. The war against the cybrids isn't winnable, and the apparent last mission is a last-ditch effort to distract the cybrids from your "last hope of humanity" colony ship so it can escape and someone can survive. However, then you find a way to attack Pluto, where the head of the Cybrids is, and kill it, which creates enough chaos back on Earth to allow the Humans to win the war.
 * Also averted somewhat in Starlancer. The player's faction starts at the brink, and seems to be winning back a little bit as it goes along, but the enemy is vastly superior. Ultimately, it turns into an attempt to load up a series of colony ships and abandon the Solar system. All of it, in fact, is the background details described in the intro to Freelancer.
 * Every game in the Naval Ops series opens with the player's faction on the ropes. And yet they never have to really worry about fuel and ammunition supplies.

Third-Person Shooter

 * Gears of War starts off with Marcus Fenix the player character getting out of prison because The Cog is just that desperate for soldiers. The locusts have pushed the humans back to their last city.

Turn-Based Strategy

 * Nectaris/Military Madness - The game takes place on the moon. Before the opening mission, the entire moon has been taken over and, in the opening mission, the player commands the last survivors of the Union army (little of this is mentioned in game though; mainly, it's All There in the Manual).
 * In the second half of Fire Emblem 4, the player takes control of Celice and a ragtag band of rebels, starting in an obscure corner of an entire continent that the villain took over during the first half of the game.
 * Played straight, subverted and averted in Fire Emblem: Radiant Dawn. The player starts with the control of Daein's Dawn Brigade, and in the only run the country really is restored; however, in Part III, when you play part their side part (as pawn to The Empire) their opponents', they're steadfastly losing, and their Last Stand ends as a dramatic defeat. It's also averted with the enemy country, Crimea; Crimea was the attacker in the conflict with The Empire, and was not losing in any sense of the word. It's played straight if you think of Crimea's queen, though, who in Part II was under fierce criticism and had faced a rebellion in her own country, and whose position in Part III is much more established.
 * Also played straight in the prequel Path of Radiance for Crimea against Daein, is then The Empire.
 * In the Sega CD game Dark Wizard the player, as the latest successor to King Armer VIII, starts with the tiniest, most-defeated remnant of the Holy Army (three unnamed units) that's been squirreled away in the far-off wastelands of Quentin. While a professional army made up of the much-stronger equipment-wearing, magic-using units is impossibly expensive for your tiny starting tax base, you can still fight using a never-ending stream of summoned Mon, just like all of your opponents.
 * Extra points because the first enemy you fight is a glorified warrior unit called "Warlord," who is the weakest spell-caster and summoner out of all the enemy generals.

Turn Based Tactics

 * Advance Wars DS - The first mission (aside from the training one) has the player defending Omega Land's last HQ.
 * The Jagged Alliance series has a sort-of-justified version of this trope. Being that your troops are a band of mercenaries - essentially a new infusion of ace personnel into a war presumably already won - the enemies start out easy because they're routine patrols that get surprised by people who can actually shoot them. In Jagged Alliance 2 specifically, Queen Deidranna is a vain, cruel, and egotistical dictator who nevertheless keeps a goodly portion of her guard around the things that actually do matter - her gold mines, her towns filled with either smarmy sycophants or cowering subjects, and her SAM sites. The first secures the economy and allows her to maintain her expensive and well-equipped army, the second secures her status as ruler and dissuades open rebellion, and the third forces any would-be saviors to hoof it unless they can destroy or take over the sites.
 * In Sengoku Rance, when Rance becomes the secret ruler and takes control over the once powerful Oda Family, it has been reduced to only one territory. Then after Rance starts his Attack! Attack! Attack! tactic he somehow manages to rapidly conquer the other factions.

Anime And Manga

 * Uchuu Senkan Yamato (aka Space Battleship Yamato, aka Star Blazers) starts off this way, with the Earth a radioactive wasteland, what's left of its population living underground, and its space defenses destroyed.

Literature

 * Robert A. Heinlein's novel Sixth Column starts off with the United States completely conquered by technologically superior invading forces. The only remaining resistance is a secret underground U.S. Army laboratory which was almost completely depopulated by an experimental accident. Through tremendous effort and quite a bit of luck, the remaining soldiers and scientists manage to whip up several superweapons, create a secret army (masquerading as a religion) and defeat the invaders.
 * That part of the Lensmen universe which features Kimball Kinnison and his colleagues starts like this - the enemy has massive superiority in ships and is plundering the spacelanes with impunity; his ships are faster than anything stronger and stronger than anything faster; Galactic Civilization is on the ropes. It's down to Kinnison, newly graduated, to take an untried and experimental ship, capture an enemy vessel and learn its secrets. And even when he's done that, his worries have only just begun...

Live-Action TV

 * Power Rangers RPM starts as humanity has been reduced to a single sealed city by killer robots, and the robots keep getting through the walls. They win in the season finale and start recolonizing the planet (or do they?), although the global ecosystem is pretty much shot to hell.

Web Comics

 * In Erfworld, Wanda mentions early on that their side used to hold eleven cities, and at the beginning of the story, they only have their capital. Which is what gets them desperate enough to summon Parson.

Real Life

 * Truth in Television: In World War 2, Russia had almost no weapons or ammunition, its three major industrial cities were under attack, much of the remainder of Europe was under the control of the Axis powers, with Britain was being bombed constantly. Only after Russia started winning the battle of Stalingrad did the tide finally turn in the Allies' favor. Having the world's largest industrial economy join the fight in 1942 didn't hurt either.
 * World War II from 1939-1941 is a subversion of the trope; the German blitzkrieg strategy ensured that any enemy army that started losing would be divided and cut off from communications and supplies, meaning that most countries simply surrendered rather then carry out a valiant (and possibly successful) counterattack.
 * This was lampshaded in a sketch on That Mitchell and Webb Look, where an SS commander came to the realisation he was on the evil side because there are very few movies where the good guys start out doing really well but then almost lose after the baddies counter-attack, but quite a lot of movies where the opposite is true.
 * Another Truth in Television example: World War One. By early 1918, the German Empire had practically conquered Eastern Europe, were about to come to a permanent peace settlement that would give them most of their conquests, all the Central Powers were- while shaken- still in the fight, and the Balkans front had been effectively pacified with the fall of Romania and Serbia. The Germans and Austro-Hungarians were shifting forces for two massive simultaneous assaults to try and destroy the Western Allies by striking both in France and Italy- and would drive so far that they began minting medals in preparation for the falls of Paris and Venice, all while the Entente could not even divert needed units from Africa because of Von Lettow's actions and the Senussi rebellion. The only GOOD news for the Western Allies was that the US had now entered the war, but it was stuck with a seriously under-strength, under-equipped, undertrained, and under-experienced force on the wrong side of the Atlantic Ocean. Then came the Balkan offensive, the Turkish surrender, Diaz's reforms and "three great campaigns" to anihilate the Austro-Hungarian Empire, Belleau Wood, Amiens, the Hundred Days, and finally the October mutiny that struck at the heart of the Kasierreich.
 * More Truth in Television: The early days of the Korean War. Vastly enlarged and lavishly supplied and backed by Soviet equipment and advisors, the North Korean military pushed South of the DMZ and readily routed every Western Allied force that tried to halt or at least delay it, to the point where all that the Western Allies were pushed back to their final stronghold at Pusan and the surrounding towns, which the North Koreans rapidly besieged using superior numbers and equipment, with the Western Allied commanders there living hand-to-mouth on reinforcements from Japan, and even THEN the North Koreans came close several times to crushing the main line of defense and taking Pusan. And THEN Inchon happened, which saw the North Korean military be encircled, decimated, and forced to retreat North while much of its strength was trapped in the South and destroyed.
 * This war swung both ways, too. When the Chinese intervened, it was explicitly because the UN had reached from the DMZ all the way to the Yalu River. The very same Yalu River that serves as the Korean northern border, in fact - last stop, final destination, end of the line. The Chinese proceeded to demonstrate every guerilla and mass warfare tactic they learned in their Civil War to retake all of North Korea and reach shelling range of Seoul before their offensive was finally stopped, with the final result being...the border ending up right back where it started (plus or minus a few kilometres).
 * Another Truth in Television with the reinstatement of Admiral Yi Sun Shin. After several dramatic victories against the Japanese invasions (1592-1598), he was rewarded in 1597 with accusations of treason, arrest, torture, and demotion to foot soldier. His successor proceeded to lose the entire Korean navy in a single battle through startling incompetence, leaving only 13 ships that had withdrawn rather than fight (none of which were the famous turtle ships). After being restored to command and rallying what was left of his fleet, Admiral Yi proceeded to fight a fleet of 133 Japanese warships and over 200 support craft, routing his foe while destroying 31 enemy ships outright and crippling over 90 more, with no losses. Japanese morale was, fairly understandably, crippled by this, and the Koreans would win every naval engagement until the end of the war.
 * Happens multiple times during the 30-years war. First Bohemia revolts and throws Imperial forces out of Bohemia. The Empire Strikes Back, including beating an attempted Danish invasion, and looks on the verge of total victory. Cue Swedish intervention, that in a few years completely shatters the imperial stranglehold on northern Germany and has Swedish troops as far south as Munich. Then Gustav II Adolf dies, the Protestant alliance falls apart and the Emperor manages to drive the Swedes back to the Baltic again. And we're only in the 1630s! France enters the war and it is finally brought to a negotiated settlement, with France and Sweden the nominal victors.