For generations of thrill-seeking New Yorkers, the city’s landscape of tall buildings and byways has been an obstacle course of adventure, a test of courage and stamina.

Buildings become soaring peaks to climb, their rooftops high-risk plateaus separated by canyons to vault with a daring leap. A skateboarder can grab the bumper of a passing vehicle and add a thrill to a prosaic ride. And who needs ocean waves when one can clamber atop a subway and surf it to the next stop, even if it is illegal?

But sometimes these exploits do not go as smoothly as the imagination would have it, ending in tragedy.

Such was the case on Thursday when Tyreek Riley, a 15-year-old playing with friends on the roof of a four-story apartment building in Crown Heights, Brooklyn, tried to leap across an eight-foot gap to the rooftop next door. He missed, and plunged to his death in a concrete alley.

The death reminded parents of the many perils of childhood in the city.

“There are a lot of temptations, a lot of ways to get in trouble in this city,” said Kellie Terry, executive director of the Point, which offers after-school programs for youth in the South Bronx. “I have two boys; I worry about them.”

The history of urban daredevilry in New York is a trail of injury and death. Yet for some, driven by the rush of possibility or perhaps the unbridled energy of youth and the need for social approval, the temptation is too great.

Image

Tyreek Riley

To certain minds, particularly young ones steeped in the exploits of movie action heroes and video game avatars, these feats may seem within reach. And so they try, their attempts mostly executed beyond the view of adults; when things go successfully, their successes are punctuated by a surge of endorphins, the laughter of celebration and sighs of relief.

In Crown Heights, playing on the roofs is not uncommon, residents said.

“It was a guy thing,” said Candice Matthews, 15, a friend of Tyreek. “It was just a place for them to just hang out.”

In 1997, a 15-year-old boy fell to his death after trying to jump from one rooftop to another across the same street from the building where Tyreek died.

Friends of Tyreek interviewed on Friday said he was active in his church, including its choir. They found it hard to believe that he would have tried to jump between the buildings and they speculated that it might have been an accident. “It just doesn’t seem like something he would do,” said Anne-Marie Pimental, 16, as she stood with friends in front of the building where Tyreek died and someone had assembled a small memorial of candles.

Clayton Figgurs, 22, a neighbor, said that when he was growing up, he preferred to play “closer to the ground.” But many students in his high school wanted to make their games more exciting, so they sought higher altitudes.

“It just always sent the wrong message to me,” he said. “Like, why risk it? It becomes a literal leap of death.”

Earl Cunningham, 72, lectured his children about the dangers of some of the other pursuits that have been practiced in New York City, including an act known as skitching in which a cyclist, skateboarder or in-line skater grabs a vehicle — commonly a bus — and gets pulled like a water skier.

Image

Anne-Marie Pimental, 16, left, is consoled on Friday as friends of Tyreek gathered at a memorial in front of 1153 President Street, where the teenager fell to his death.CreditMichael Nagle for The New York Times

“What if the bus takes a quick turn?” he asked. “How can you know?”

For years, daredevils in New York have used the subway system for their exploits, including clinging to the side of the cars (known as skylarking) or riding on top of them (surfing). Since 2013, the Metropolitan Transportation Authority has received reports of 329 skylarking or surfing episodes, with two ending in fatalities, said Kevin Ortiz, an agency spokesman.

With the proliferation of smartphones, some surfers and skylarkers have taken to recording their exploits and posting them online.

David Adu, 20, a college student at Carnegie Mellon University who was sitting in a park near Yankee Stadium on Friday, said that a couple of his high school friends once surfed a No. 4 subway and had their friends record the ride with a phone.

Mr. Adu said he watched the video but never wanted to try it himself. “It wasn’t worth my life,” he said. “I thought it was really, really stupid.”

In recent years, a newer form of urban adventuring known as parkour, which originated in France, has surged in popularity around the world, including in New York, in part fueled by videos of expert practitioners on YouTube. A kind of gymnastics, it involves jumping, vaulting, tumbling and flips using the surrounding environment like walls, mailboxes and roofs.

Some of the most dramatic videos include leaps between buildings or, in the case of the opening chase scene in the James Bond film “Casino Royale,” a dramatic chase around a high-rise construction site, including a scramble on top of two towering construction cranes.

But parkour practitioners point out that while the experts may make the sport appear simple and fluid, it requires intense and disciplined training to do it safely and well.

Image

Children leaping from one rooftop to the next in Crown Heights, Brooklyn, is not uncommon, according to residents.CreditMichael Appleton for The New York Times

“Everything we talk about is safety,” said Mark Toorock, founder of American Parkour, an academy based in Washington. Told about Mr. Riley’s death, Mr. Toorock sounded despondent. “It’s terrible for me to hear that a kid got hurt,” he said, sighing. “It’s hard to be a kid, to stand out, to be unique.”

Elijah Ortega, 14, a ninth grader in the Bronx, said he tried parkour last year after seeing his brother do it, jumping off bleachers and turning somersaults and back flips at parks in the Bronx.

“It makes you feel your environment,” he said. “It feels good to associate with nature.”

Elijah said he quit because of the dangers and now sticks to basketball and baseball.

For Ms. Terry of the Point, Tyreek’s death this week highlights a need for more after-school programs to better engage the city’s youth.

“I’m a kid who grew up in the Bronx, and I know very well that the most tempting time is the time you’re out of school,” she said. She also said that she saw in Tyreek’s attempted leap personality traits that should have been better cultivated.

“He was a go-getter, a daredevil, he was ambitious!” she exclaimed. “Imagine if he had been channeled!”

She paused. “Such a missed opportunity,” she said.

Correction:

An article on Saturday about the dangerous appeal of New York City’s rooftops and moving subway cars to young daredevils misstated the given name of the founder of American Parkour, an academy based in Washington, D.C., that teaches a form of urban adventuring. He is Mark Toorock, not Mike. The article also misspelled part of the title of a James Bond film. It is “Casino Royale,” not “Casino Royal.”

Reporting was contributed by Al Baker, Winnie Hu, Nate Schweber and Rebecca White, and research by Jack Begg.

A version of this article appears in print on , on Page A16 of the New York edition with the headline: On Subway Trains and Rooftops, City Can Be a Perilous Playground. Order Reprints | Today’s Paper | Subscribe