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

Hyper Light Drifter is a game about exploring mysterious ruins and killing the monsters that inhabit them with ferocity and precision. Whether you favour a slash-slash-shoot, a dash-slash-slash-dash, or any other combination thereof, combat is built on a holy trio of sword, gun and a dash move. The dash gets you into and out of scrapes in a moment, and the sword, with a wide slash that almost encompasses 180 degrees, is your trusty mainstay.

And the gun… Being slow to fire, with limited shots and requiring careful aim, it might not seem it at first, but the gun is your most powerful asset. Its place in Hyper Light Drifter’s arsenal is down to single and subtle design feature that keeps its relationship with the sword close and maintains a sense of its shots feeling both valuable and always available:

THE MECHANIC: Recharging ammo

Originally, ammo was dropped by enemies and from crates found dotted around the world, and that was largely fine. It was a typical design, entirely functional, and it was included in a preview build that the team sent out in late 2014 to developer friends and playtesters. Among the feedback they found Vlambeer’s Jan Willem Nijman coming back with a set of excellent critical notes that included a suggestion that perhaps ammo could recharge when you hit stuff instead.

“It was something that we had toyed around with, at least in the periphery of our design minds, but didn’t think about too hard,” admits Alx Preston, Heart Machine’s founder. But Nijman’s note pushed the idea to the fore, and so the team tried it out. They found combat transformed, and it also fixed and improved the game outside it, too. This simple tweak was an instant success.

The most immediate effect was that it forced the player to be more aggressive, because while ammo recharges slightly when players hit objects in the world, it recharges fastest when they hit enemies. “If you want it, go up, be dangerous, hit the enemies,” says Preston. “It required people to balance that danger and that safety, the danger of melee versus the relative safety of the projectile, so that made those scenarios more fluid, if anything.”

Over the three or so years Hyper Light Drifter was in development, Heart Machine tried various combat features, including shields and other defensive tools and sniping honed for 2D. But they all conspired to make them realise that, really, the game was about speed and aggression, and so when recharging ammo reinforced that sense, it was obvious that it worked well for the game.

The effect the team was going for harkened to Resident Evil, particularly Resident Evil 4, in which ammo levels were always kept pretty scarce. “With our game, we wanted you to feel like a badass, but we also wanted you to feel like a glass cannon, like things can go wrong at any moment,” Preston says. He wanted players to have to manage ammo, and for wasted shots to be significant. “Making ammo scarce I think helps balance out that challenge, helps to temper it, where it doesn’t feel unapproachable, but also that it doesn’t feel like a breeze.” And yet you can always get more by dashing in close to an enemy to hit it with your sword.

Preston knew that ammo spilling from crates and downed enemies just didn’t gel with an important ambition he had for the game. “We were very careful about not making things too videogamey in many ways,” he says. “We spent a lot of time considering how we wanted to convey each piece of information, and all the systems within, so they matched our world design so they don’t take you out of it too far, to the point where, yep, this is a rotating Mario coin, or a floating weapon on the floor.” Regeneration meant they wouldn’t have to depict little cubes pouring from an enemy (and they’d have to be weird little floaty cubes because of the size of the game’s pixels). They’d already worried about whether it make sense for Hyper Light Drifter’s world design that cubes of energy drop from enemies.

Besides, Hyper Light Drifter already had a number of collectible items, like health and money. “When everything was from crates and enemies, it was starting to get a little bit redundant or confusing in some cases,” Preston says. “We’d have like 10 different crate types, which is not something I wanted in the design. It was overwhelming; there were different fucking boxes everywhere. No thank you!” Anything that could help de-boxify the game was a virtue.

“Grabbing stuff from crates or having enemies just drop the ammo was something that, whilst being expected, can be difficult to communicate sometimes, or even tedious in other ways. Going off to seek little refills can be a pain in the ass, and placing that stuff in the world becomes a little bit tedious.”

Placing ammo crates was tedious because it was a matter of careful balancing. How many crates should be placed in the world, and where? And if it dropped from enemies, how often should it happen? And how should the game’s balancing take into account players running out of ammo? Having it simply recharge swept all these considerations away entirely, and yet it was subtle enough that it didn’t affect the essential level and combat design. Other than, in Preston’s words, “not having to fucking put crates there any more,” it didn’t mean adapting the existing design.

There was, of course, a problem. For six months after implementing recharging ammo, Heart Machine ran bi-weekly playlists in which people just didn’t understand it. “Almost nobody figured out the system. So while it solved a lot of problems that we were trying to solve, it also presented the biggest one, which was lack of communication.” Attempting to convey it through the HUD didn’t work because players don’t tend to look at it frequently enough. So they tried placing the regeneration information on the player character itself through a number or some kind of representational sprite, but it was incredibly distracting. Maybe the character could glow or flash when regeneration happened, but it was too cluttered, and since you regenerate with every hit, to the player it soon became meaningless information.

It wasn’t until the final two months of development that a solution was found, but it meant breaking some of the rules that Heart Machine had set on the project. They wanted the game to express its rules “Nintendo-style”, where players intuit that they can jump up on that platform, hit that block and a mushroom will pop out, just through pure design. “But that stuff can be much more complicated when you’re using every button on the controller or have to do several actions in tandem to complete that one full action,” Preston says. “We hit a lot of walls until we finally said, why don’t we use text and tell people.”

And so, near the start of the game, just after you get the gun, a line of text appears at the bottom of the screen, just as it does to explain that holding Y takes items and LB heals: “Slash enemies + objects to charge guns”.

“We were so against, so against using text that the thought of this handicapped us,” says Preston. “I learned a lesson that text isn’t always bad. If it’s at the beginning and it makes the rest of the experience better, it’s a win for us. It was one of those big struggles, of trying to balance our design standards and our goals with the needs of the player and the needs of the game itself remaining fun and transparent in the ways it needed, while also being opaque in others.”

Hyper Light Drifter’s recharging ammo is ultimately very similar to Doom’s glory kills, a way of keeping players close to the action by rewarding them with a resource that makes them powerful. Preston noticed: “I think that game is fantastic. That team really considered every aspect of the design and you can see that in a holistic way. Every component feeds into another.” And that’s true for Hyper Light Drifter, too, and in a seemingly small design choice that ripples throughout the game.