As an Army officer, Maj. Stephen D. Carey has served tours of duty in Iraq and Afghanistan. In his spare time, he fights a different kind of battle, one that rages in the apocalyptic 41st millennium. The distant future would be a terrifying realm for a mere mortal, what with all the Necrons, Tyranids, and Tau on the loose. To survive the war-torn galaxy, Carey enlists the help of marauding, green-skinned Orks. He also presides over an Imperial Guard army, because some days, defending mankind is more fun than trying to destroy it.

This is the intricate, intense world of Warhammer 40,000, a tabletop war game played with hand-painted, miniature figurines. Warhammer 40,000, which its devotees call 40K, first hit shelves in 1987 and is the product of Games Workshop, a British corporation whose influence extends far beyond the United Kingdom. Around 70 percent of the company’s sales come from abroad, and the retailer has 86 official stores in North America alone.

What kind of people stage make-believe wars with armloads of Space Marines? A lot of the time, it’s real Marines. Games Workshop’s U.S.-based outreach manager estimates that 20 to 25 percent of Games Workshop’s American customers are active members of the military. If you include veterans, she says, that number jumps to about 40 percent. “The bottom line is, there are nerds everywhere,” Carey explains. “I’ve been an infantryman for 20 years. I’m no stranger to fighting. But I’m a total nerd.”

Warhammer 40,000’s geeky shell hides a militaristic soul. I spent a recent afternoon watching 40K at the Northern Virginia home of Mike Brandt, an attorney who runs one of the country’s biggest annual Warhammer conventions, the NOVA Open. The atmosphere at Brandt’s place was like an Ork-themed poker night—guys smoked cigars, drank beer, and instead of talking trash, gossiped about 40K’s new edition. The fast-paced, one-on-one matchups were contested on 6-by-4-foot pieces of wood. Each player served as his own general, controlling model soldiers, tanks, and futuristic aircraft with dice rolls. (Since there are no defined spaces, tape measures—like this skull-shaped one—were used to determine how far pieces moved.)

The game is essentially Risk but with Dark Eldar and Chaos Daemons. “It’s like playing chess with toy soldiers and using a textbook for rules,” says former Marine Samuel Corum, a combat photographer who served two tours of duty in Iraq.

Corum isn’t exaggerating. The 40K Rulebook is 452 pages long. Each set of characters has a 100-page manual that explains its back story, abilities, and point values. The 40K wiki describes the Orks as being “dominated by the WAAAGH!, a gestalt psychic field they generate that affects the Ork psyche, which allows Orks to instinctively recognize who is ‘bigga’, and therefore who is in charge, since might makes right in Ork society.”

In 40K, though, mythology is less important than victory. “My whole goal is to kill you,” explains Charles Pope, a former Army sergeant. “I don’t want prisoners.” And when you’re playing with another service member, that kill-or-be-killed attitude is A-OK. “It’s a lot more fun to play games with servicemen because they have an ingrained sense of rules; they don’t complain about them,” says Neil Gilstrap, who co-hosts the 40K-centric podcast The 11th Company. They also enjoy flexing their strategic muscles. “How the mechanics of the game work, how to put together the best army, what units function the best,” Carey says, ticking off military skills that translate to 40K. “[The game] satisfies the inner tactician in a lot of soldiers.”

40K may not be a true simulation of armed conflict, but it’s part of a centuries-long tradition of war games. After World War II, U.S. Navy Adm. Chester W. Nimitz credited gaming for helping the Allies prepare. “The war with Japan had been re-enacted in the game rooms here by so many people and in so many different ways,” he said, “that nothing that happened during the war was a surprise—absolutely nothing except the kamikaze tactics towards the end of the war; we had not visualized those.”

Elements of gaming are still present in modern warfare. In Iraq and Afghanistan, Carey served as an operations officer (an S3, to be exact) for an infantry battalion. His responsibilities included developing battle plans from the tactical operations center. “In the movies when you see the room/tent with all the maps, projection screens, and radios with guys moving icons around on a map board—that’s the TOC,” he said in an email. “In a way, running a TOC is as close to hobby war gaming as it gets in the military.”

The hobby side of war gaming didn’t really begin until 1913, with H.G. Wells’ publication of Little Wars, a plan for “a game for boys from 12 years of age to 150 and for that more intelligent sort of girl who likes boys’ games and books.” In it, the English author lays out rules for a strategic version of toy soldiers—the number of moves required “to pass a fordable river,” “to embark into boats,” and “to unlimber guns.” Over the course of the last century, more tabletop war games sprouted. In January 1965, Sports Illustrated devoted a lengthy feature to men who waged war with historically accurate miniature troops. “We think the war game is superior to chess,” one of the dedicated hobbyists explained. “After all, chess is played on a board that never varies, with the same amount of men every time. But the variations on war games are limited only by your imagination.”

The iconic Dungeons & Dragons entered the fray in 1974 and shifted traditional war games in the direction of role playing. D&D players choose characters and go on adventures together. Games are open-ended and participants gain experience points that carry over to future sessions. Warhammer Fantasy Battle, which came out in 1983, borrowed from D&D’s Tolkien-esque imagery but focused more on one-off, army-against-army clashes. Warhammer 40,000 built on its still-popular predecessor’s aggressiveness but added a darker futuristic setting, advanced weaponry, and more violence. Consider Games Workshop’s description of “the tabletop battlegame of the far future”:

The 41st Millennium is a savage future age where Mankind must battle for survival in a galaxy riven by bloodshed and destruction. Humanity teeters on the brink of extinction, assailed on all sides by aliens, traitors and Daemons, and only the superhuman strength of the Space Marines and the uncountable numbers of the Imperial Guard stand between the slavering alien hordes and total annihilation.

For service members, the game’s appeal goes beyond basic competition. Corum spent a chunk of the last decade living in a meticulously regimented world. Everything, including his uniform and hairline, was heavily scrutinized. “There’s an inherent attention to detail that a lot of good soldiers and Marines have,” he says. That also applies to 40K. The majority of playable pieces are 1-inch models that must be painstakingly assembled and hand-painted. (The figurines can cost upward of $20 a pop and are sometimes called “plastic crack.”) A particularly dedicated artist can spend 30 hours working on a single figurine, making sure to dab a perfectly round black dot in the middle of a white eyeball.

“I’m not fast at [painting],” Army Sgt. Steffan McBee, who’s currently deployed in Afghanistan, said in an email, “But it’s calming”—and more intellectually stimulating than what he could be doing. “Everyone knows guys need stress relief. And as I tell my wife, [Warhammer] keeps me off the streets and out of the bars.”

McBee doesn’t often struggle to find a game—his 600-plus person unit includes 13 regular 40K players. He’s also managed to come up with a system to play without miniatures, on grid paper, in case he’s stuck without his figurines. To him, the game’s appeal is pretty simple. “It’s partly that it’s a battle that we actually have control over,” McBee said. “Part of it is imagining the battle as it plays out as the dice decide the fate of your models. I have a very vivid imagination.”