LOS ANGELES — The engineers at Los Angeles startup Zefr needed to unwind after completing a months-long project.

That’s when they entered the “War Room,” a specially built space inside the company’s offices with computers lined up against the walls for one purpose: computer game tournaments.

For the rest of the day, teams of five with names like Shades of Greyscale and Sit the Flak Down heckled, cheered and battled one another playing a classic first-person shooter called “Unreal Tournament.” Winners got Nerf guns. Afterward, the nearly 300 employees were treated to burgers, snow cones and beer.

“It’s a work-hard, play-hard mentality here,” said Eric Goldman, 26, a product manager, who was recently awarded a life-size cardboard cutout of himself in recognition of his work at the company. “Google has laundry as a perk. But we have the War Room, and it helps break the mold of a workday.”

The fun and games long synonymous with the tech industry can appear frivolous on the surface. But company founders and executives say the keggers, free trips to Comic-Con and pingpong competitions help galvanize a winning culture at companies. The intense competition for talented tech workers makes company culture especially important today.

“We believe that culture is as effective as any marketing you can do in order to attract and retain the best talent,” said Zach James, Zefr’s co-founder and co-chief executive.

Moreover, experts say generous vacation policies, free lunches and awards for top employees tend to pay bigger dividends at early-stage tech companies where the smallest change in strategy can make a far bigger difference.

“These companies do in two years what most do in 10,” said Didier Elzinga, co-founder and CEO of Culture Amp, a human resources software startup with offices in San Francisco and Melbourne, Australia. “When you talk about why culture matters, the reason is because you have so much to gain if you get it right.”

The fun is directed mostly at millennials, who make up a significant portion of startups’ workforce. The chosen activities are often a nod to a company’s earliest days when, say, an impromptu pingpong match lightened the mood during a tense round of funding. They’re also meant to ensure a young company doesn’t work itself into the ground.

“If you’re too focused on productivity in an intensive environment like a startup, you’re going to burn people out,” said Dave Seibold, vice chairman of the Technology Management Program at the University of California, Santa Barbara.

Corporate America has taken notice, hoping some of that magic rubs off. Startup culture is now part of many traditional company playbooks – including open office spaces, the ability to work remotely, flexible hours and free yoga classes.

Of course, it’s not just about blowing off steam. Startups want to motivate their workers.

Advertising software startup Open X provides plenty of perks, but Tim Cadogan, the company’s chief executive, said the most effective tool was simply giving his employees greater responsibility, and by extension, a chance at contributing more.

“It’s all about making people feel valued and giving them a greater sense of purpose to do cool things,” Cadogan said.