“If I’m on the bus, I’ll play it then, or if I need a break in the office,” Ingegneri said. “Sometimes I just want to play a game and do something fun instead of sitting there and reading patents.”

The swift migration of gamers such as Ingegneri from costly consoles to smartphones and tablets, where games are often free or 99 cents, is causing a tectonic shift in the video game industry that has hit a burgeoning sector of the Massachusetts economy especially hard. Two Massachusetts game makers abruptly closed in October, sales of console-based games are plummeting, and game makers are struggling to resize games designed for large screens so they will perform as well on a smaller window.

“Every gaming entity is looking at mobile and saying, ‘This is where the growth is, and this is where we have to go to ­engage with a much larger ­audience, so how do we solve this problem?’ ” said Hank Howie, vice president of business development at Disruptor Beam Inc., a Boston studio currently developing a game based on the HBO series “Game of Thrones.”

ImaginEngine, a maker of games for children and families with 30 employees in Framingham, closed due to what its parent company, Foundation 9 ­Entertainment of Irvine., Calif., called challenging market conditions.

Then, Zynga Inc., the San Francisco company that ­pioneered social gaming on ­Facebook with FarmVille, shut its Cambridge office and laid off 45 employees as part of a broad cost-cutting plan that included cutting staff in Austin, Texas, and offices overseas. It also phased out 13 games.

‘Mobile has actually brought more players and demographics into the marketplace.’

While Zynga and its Cambridge employees were actively developing mobile-based games, FarmVille and its other moneymaking products were designed to be played on Facebook’s Web platform. While its games are free, the company earns money when players buy virtual goods during the game and through advertising.

But with 60 percent of Facebook’s 1 billion users logging on from mobile devices, traffic on FarmVille and other Zynga games is way down. The company’s stock has lost 77 percent of its value since its initial public offering last December.

“The people on mobile ­aren’t playing FarmVille, so Zynga is losing them,” said ­Michael Pachter, a game industry analyst at Wedbush Securities in Los Angeles. “Mobile is cannibalizing the casual gamer.”

Mobile game play is soaring. Games are the number one category of sales at Apple Inc.’s App Store; tablet users spend 67 percent of their time on the devices playing games, according to the mobile analytics firm Flurry, while smartphone users dedicate 39 percent of their time to games.

“In the past, if you wanted to play video games, you were a hard-core gamer. You had to go out and invest in the hardware,” said Tuong Nguyen, a Gartner mobile gaming analyst. “Now, we all have it.”

Despite the recent setbacks, the video game industry in Massachusetts is growing fast. The sector directly ­employs at least 2,041 people at 112 companies, according to a September survey by Massachusetts Digital Games Institute (MassDiGI), a state-­sponsored game development center at Becker College in Worcester.

Fifty-one percent of respondents said they are ­developing some kind of mobile games.

In the best of times, game making is a high-risk and erratic business subject to popular whim and abrupt advances in technology.

Spectacular failures, such as the collapse of Curt Schilling’s 38 Studios, are not uncommon, and even ­successful companies go through periodic down times.

In recent weeks, Harmonix ­Music Systems Inc., creator of Rock Band, and Turbine Inc., the area’s biggest game company and maker of the Dungeons & Dragons Online, have ­announced layoffs.

Some traditional console games, which offer players much richer and deeper experiences than a ­mobile app, continue to sell well, earning big game companies millions in revenues. When Call of Duty: Modern Warfare 3, one of the most popular console games, first went on sale last November, it sold 6.5 million units in one day in North America and Britain, bringing in more than $400 million in sales.

Consumer spending on console game software could be as high as $25.5 billion this year, while sales of mobile games are expected to reach $9.7 billion, according to Gartner.

But even with big hits such as Modern Warfare, the console side of the business is starting to slump. In August, retail sales of game systems and software fell 20 percent, compared with a year earlier, according to the market research firm NPD Group Inc.

And sales of the consoles themselves — from Microsoft Corp., Sony Corp., and Nintendo — are down. While some of the decline can be ­attributed to upcoming releases of a new generation of consoles, mobile is playing a big part.

Aside from the proliferation of smartphones, which about half of all Americans own, many game companies are struggling to adjust to the new mobile business model. For years they have spent millions to develop games that sell for as much as $60. Now, they are competing against free downloads.

Another challenge is how big game studios find inroads into the app marketplace with compelling games that compete with the likes of the wildly popular mobile app Angry Birds and make money.

The industry is moving so fast to adapt to the changing landscape that even the recently jobless are not idle for long.

As word of the layoffs at Zynga’s Cambridge office began circulating last week, competitors immediately wooed those ­employees with job postings on Twitter.

And some of the ­ImaginEngine employees laid off in mid-October will be relocated to other offices by the parent company, Foundation 9.

“All this disruption in the marketplace has created a ­tremendous amount of opportunity,” said Timothy Loew, the executive director of MassDiGI.­ “Mobile has actually brought more players and more demographics into the marketplace.”

Indeed, many of the area’s newest game makers are skipping the console side of the business entirely and focusing solely on games for the mobile market.

“We have all our eggs in this basket, and we think it’s the right basket at the right time,” said Dave Bisceglia, chief executive officer of The Tap Lab, a Cambridge developer that will release its new mobile game, ­Tiny Tycoons, later this year.

“I hope there’s an even bigger shift,” he said. “It’s a good time for a company like ours.”