Cost has actually stagnated for almost two decades. Part of the cost has increased, but other parts have dramatically decreased. For example digital distribution has signigicantly lowered distribution costs, likewise a lot of engines, tools and other necessities have gone down in cost, especially if they can use off-the-shelf ones instead of starting from scratch. Meanwhile revenue has increased dramatically. There's a bigger market, more customers, and more monetization. Meaning margins have ballooned over the last couple of decades. It's rare that even a poorly recieved triple A isn't profitable, shares plummet in price not because the companies are taking losses on any of their products, but because the profits are lower than anticipated.