>>15240100
>Mega Man X and Zero series.
All of MM has a lot of this, but to varying degrees, depending on the series. Play order doesn't matter, since the story is told out of order, and many of the games from different series were released in tandem. Play whichever looks like the most fun to you. The Zero series is probably tonally closest to what you're looking for, since it starts hopeless and gets progressively more hopeful. The X series also fits, but takes a serious dip into hopelessness in X4 and X5. Stop after X5 unless you really want more. The Legends series somewhat fits, but not as well. While thematically serious, it usually has a cute, almost comical tone until the end stretch of each game, which gets grim. If you're only going to play one of each, play X1 or X4, Z2 or Z3, and L2. The other MM series almost fit, but they often intentionally don't properly convey the gravity of the shit going down, because it wouldn't be in line with their desired tone.
>Ace Combat 4, 5, and Zero.
AC has this in spades. It's cheesy in a way somewhere between 90s anime and MGS1. Play in that order, if you're going to play all of them. If you're only going to play one, you can pick any.