Japan’s Sony Corp boosted its annual profit outlook by 30 percent to a record level after a strong second-quarter, propelled by popular game titles like Marvel’s Spider-Man as well as growing demand for its online gaming services.

The results are a vindication of a strategic shift by the entertainment and electronics firm to build up more content-oriented businesses like gaming, which generate recurring revenue and are less susceptible to the earnings ups and downs seen in consumer electronics.

“Sony has become, more than most people realise, a company that generates profit through content. Until just a few years ago, the worry was always that it was going to revise down on hardware woes but now it has transformed to generate stable earnings,” said Hideki Yasuda, an analyst at Ace Securities.

Big gaming hits exclusive to Sony have offset declining sales for its mainstay PlayStation 4 console, now five years old.

Action-adventure title God of War sold 3.1 million copies in the first three days of its release in April, the fastest sales rate of any PlayStation first-party title in history. The record was renewed just five months later, when Marvel’s Spider-Man was released in September and sold 3.3 million in its first three days.

“We’ve been very blessed with some blockbuster titles,” Chief Financial Officer Hiroki Totoki said at an earnings briefing. “The lineup will remain strong in the second half of the year.”

Its PlayStation Plus subscription-based service has also seen steady growth in subscriber numbers while in the Japanese mobile gaming market, role playing game “Fate/Grand Order” published by a unit of Sony’s music division continued to deliver a strong performance.

In the second-quarter, operating income climbed 17 percent to 239.5 billion yen. Profit for its gaming division surged 65 percent.

Sony also raised its annual profit forecast for its semiconductor division, which includes imaging sensors, by 17 percent to CNY 140 billion.

Although the global smartphone market is maturing, demand for Sony’s image sensors has remained healthy as phone manufacturers introduce multiple-lens camera systems for high-end models.

Sony now aims to invest JPY 600 billion in imaging sensors over the three years through March 2021, up by 20 percent from its previous goal and accounting for half of the group’s planned capital expenditures.

Sony controls more than half of the imaging sensor market for smartphones, with customers including Apple and most other major handset makers.

Meanwhile, Sony’s own smartphone handset business was one of few weak spots in the robust earnings as the firm is now bracing for a loss of JPY 95 billion for this financial year and expects the business to return to profit only in the year from April 2020.

“We’ll scale down the business further to minimise risks,” Totoki said, but added that the company had no intention of exiting the business entirely.

Also on Tuesday, domestic gaming peer Nintendo Co said sales of Switch consoles and games pushed operating profit up 30 percent in the July-September period to reach the firm’s highest quarterly result in eight years.