In a war of tanks, there’s World of Tanks.

Somewhere along the several hundred miles of front line in Ukraine, a Ukrainian soldier is probably playing World of Tanks — the video game. A war hero recently admitted to gaming although he had to open a new account when he lost his login information. During training in June, border guards outside Bakhmut, where one of the war’s bloodiest battles was fought, were found playing. And a tank crew seen grabbing a quick lunch last year had slapped a World of Tanks logo on the hull of its T-80 main battle tank.

“I’m playing from time to time, when I have a bit of free time,” said Lt. Nazar Vernyhora, who last year gained public attention for his command of a real tank that destroyed armored personnel carriers and damaged a Russian tank during a battle outside of Kyiv.

Starlink satellite internet is prevalent on Ukraine’s battlefields, and soldiers have smartphones. The draw of mobile video games is obvious. War is often marked by long stretches of boredom, so why turn to the enduring favorite pastime of soldiers — throwing small rocks at bigger rocks — when there’s World of Tanks?

The urge to play a violent video game in the midst of the most brutal land war in Europe since World War II may seem baffling, but it represents an important way soldiers cope with the bloodshed around them: disassociation.

But the multiplayer game — with its two teams of tanks and other killing machines destroying each other on a virtual battlefield — is an eerie echo of the actual war unfolding around its uniformed player base. Ukrainian tanks, and other armored vehicles, can sometimes find themselves locked in bloody duels that their crews are also experiencing virtually.

There are two entries in the World of Tanks universe available to players in Ukraine: World of Tanks and World of Tanks Blitz. Both require an internet connection, but the latter is available to play on mobile devices. It is hard to state precisely how popular the game is on the Ukrainian battlefield, and broadly across Ukraine, given the different platforms for the games: PCs, Xbox, PlayStation, Nintendo and Mac computers.

Still, in visits across Ukraine’s front lines by The New York Times, the game was often seen and talked about. Discussions with Ukrainian soldiers about their World of Tanks hobby yielded various explanations for the game’s draw.

The soldiers in one drone unit, though, outside the embattled eastern town of Siversk, Ukraine, recoiled at the idea of playing such a violent game given the circumstances.

“Why would we play World of Tanks when it’s right here?” one soldier asked, referring to the real war. Instead they play FIFA, another soldier added, a nod to a popular soccer video game.

Many Ukrainian soldiers seem to feel differently. During a recent visit to his frontline position, Anton, a commander of a Ukrainian tank company entrenched outside the embattled city of Avdiivka, showed footage of a recent battle on his computer. His favorite clip was of a Russian tank getting destroyed, its hull bursting into flames and the turret ejecting into the air.

When he minimized the video, there on the corner of his screen was the program icon for World of Tanks.

“I love World of Tanks,” he said with a shrug.

Sgt. Silver, a Ukrainian soldier in an artillery unit near the eastern town of Siversk who, like most, goes by his call sign or first name for safety reasons, knew of the game’s popularity among the ranks. But he figured it was a pastime that started for many before the war and had simply carried over.

“On the other hand, it is kind of an addiction,” he said, as he walked back from a yard where a Russian kamikaze drone had nearly destroyed one of the brigade’s rocket artillery trucks some weeks earlier.

Wargaming Group, the company that created World of Tanks, has half of its servers supporting its Russian region, with the rest spread in the United States, Europe, Australia and China. The top two highest-earning World of Tanks players in e-sports competition from 2011 to 2021 were Kirill Ponomarev, a Russian, and Dmytro Frishman, a Ukrainian. The two men were once on the same World of Tanks e-sports team.

World of Tanks Blitz saw a peak in users in mid-December 2021, with more than 50,000 people playing concurrently, according to SteamDB, a publicly available service that tracks video game users using the Steam application to play. A week after Russia invaded Ukraine in February 2022, that number dropped to around 31,000.

Mr. Frishman, 27, who now runs a game club in Kharkiv, Ukraine, said the game most likely dropped in popularity because Wargaming Group was originally from Belarus and therefore was pro-Russian. After the invasion last year, Wargaming Group, located in Cyprus since 2011, announced that it would shutter its studio in Minsk, Belarus, and transfer operations there and in Russia to a separate company.

Part of Mr. Frishman’s customer base at the game club quickly became wounded soldiers recovering away from the front, playing violent games like PUBG, Counter-Strike and, of course, World of Tanks.

“It was really hard for me to understand why they were playing these games,” Mr. Frishman said Wednesday. “But then I realized they were relaxing, they were playing with their friends.”

Roughly 120 miles from the club, outside the eastern city of Bakhmut, the crinkly sound of digital explosions and tank treads emanated from a tree line. There, crouched among the undergrowth, was Honey, a border guard turned infantry soldier, and his comrade. They were both playing World of Tanks on their phones. Their unit had just finished training after coming off the front line.

When approached, they acted like two raccoons caught in a trash can, putting down their phones sheepishly. Yes, some troops play World of Tanks near the front too, they said.

Asked about the similarities between war and World of Tanks, Honey said both relied on teamwork.

Elsewhere on the eastern front, Lieutenant Vernyhora, who was 21 when his tank was captured on video last year fighting a Russian foe that far outnumbered him, echoed Honey’s view.

“You are kind of learning to work in a team and developing tactics in the game,” he said.

“I’m trying to use the same maneuvers as in real life,” Lieutenant Vernyhora added, sitting on top of one of his unit’s T-72 tanks, hidden under a thicket of dense trees.

His World of Tanks habit was thwarted when he lost his login information and, with it, access to his account. He also lost all the tanks he had unlocked in the game. Running into a well-armed Russian platoon had been pretty bad, but his setback in the game, he joked, “was a disaster.”

Much of World of Tanks’s strategy relies on piloting a tank around battlefields that look handpicked out of World War II and other conflicts. Players rely on how fast, strong and well-armed their tanks are compared with other players’, and, as in actual tank battles, can use terrain to mask and protect their armored sprites.

But even devotees of the game like Honey will point out that in real life — especially in the shell-raked trenches of Ukraine’s eastern front — they have a different strategy: survival.

The closer you get to the shelling, Honey said, “even if there is internet, you don’t really want to play.”

Natalia Yermak, Dimitry Yatsenko and Dzvinka Pinchuk contributed reporting from the front line.