A half-decade ago, more retirees were interested in buying a home in an age-restricted senior community. But that was before the recession hit.

Since the economic downturn, real estate specialists say they’ve detected a decline in interest in “active-adult communities” where recreational activities are packaged into a lifestyle that caters to older adults.

“There’s a lot less interest in one-size-fits-all living. More people want an individualized lifestyle and multigenerational living,” says Art Godi, a real estate broker and former president of the National Association of Realtors (www.realtor.org).

Godi says many retirees are still drawn to the amenities offered in classic retirement communities, which are typically located in the sun-drenched areas of the map. But they’re even more attracted to a lifestyle that allows them easy access to offspring.

“Grandchildren are an increasingly important factor in home-buying. The more insecure our society becomes, the more families want to stick together,” says Godi, whose family-owned real estate firm has sold homes for decades.

“Grandparents provide a great emotional support system that’s especially important if the parents have stressful jobs and work long hours,” Godi says.

Are you an older homebuyer seeking a place that will allow you more interaction with your grandkids? If so, these pointers could prove helpful:

-- Realize the advantages of buying a home near your children’s place.

Allan Zullo, co-author of “A Boomer’s Guide to Grandparenting,” says he and his wife, who live in North Carolina, relish seeing their four grandchildren, ages 3 to 16. The problem is that two live in San Francisco and another two in Tallahassee.

To see more of the Florida grandchildren, he and his wife recently built a small cottage on the property where the kids live, in which they reside three months out of the year — and they couldn’t be happier.

Living very near your grandkids can work for you if you have close-knit family relationships, Zullo says.

“It takes the right family dynamics to make this work,” Zullo says.

-- Discuss the implications of living near your children before you move.

Living near grandchildren can be enriching for all involved. Most grandparents find it gratifying, and most working parents appreciate the nearby support system.

But Zullo says you shouldn’t move near your grown children without first discussing the expectations of everyone involved.

“You need to talk it out and define boundaries before making a move,” he says.

According to U.S. Census Bureau data, an increasing number of people are now actively involved in raising their grandkids. But is it OK with your kids that you take over major childcare responsibilities? And are you willing to do so?

No matter how much they love their grandchildren, Zullo cautions retirees against centering their lives solely on family.

“It’s vitally important you also have your own friends and activities,” he says.

-- Seek to buy in a child-friendly neighborhood.

Mary Biathrow, a veteran real estate broker and grandmother of four, recommends that retirees planning to buy a property near their grandchildren look for a family-oriented neighborhood.

“There isn’t much for kids to do in a retirement community. You’re better off living in a neighborhood where there are other young kids to play with,” she says.

-- Think of a home in a resort area as an alternative to moving near your kids.

Leo Berard, charter president of the National Association of Exclusive Buyer Agents (www.naeba.org), has 13 grandchildren scattered around North America. He and his wife have decided to keep their large family house in Massachusetts. But not long ago they also bought a spacious condo in Naples, Fla.

When they acquired the Florida place, they hoped it would serve as a magnet to encourage their kids to visit from as far away as California. And their hopes have been realized.

“There’s a tremendous amount for the kids to do here in Florida — including fishing and boating, which they love,” he says.

-- Don’t overshoot your budget to buy a home to attract your grandkids.

It’s fine if you can afford to buy a vacation property that encourages family visits. But overextending yourself at the expense of your retirement security is a mistake, says Candace Carnegie, a seasoned real estate broker.

Carnegie, who lives close enough to her grandchildren to “pop in for dinner,” very much enjoys time spent with the extended family. But she cautions those with limited retirement assets against taking so large a mortgage that their financial security is threatened.

“Even retired people can still find lenders who will let them borrow more than they should. It’s great to live in a place that lets you see your grandchildren often. But you don’t want to be house poor and lack money to pursue your other strong interests, like travel,” she says.

Ellen James Martin, a former real estate editor at The Baltimore Sun, gives advice for anyone buying, selling or financing a home.