This is The Mechanic, where Alex Wiltshire invites developers to discuss the inner workings of their games. This time, Hitman [official site].

Hitman developer IO Interactive is really good at making believable environments. Did you ever play Kane and Lynch 2? Seriously, its Shanghai is something to behold, a city of broken pavements, back alleys crusted with air-conditioning units and construction sites littered with cellophane-wrapped pallets. It’s a masterpiece of observation, one of the best representations of cities in videogames.

The latest Hitman doesn’t go anywhere so gritty, but it upholds the same values. Its levels are a jetset tour of places you believe could exist, but these aren’t just credible environments, they’re also machines for killing in. And the first season of Hitman closed with one of its best. Hokkaido is at once compact and expansive, melodramatic and credible, and I talked to IO about how it was designed.

THE MECHANIC: There isn’t really one tbh. Actually, maybe that’s the point here? That Hitman’s level design is a holistic marriage of function and form? Anyway, read on!

Hokkaido takes place in an exclusive hospital in the snowy mountains of northern Japan. On the upper levels, its patients enjoy the amenities of a luxury resort. There’s an exquisitely maintained formal garden and a fine sushi restaurant. There are hot springs and its perfectly appointed rooms look out across a valley as lanterns drift by. Beneath lies its clinical underbelly where surgery is performed and the staff live, and where, in its bowels, a morgue sits.

Lead game designer Jesper Hylling and lead level designer Torbjørn Christensen agree that it’s a somewhat nonsensical location. The idea of building a high tech hospital somewhere as remote, only accessed by gondola, snowmobile and helicopter, is less than practical. And that’s one of Hokkaido’s strengths.

“In a fantastical location like that we’re more free to imagine what it would be,” says Christensen. “If we had to put it in Tokyo we would have to have the Tokyo Tower in and all that. Putting it in a fantastical place allows us to be more crazy with what we want to have. We basically just have to imagine it ourselves. We’re not constricted by any real location.”

So this luxury hospital can have a creepy morgue underneath simply because it adds to the experience of exploring. IO describe the different discrete locations in Hitman levels as biomes, areas with different feels and functions, and early on there were suggestions that Hokkaido would be simply a hospital. “But getting some more twists and more biomes, where you feel something different happens, really helped, I think,” says Christensen.

The different biomes also help the levels feel more expansive than they really are because they emphasise the contrasts between them. “That’s one of the reasons we have a morgue,” says Hylling. “We have the high tech and a very stark contrast with the underbelly.” The spa is just near the lounge, and it even shares many of the same textures, but the use of unique animations, NPC costumes (or the lack of them) the water and steam, make it stand out.

The biomes aren’t arbitrary, though. “If you step into a biome that’s completely weird and makes no sense and you don’t explain it, it gets strange,” says Christensen. There’s a room in the staff’s living quarters with a dance mat game, but being set in Japan, it makes sense. The luxury restaurant fits with expectations of where rich patients would pay to recuperate. The more functional side of the hospital is served by storage rooms, staff quarters, kitchens, the helipad (the patients have to get there somehow), a snowmobile repair room.

Some biomes come from the needs of servicing a good kill idea. And some come from needing to help players navigate the level by giving them something memorable, such as Hokkaido’s snowmobile garage, which also made sense as providing Agent 47 with an exit point. “But it’s never an option for us to do something just because it makes sense for the environment, or, on the other hand, to do something just because it makes sense for gameplay,” says Hylling. “It needs to fit together, because we require our players to spend a lot of time in these locations.”

Much of what helps the areas fit together is in their attention to detail. Hitman levels often represent genuinely great architecture and interior design: places you want to be in; places that sit well in their settings. And yet IO’s research is mostly just Google: Image Search, YouTube and Street View. “Me and the artists that did Sapienza, we never went to Italy, but it’s based on Vernazza and some other towns down there on that shoreline,” says Christensen. “Then we read Italian players saying it’s pretty close, and that’s really cool of course. I guess we should have just traveled down there to actually see it.”

But still, they stress over details that most never even perceive, such as the thickness of a medieval wall in Sapienza. Agent 47’s animation for throwing someone out of a window just couldn’t accommodate how thick a proper medieval wall is, and, reluctantly, they had to slim them down to make them work. Though almost no one will explicitly notice this, IO knows it all counts to players’ overall impression of the space. “If a structure looks like it can’t hold its own weight then people will start noticing,” says Christensen. “Maybe they can’t put a finger on it and think it just looks a bit odd, or maybe they feel insecure and they’re not really happy being there. A lot of subliminal stuff.”

What also helps is that IO practice simple good design. A bad flow through a room is bad design whether it’s for physical or virtual space. “A lot of this stuff is designed running around, going into cover, looking around corners and stuff like that, so we get the feet on the ground from day one,” says Christensen. “Then you discover lots of things like if you go into a room then that door is hidden from most players because they look to the right. Many of these things, if you test them enough then the flow won’t get stuck and players will notice things without thinking.”

You can look at each Hitman level and see a theme to its form and structure. Paris is a vertical level. While it occupies a wide horizontal area, your attention is usually fixed on going up and down it. Bangkok has the same feel. Colorado is more horizontal, Marrakesh, too. But Sapienza and Hokkaido are different. “They’re basically spirals, or a snail house, we call it,” says Christensen. They wrap around themselves, with their layers interconnected with slopes and stairways.

“One of the reasons why all these levels feel larger than they maybe are in terms of square metres is that you can keep moving ahead all the time,” says Hylling. “There are no dead ends and you never need to backtrack, although you can.”

Hokkaido differs from Sapienza in its pacing, though. For one thing, it’s much smaller, but its more dense with objects to use and dramatic events. Hitman’s levels have a limit of 300 NPCs, not counting crowds, which meant that it had to be set during siesta time to explain why its public areas are relatively unpopulated. But for Hokkaido the limit (which it doesn’t reach) means its tight space is much busier.

The snail house structure is related to one of the key ambitions IO had for the level. “One of the things you wanted to do, Torbjørn, was to twist the target a little bit, so in this level we wanted to have a static target to see if it would be interesting,” says Hylling.

One of Hokkaido’s two targets is Erich Soders, the ex-head of Agent 47’s agency, who is undergoing gene therapy in the operating theatre on the level below the public areas. Unconscious and unmoving, the concept echoes one of the hits you have to make in the Sapienza mission, where you have to destroy a virus located in a lab in the caves beneath an idyllic Italian town.

Christensen also worked on Sapienza, and the Soders hit is in part a reaction to the virus hit’s limitations. “The virus is a static target and there’s only a few ways to kill it and we knew it was not a good thing, so we tried to make [Soders] interesting and many ways to kill him,” he says. Being strapped down on an operating table, Soders can’t be lured anywhere or pushed off a ledge. The answer was having Soders resuscitated unless you can prevent various failsafes kicking in.

The way he’s resuscitated is through the controlling presence in the hospital of an AI which manages not only Soders’ operation but also the entire building. This lead to the defining characteristic of the Hokkaido level, which is that doors only open if you’re wearing disguises appropriate to them, all controlled by the AI. The idea is that the clothes are fitted with RFID chips, and it gives this final level a distinct feel and a strictness that provides extra challenge.

“It had lots of problems and issues and it was kind of a struggle to get it to a final product,” admits Christensen.

“Once you get it, the logistics of the disguises is pretty cool, but if you don’t, it’s a big source of frustration,” says Hylling. Aside from teaching its fundamentals at the level’s start, they worked iconography for the different access levels into the clothing design. And they also had to grapple with emergent problems of players locking themselves out of areas by leaving the disguise that gave access to it behind them when they exited.

The final thing bears little evidence of the trouble, though, just as it also feels like a credible place. That’s the magic in Hitman levels, achieved though balancing game-serving fun and place-serving verisimilitude.