Greta Goplen stood in position with a cane at the ready, like a ninja warding off invisible foes.

As an instructor yelled out directions to the class — "left, left, jab, jab, nose! right, right, jab, jab, nose!" — the 59-year-old raised her walking stick and nimbly thrust it out kung-fu style, swinging it to either side before jabbing it backward.

Half an hour later, the class ended. A dozen women quickly sat down to rest artificial hips and arthritic knees.

"But I'm not done killing yet," Goplen said, bashing an imaginary mugger on the ground. "We got 'em! Yeah! Yahoo!"

Exercise for baby boomers has gone trendy.

As the oldest baby boomers turn 67 this year, the same generation that sent crib sales zooming in the 1950s and '60s and snapped up cars in the 1980s is now changing the fitness market in the same way it influenced music, fashion and politics.

Gone are the days when seniors could only stroll around the park or do low-impact aerobics. Now, a slew of new gyms and exercise programs are catering exclusively to the gray-haired set.

At Nifty After Fifty, a gym chain in Garden Grove, members 50 and older take classes such as Cane Fu, a self-defense course that combines martial arts and a walking stick. YMCA has rolled out a 50 Moving Forward program at select locations that teaches seniors healthy eating habits and holds social events. Even Jane Fonda, the queen of at-home exercises, has a line of fitness videos for baby boomers.

"Baby boomers have changed every market they have passed through, starting with baby food and diapers through education and right up to the automotive industry," said Lori Bitter, president of consulting firm the Business of Aging in Alameda. "Now it's fitness."

Already, people ages 55 and older are one of the fastest growing segments of gym membership, according to research firm IBISWorld, and the boomer generation will help push the fitness category to nearly $30 billion by 2018.

But unlike regular gyms, which make profits from couch potatoes who sign up as a New Year's resolution and then never show, many of these fitness centers rely on word of mouth and therefore work hard at getting members to attend.

Part of the difficulty is persuading baby boomers to start exercising at all. Studies show boomers are the first generation to enter their elderly years in worse health than their parents were at the same age. Boomers are more likely to suffer from disability and disease as they age, said Patricia Ryan, vice president of education at the International Council on Active Aging.

"It's an inactive lifestyle, lots of fast food and not enough exercise," Ryan said. "People used to get up and walk to the bank. Now we all drive."

But medical advances now enable people to live longer. Those age 65 today can expect to live until they are 84.1, compared with 78.9 in 1950, according to the Centers for Disease Control and Prevention. Even moderate exercise can keep people healthier as they age, experts say, potentially saving the country billions of dollars in healthcare expenses such as emergency room visits and nursing home stays.

Boomers are spurring travel agencies to offer hiking and kayaking trips just for seniors, which combine physical activity with luxuries such as gourmet food and comfortable tents. More active seniors even sparked the revival of "pickleball," a slower-moving racket sport invented in the 1960s that borrows from badminton, tennis and pingpong.

Nifty After Fifty is geared toward making exercise fun for members.

Group classes include Volley Ball-oon, a game in which everyone sits in chairs and bats around a balloon. Its Wii bowling tournaments attract hundreds of members. Computers in each gym offer "brain aerobics" classes that aim to keep seniors mentally fit. And for the independent-minded, a driving simulator similar to arcade racing games trains members to stay alert during heavy rain or blizzards.

Dr. Sheldon Zinberg founded Nifty in 2006 after customizing fitness regimens for seniors at CareMore Medical Group, a healthcare company specializing in the elderly that he founded years earlier. It took some trial and error before Nifty got the formula right, he said, pointing out that most locations have no treadmills. "People kept falling off," he noted.

"Physical activity is the single best medication you can give to the boomer or senior population," he said. "If you could bottle all the benefits in a pill, it would be a bestseller by far."

SilverSneakers, a fitness program offered by wellness firm Healthways Inc., launched its first classes geared for baby boomers this year.