With a shift in martial arts preferences, the rise of video games — more teenagers play Pokémon Go in parks here than practice a roundhouse kick — and a perception among young people that kung fu just isn’t cool, longtime martial artists worry that kung fu’s future is bleak.

“When I was growing up so many people learned kung fu, but that’s no longer the case,” said Leung Ting, 69, who has been teaching wing chun, a close-combat technique, for 50 years. “Sadly, I think Chinese martial arts are more popular overseas than in their home now.”

According to Mr. Leung’s organization, the International WingTsun Association, former apprentices have opened 4,000 branches in more than 65 countries, but only five in Hong Kong.

Few kung fu schools remain in Yau Ma Tei, a district of Kowloon that was once the center for martial arts. Nathan Road — where the young Bruce Lee learned his craft from Ip Man (often spelled Yip Man), the legendary teacher who was the subject of Wong Kar-wai’s 2013 film “The Grandmaster” — is now lined with cosmetic shops and pharmacies that cater to tourists from the mainland.

Though he lives in Yau Ma Tei, Tony Choi, a recent college graduate, has never been tempted to check out the remaining schools. Mr. Choi, 22, said that “kung fu just never came to mind.”

He added, “Kung fu is more for retired uncles and grandpas.”

When they do train in martial arts, younger people here tend to pick Thai boxing and judo.

Valerie Ng, a 20-year-old college student, says she prefers Thai boxing because it is “attractive and charming” and does not take as long to master. She noted that kung fu masters often do not have defined muscles and that some of them look, well, a little chubby.

“You can see how fierce Thai boxing is from watching professional matches,” she said. “But I rarely see such competition for kung fu, which makes me wonder whether those kung fu masters really are good at fighting or they just claim to be,” she said.

So Tak Chung, 59, remembers how different things were. When he was a boy, he and his friends would run home from school as fast as they could to watch kung fu shows on television.

“Kung fu always gave me a sense of justice and pride in being Chinese,” Mr. So said while stretching his legs for a Sunday night lesson at Kowloon Park. “It feels like if you knew kung fu, you could beat the bad guys and help the needy.”

Mr. So’s master, Mak Che Kong, 64, is less hopeful about the future. He ran one of the last studios in Kowloon in the 1980s, but soaring rents caused it to shut down, along with other family businesses that were once a fixture of Hong Kong street life, like Dit Da, or bone-setting, shops that use traditional Chinese medicine to treat sprains and fractures.

Mr. Mak, who is not related to the author of the martial arts history, has fewer than 20 students now, down from twice that number several years ago. Most students are over the age of 40.

He holds classes all over the city because “students will not come if they need to travel much.” On Tuesdays, he teaches at a pier in the city’s Central District; on Wednesdays, near a government marriage registry in Sha Tin in the New Territories; and on Sundays, at a public park in Kowloon. On Mondays and Fridays, he teaches at a kung fu school in a warehouse opened by one of his students.

Describing himself as “old school,” Mr. Mak fiercely defended kung fu traditions. “Chinese kung fu is not about fighting; it is about patience and hard work,” he said.

When he learned kung fu in the late 1960s, masters were father figures and apprentices had deep respect for kung fu. Students were willing to spend months or years perfecting just their horse-riding stance, a rest position often used for practicing punches and strengthening the legs and back.

“Today, if you ask a student to practice horse-riding stance for one lesson, he will not come again,” Mr. Mak said. “They are used to living a comfortable life.”

In English, kung fu is often used as an umbrella term for all Chinese martial arts. But in Chinese, it refers to any discipline or skill that is achieved through hard work.

Kung fu traces its history to ancient China, with hundreds of fighting styles developing over the centuries. But it soared in popularity at the beginning of the 20th century, as revolution swept the nation.

After the fall of the Qing dynasty a century ago, the Chinese Nationalist party, or the Kuomintang, used martial arts to promote national pride, setting up competitions and sending an exhibition team to the Olympics. But the government also tried to suppress wuxia, a martial arts genre of literature and film, as superstitious and potentially subversive.

When the Nationalists fell in 1949, the new Communist government in Beijing sought to control martial arts from the Chinese mainland. The Shaolin Temple, said to be the home of Asian martial arts in central China, was ransacked during the Cultural Revolution of 1966-76 and its Buddhist monks jailed.

Throughout those decades, martial artists from mainland China sought refuge in what was then the British colony of Hong Kong.

By the 1970s, kung fu fever had spread around the world. In addition to Bruce Lee’s films, the television series “Kung Fu,” starring David Carradine, became one of the most popular programs in the United States.

Though Hong Kong’s kung fu films do not draw the attention they once did, the genre has influenced a generation of directors, including Quentin Tarantino and Ang Lee, and the actor Jackie Chan and others have kept it alive as comedy.

In a twist, kung fu has enjoyed a renaissance in mainland China, where the government has standardized it and promoted it in secondary schools as a sport known as wushu to foster national pride.

As the martial arts center of gravity shifts to the mainland, some in Hong Kong have expressed hope that the government might support a revival here, too. Others are trying to carry on the tradition themselves.

Li Zhuangxin, a trim 17-year-old, has been studying the wing chun technique for more than four years. He was inspired by his grandfather, a devotee of the fighting style hung ga who gave Mr. Li his first kung fu lesson at age 8.

He hopes to open his own kung fu school one day — maybe on the mainland, where interest is higher and rents are cheaper — and has already set up a small wing chun club, with eight members, at his high school.

Few of his classmates had ever heard of wing chun before. Mr. Li, undaunted, says he wants to impart “the concentration and determination of kung fu” to his friends, who he laments are “only interested in playing with their cellphones.”