It’s a showdown: In an antique-filled room, Japanese soldiers have China’s Communist rebels held at gunpoint. You — an undercover resistance fighter named Xiao Tu — have just been knocked over in a scuffle. Beside you on the floor lies a handgun.

The scene freezes and words materialize on the screen. You have 10 seconds to make a choice that could help or hinder the Chinese resistance during the Second Sino-Japanese War.

Click “pick up the gun and aim it at the Japanese consul” and things go downhill quickly: Xiao has his shoulder dislocated with a deft counter, his forearm sliced open with a sword, and his torso pumped full of lead. Game over.

But if you choose “pick up the gun and aim it at Teacher Fang,” your friend and compatriot gets shot in the ensuing fracas. While you manage to survive, it’s at the expense of being branded a hanjian — or “traitor to the Chinese” — by the locals. But you also earn the trust of the Japanese officers and their battalion, which you’re hoping to infiltrate and plunder for intel that might be valuable to Shanghai’s underground resistance movement.

“The Invisible Guardian,” a choose-your-own-adventure indie game set during the Second Sino-Japanese War, has become hugely popular in China.

Whether to shoot a comrade is among the many gut-churning decisions that players face in “The Invisible Guardian,” a video game from Chinese indie developer New One Studio. Since its first half was released on Jan. 23, the game — or “interactive drama,” as it’s often described — has received rave reviews for its unique format, slick script, compelling voice-overs, and heart-stirring patriotic themes. Last month, the game briefly topped regional sales charts on online gaming platform Steam, and when the second half featuring four possible endings was released on March 5, the number of concurrent players peaked at 82,000.

With the explosive amount of attention ‘The Invisible Guardian’ has brought to interactive dramas, we can probably expect to see more of these games in the future. - Zhu Yunqi, game developer

The Second Sino-Japanese War from 1937 to 1945 — or the “War of Resistance Against Japanese Aggression,” as it’s commonly known in China — has inspired hundreds of Chinese-made historical dramas that have only become raunchier, more sensationalized, and more violent over time. While predictably casting Japanese soldiers as the villains, “The Invisible Guardian” represents a refreshing spin on an otherwise-stale genre by featuring a cast of humanized characters and by challenging players to resolve moral dilemmas. The result is an unexpectedly complex picture of war, where someone who appears to be a hanjian committing terrible acts of violence against his own people can eventually be revered as a national hero. The game’s huge audience also shows that patriotic entertainment in China has significant market potential, most recently harnessed by the homegrown blockbuster “Wolf Warrior 2.”

“The Invisible Guardian” follows the story of Xiao Tu, a young intellectual who joins the underground resistance against the Japanese in 1930s Shanghai by working undercover as a journalist for a pro-Japanese newspaper. The story is told through still frames and video clips with dubbed voice-overs. At key freeze-frame moments, players decide what Xiao should do or say — but one errant word can spell an untimely demise. If the story concludes early, players can rewind to an earlier chapter and rethink their life choices.

A GIF from “The Invisible Guardian” shows Xiao Tu, the game’s protagonist, in the center of the main menu.

The game’s very first decision point has already become something of an online meme: After Xiao’s professor, Fang, calls him a traitor, players must choose whether to speak up or keep silent. If they opt to defend themselves, they are deemed too loose-lipped to enter the underground resistance, and the story ends abruptly. “Oh, Xiao Tu… It seems undercover work just doesn’t suit you,” Fang laments as the game ends.

Throughout the course of the game, Xiao also develops relationships with several female characters, including a Japanese diplomat’s ingenue daughter and an old high school crush — who, in a number of plot paths, ends up stabbing Xiao for his presumed treachery. From the main menu, players can spend up to 198 yuan ($29) to buy bouquets of virtual roses for the game’s pantheon of beauties — as well as eggs to hurl at the bad guys.

Soon after the game began racking up positive reviews on Steam — which has over 30 million users in China — it was added to and promoted on WeGame, a competing gaming platform from industry giant Tencent. The price of “The Invisible Guardian” is usually around 60 yuan, though it goes on sale from time to time.

I had this deep sense of foreboding: Would I carry the mantle of ‘traitor’ for the rest of my life and be lonely until the day I died? - Wang Zili, game developer

But just like in the virtual plot, one real-life blunder nearly spelled disaster for the game’s producers. When the second part was released earlier this month, Steam customers — many of whom had anxiously waited for weeks to experience the thrilling denouement — were miffed to discover that the WeGame version had launched not only several hours earlier, but also at a lower price. The indignant gamers review-bombed “The Invisible Guardian” on Steam with nearly 4,000 thumbs-down reviews, causing the game’s rating to plummet overnight from 92 percent positive to just 56 percent. In an apology to their jilted fans, New One Studio said that the delayed Steam update had been caused by a server crash.

Wang Zili, a Shanghai-based game designer, tells Sixth Tone that the runaway success of “The Invisible Guardian” lies chiefly in its immersive decision-making and suitability for livestreaming: Viewers can enjoy both the cinematic experience and the streamers’ comical reactions when they end up dying.

For Wang, the moment of gameplay that stood out most was the decision to destroy the last scrap of evidence identifying Xiao as a member of the resistance. “At the time, I had this deep sense of foreboding: Would I carry the mantle of ‘traitor’ for the rest of my life and be lonely until the day I died?” he recalls. “How many people in the real world have sacrificed their reputations, their lives, for the sake of war? And how many ever got the respect they deserved?” Whenever he ponders this, Wang says, his eyes well with tears.

A GIF from “The Invisible Guardian” shows special agent Zhuang Xiaoman — one of the many women the hero meets — beguiling a male officer.

Zhu Yunqi, the founder of a game company in Shanghai, tells Sixth Tone that he is most impressed by the game’s painstaking attention to detail. His favorite part was deciding whether to get off a train and endanger the beautiful but deadly special agent Zhuang Xiaoman, or else remain in her company. “The decision was extremely important — it ended up influencing the plotline for the next few hours,” says Zhu. “My decision? I chose to stay with Zhuang, of course!”

Although some of the story’s twists are too abrupt for Zhu’s liking, he says the game has made him consider the enormous pressure China’s underground resistance fighters must have felt during the war.

I’m a 30-year-old macho dude who doesn’t watch many Japanese war dramas. But in that moment, I could feel the tears streaming down my face. - Zhu Yunqi, game developer

Interactive media has evolved from the choose-your-own-adventure books of the ’80s and the “visual novel” games popularized by Japanese developers the ’90s to the sleek, massively hyped productions of today, such as Netflix’s “Black Mirror: Bandersnatch” film. And with the lines between movies, books, games, and TV series becoming ever fainter, Zhu says there is yet more innovation on the horizon.

“With the explosive amount of attention ‘The Invisible Guardian’ has brought to interactive dramas, we can probably expect to see more of these games in the future,” he says.

Some fans say they have been caught off guard by their own strong reactions to the game’s immersive storyline. Zhu says when he reached the point in the plot where Xiao — after decades of pain and disgrace — is finally unmasked as a hero, it was more than he could handle.

“I’m a veteran gamer, a 30-year-old macho dude who doesn’t watch many Japanese war dramas,” Zhu says. “But in that moment, I could feel the tears streaming down my face.”

Editor: David Paulk.

(Header image: A screenshot from “The Invisible Guardian,” a prodigiously popular interactive drama set during the Second Sino-Japanese War.)