And for them, as much as for himself, he wanted to rule the game. Playing Clash obsessively — that is, spending many hours a day attacking one opponent after the next, as the most serious players do — is a little like trying to climb a glacier. You can rise higher and higher with every new cache of trophies you win from sacking another village, but one slip, a single moment of distraction, can erase it all. This is what happens to most players who reach Mr. Yao’s exalted level for even a day. They hit the wrong button in the heat of battle or forget to load up on magic spells before invading a village — and, just like that, they forfeit the day’s haul and tumble back into the ranks of the merely good.

Mr. Yao, on the other hand, was almost maniacally focused. If he made a mistake against an opponent that cost him hard-won trophies, he’d respond by playing the game for 48 hours straight over the course of a weekend, fueled by self-loathing and Red Bull, until he won the trophies back.

“What I like to tell people is that there are two keys to the game — patience and focus,” Mr. Yao told me. But he allowed that someone else might use another word, like maybe compulsion or addiction.

In January, he reached No. 1 in the global rankings. A few weeks later, he blew past 4,000 trophies, setting a new standard for Clashers everywhere. By spring, Mr. Yao was finding out what it was to become an Internet celebrity. His mother read about him on Chinese-language message boards. Haters sprouted up to accuse him, speciously, of cheating or of buying his way to the top. When Mr. Yao tweeted about his trip to a Napa winery, some fans came out to meet him in person.

“I never in my wildest dreams anticipated any of this notoriety,” Mr. Yao told me. “The thing I enjoyed most was the effect that I had on kids. When a kid would say, ‘Oh, you just made my day,’ and all I did was come into your clan and say ‘hi’? Wow. To me that was priceless, you know?”

‘My Real Life Was the Game’

There was a price, however, for being the world’s premier Clasher. Part of it was measurable. To stay on top, Mr. Yao was spending at least $250 a week on the gems. By the time he had dominated the leader board for three months, he told me, he had sunk as much as $3,000 into Clash and was running out of money. He feared that he couldn’t keep up with wealthier rivals and threatened to quit.

A clanmate in Turkey, the 38-year-old son of a business magnate who plays under the name Kemal, took pity on Mr. Yao and offered to become his sponsor, buying his gems. In return, Mr. Yao kept Kemal’s account active for him when Kemal was traveling and couldn’t play. But while that stopped Mr. Yao’s financial slide, it could not arrest a deeper erosion that his clanmates couldn’t see, the gradual way in which the game was swallowing Mr. Yao’s nonvirtual existence.