The Byzantine Empire
Michael VIII Paleologus (1259-1282)
The former Despot of Nicaea spent most of his reign trying to keep his head above water. He had the Mongols to the east of him, Bulgars to the north, the Mamluks under Baibars and Achaea under the Villhardouins to the south, and to the west were the Latin Christians who were determined to "win back" Constantinople. Michael had three things going for him. First, he had the loyalty of the Greeks, who were deeply grateful for the restoration of the Greek Orthodox religion. Second, he had money. Third, he had the diplomatic skill to spend that money effectively.
Early in his reign he arranged peaceful agreements with the Mongols and with the Mamluks. He always had to be wary on those fronts but at least he didn't have to fight wars there. The Achaeans, a remnant of the Latin Empire, were to prove intractable; even though Michael won military victories against them, he couldn't pry them out and they were perennially his enemies. The Bulgars, too, proved to be a constant danger, although Michael had more success in managing them, and even arranged a marriage alliance at one point.
The Latins were the worst and specifically the Angevins. Charles of Anjou, younger brother to King Louis IX of France, had managed to win the Kingdom of Naples away from the Hohenstaufen in the wake of the death of Frederick II and had inherited the old Norman ambitions toward Constantinople. This gained even more impetus when Charles could pose as the champion of the papacy to regain the Latin Empire. Charles was a skilled commander and potentially had the backing of both the pope and his big brother, not to mention eager allies in Achaea and elsewhere.
Charles had occasional distractions, such as Manfred, but whenever he could he was working on his pet project of a crusade against Constantinople. Michael, of course, did everything he could to derail this. One of his chief tools was talks with the pope concerning a re-unification of the two churches. This was a powerful tool and managed to stave off invasion for a number of years. If you read about the Council of Lyon in 1274 you should keep in mind this political background.
Once it was clear that even a formal reunion wasn't enough, Michael turned to manipulation. He encouraged Peter of Aragon's ambitions and financed the conspirators who were behind the Sicilian Vespers in 1282. This rebellion in Sicily came on the very eve of Charles of Anjou's great invasion of Byzantium, even as his fleet was assembling in Messina. The revolt completely scuttled that project, especially once Peter of Aragon had landed with an invasion force at the other end of the island. Michael lived barely long enough to enjoy this victory, but never again would the West threaten Constantinople in any serious way.
Andronikos II Paleologus
Michael's son faced many of the same problems as his father, but in reverse. Andronikos managed to come to arrangements with the Holy Roman Empire and with Montferrat and with Serbia, but instead had to face the rise of the Ottoman Turks and the devastations of the mercenary Catalan Company.
Worse, Andronikos had to deal with the loss of one of the Byzantine Empire's most crucial assets: money. The value of Byzantine money plummeted during his reign, forcing the Emperor to drastic measures. This included the dismantling of the Byzantine fleet, which eventually led to a dependence on Italian fleets.
Toward the end of his reign, things fell apart in the north, with a Bulgar rebellion in 1305. This went on for years and was a serious drain on the treasury. It got so bad that he was forced to abdicate in 1328 in favor of his son, Andronikos III.
Andronikos III Paleologus (1328-1341)
Andronikos III has a mixed record, but it's dominated by foreign affairs. In Asia Minor he lost, for the Ottomans were now very much on the march. Nicaea fell in 1331 and Nicomedia in 1337, leaving Byzantium with almost no land holdings in Asia Minor. The Ottomans, of course, are the ones who would eventually conquer the Empire in 1453.
To the north Andronikos also lost, to a resurgent Serbia under Stefan IV Duros, expanding into Macedonia. There was victory to the south, though, in Greece. Andronikos won both Thessaly and Epirus in the 1330s, effectively insulating Constantinople from Achaea. So, even though the Empire had lost Asia Minor—a very significant loss—it had won enough in Greece and the Balkans to form a viable state.
The Rest of the Story
The next century is a sad and convoluted story, the theme of which is loss and disarray. The Ottomans expanded when they could and meddled often. They captured cities all around Constantinople, and the Empire was never again as large as it was under Andronikos III, and that was small enough. Once close enough, Ottoman sultans tried for the City itself, coming very close under Bayezid I, who actually besieged Constantinople for five years in the 1390s. The Empire was saved by Tamerlane, who defeated Bayezid in 1402. These Turkish advances, along with appeals from Byzantium to the West, are what were behind the crusades in 1391 (Nicopolis) and 1444 (Varna) that ended so disastrously.
About the only thing that staved off final defeat in the 1400s was civil war among the Ottomans. When a strong leader again emerged, they renewed their advance. This happened, for example, under Murad II, who again attacked Constantinople in 1422, without success.
John VIII Paleologus resorted to the tactic used by his predecessor and agreed to a union of the two churches. This happened at the Council of Florence in 1439, which famously brought Greek scholars into contact with Italian humanists. John was succeeded by his kid brother, Constantine XI.
It's fitting that the last Byzantine Emperor should be named Constantine. He died in the defense of the city, which fell to Mehmed II in 1453. It's a very exciting story and if you want to know more I recommend reading The Fall of Constantinople by Sir Steven Runciman. But for our purposes we shall stop here.