The Hong Kong of “Sleeping Dogs” is not the safe, expat-friendly finance capital familiar to readers of The Wall Street Journal. But its gritty streets and seedy clubs form the perfect backdrop for this open-world action-adventure videogame.

In “Sleeping Dogs,” you are Wei Shen, a soldier in the fictional Sun On Yee gang. Wei wages turf wars, steals cars and collects protection money, and if you do your job well, you get triad points, move up the ranks and eventually level up, gaining new fighting skills that make you tougher to kill.

But there’s a twist. Wei’s an undercover U.S. police officer on loan to the Hong Kong police, tasked with taking down Sun On Yee from the inside. While doing the gang’s dirty work, he spends a fair bit of time cleaning up the streets, setting up low-level drug busts and installing closed-circuit cameras to monitor dealers. Inspector Jane Teng also enlists Wei to help solve bigger crimes believed to involve the triads. Handling police business also gets you points and power-ups.

It’s this bifurcation that makes “Sleeping Dogs” different from open-world games like “Grand Theft Auto IV,” and like the antiheroes in John Woo films, Wei Shen is conflicted. He was born in Hong Kong but doesn’t belong there, thoroughly Americanized after years of living in the U.S. His childhood friends are in the triads, and as he builds up trust, he knows he’ll have to one day betray them. At the same time, he grows increasingly wary of his police handlers, worrying that they’re bent and will give him up to the gangsters.

Square Enix

The game’s streets and alleys, set in real-life neighborhoods, look like dingier versions of Hong Kong.

He is also damaged. Though he never says as much, it’s clear he became a cop to avenge his sister’s death. She was a junkie, and while the triads didn’t murder her, he holds them responsible for helping her descend into a life that ended with an overdose.

The game’s streets and alleys look like dingier versions of Hong Kong, and it is set in the real-life neighborhoods of Central, North Point, Aberdeen and Kennedy Town. There is gaudy neon, crowded wet markets, mansions on the Peak, and of course, the red-light district. The besuited lunchtime crowd in Central is little more than collateral damage in pitched gunfights, or roadkill during illegal races. When Wei walks down the streets, he bumps into people — much like the real Hong Kong.

Another touch of verite: Diss a taxi driver, and he’ll curse at you in loud, loquacious Cantonese.

Though Wei can stick to the storyline as much as you’d like, the city is his sandbox, and he can play at ancillary tasks or just wander aimlessly. He can help friends by recovering their property, sing karaoke with one of his several girlfriends or beat up rivals to gain “face” points that help him build up his reputation. As he levels up, he can buy new clothes and accessories, which affect the way other characters treat him. Wei can, at any time, steal cars or attack innocents, but if he does it too often, the cops will be on his tail or he’ll lose points for hurting innocents. Knocking down traffic lights and parking meters will cost, too.

“Sleeping Dogs” had a troubled backstory. United Front Games began development in 2009 of what was to be the third game in Activision’s “True Crime” series, but Activision abandoned it amid delays and concerns that the open-world market was saturated. United Front picked up the pieces last year and took it to Square Enix London, finishing the game and bringing it to market in August. It’s called “Sleeping Dogs” because Square Enix bought the rights to the game, not the “True Crime” name.

If parts of “Sleeping Dogs” feel familiar to gamers, it’s because they are. A close cousin is Rockstar Games’ “GTA IV,” and there are bits and pieces similar to “Assassin’s Creed” and “Need for Speed.” But Square Enix has also had a hand in some hits, and its development team has brought vestiges of them to “Sleeping Dogs.” The fighting controls and engine, for example, feel a lot like “Batman: Arkham City.”

Looking at recent retail sales figures, it’s clear “Sleeping Dogs” won’t be a blockbuster like “GTA IV,” but I’m rooting for it to become a cult classic.

“Sleeping Dogs” is available for Xbox 360, PS3 and the PC. It retails for around $40.