Videogames, as everyone knows, are for losers—literally. In defiance of our participation-trophy culture, videogames demand that their players fail, repeatedly. Not many games can make you cry, but scores of them can make you feel frustrated, angry and impotent. The word that we gamers use for this cocktail of sensations is “fun.”

Today’s most challenging games are dubbed “masocore,” a combination of “masochist” and “hard-core.” Masocore games are nearly devoid of instructions, kill new players within seconds, and require repeated trial and error to succeed.

But it’s not all pointless vexation. These games reinforce a character-building truism: “If at first you don’t succeed, try, try again.” And they also inculcate some practical virtues. All of that losing, it turns out, teaches you how to win, and not just in videogames.

Few games illustrate this as starkly as “Dark Souls,” developed by the Japanese studio FromSoftware and published by Bandai Namco. The third entry in the series was released last month. Bandai Namco says that three million copies of “Dark Souls III” have been shipped to retailers world-wide. The series has sold 13 million copies since the release of the first “Dark Souls” in 2011.

“Dark Souls III” begins with the player alone in a nearly silent cemetery. There is no music and no dialogue, just a watery path to follow through an almost colorless landscape of browns, grays and blacks. Glowing markers on the ground explain how to attack the skeletons and other undead creatures that lurk ahead. Bloodstains show where players who came before you have died.