When making a TV show about Gotham City without Batman, there’s a right way and a wrong way of doing it — you can tell a more down-to-earth story using Batman’s themes, or you can make a gimmicky ripoff.

For the first part of “Gotham”’s pilot, it does things the wrong way. The episode opens with the murder of Bruce Wayne’s parents, and things don’t get much more subtle from there. Winking references to future villains abound — the pilot features at least four major Batman villains in some form or another. All together, these elements threaten to make the series little more than ham-handed foreshadowing.

With luck, the clumsy bits are just an indication of an overstuffed pilot because there’s a very good TV show just underneath the surface. Benjamin McKenzie portrays future police commissioner Jim Gordon with straight-laced intensity and plays well off of co-star Donal Logue ’s grouchy Harvey Bullock.

The two form the core of the show’s conflict: how can you be a good man in a rotten city? Gordon is the idealist, trying to do right by his city, and by young orphan, Bruce Wayne. Bullock is the worldly, corrupted cop who does things the only way he thinks he can.

If the good cop/bad cop setup seems a little well-worn, that’s because it is. You can see the expository flop sweat dripping off the screen when Gordon tells Bullock “you’re a cynic,” but even if it’s an old dynamic, it works.

Gordon has especially strong scenes with young Bruce Wayne, as he takes it upon himself to make right the murder of his parents. They have relatively few scenes together, but when they are talking, it seems like the emotional backbone of the series. It’ll be interesting to see how their relationship develops in future episodes.

What works less well are the villains — Jada Pinkett Smith plays crime boss, Fish Mooney, and her acting does little to help the cartoonish character. Adolescent Oswald Cobblepot, better known as The Penguin, has an appealing wiliness that’s unfortunately pushed too far into goofiness. Luckily the "Batman" series has a big roster of villains to choose from, so they have time to find their groove.

A big boost for the series is its cinematography and set design — you immediately know what kind of city Gotham is by the well-colored film noir locations. The atmospheric visuals, and occasional stylish directorial flourishes do a lot for sense of place that the writing doesn’t.

The series snaps into focus as the episode goes on and the plot strands multiply. It becomes clear that the show knows how to be something other than Batman-minus-Batman. It’s a crime story about how to best care for a city and how far the law and morality can be stretched.

The setting is the real star of “Gotham,” and it seems that creator Bruno Heller (of HBO’s “Rome”) understands that. While a lot of the pilot is clunky, it shows enough potential to be worth sticking with.

After all, it's Batman. Even with Bruce Wayne as a child, the gothic charms of Gotham City and its iconic villains are irresistible. Once the show learns to be more confident in that fact and not rely on gimmicks and clichés, it’ll reach its full potential.