This is The Mechanic, where Alex Wiltshire invites developers to discuss the difficult journeys they’ve taken to make their games. This time, Path of Exile’s Delve league [official site].

Every three months, Grinding Gear Games adds a new league to its excellent action RPG, Path of Exile. Each league adds a new spin on its core monster-slaying action for a few weeks until the next is added, and the latest is Delve, which launched at the end of August.

Delve presents you with an infinite and pitch-dark mine to dig into, a sprint into the black of the unknown that’s almost a metaphor for its production as its makers raced to find an idea and make it fun in time for release. But as they found rather too late, the real challenge was preventing Delve’s players from avoiding the fun they were meant to be having.

Here’s how Delve works: you start at the top of an infinitely deep mine that’s so dark that it saps your health. Luckily, you have a crawler which emits light. To progress deeper, you send your crawler to a new location on the map and then follow it, battling monsters to attempt to keep up with its island of light. Then, when it reaches its destination, you face several waves of enemies before setting a new location. The deeper you go, the more valuable the rewards and the stronger the monsters.

Path of Exile is a game about carving incredible character builds out of a fabulously labyrinthine skill system and countless randomly generated equipment, and then running wild and killing gods. But it’s also about restrictions. For some time Grinding Gear had wanted to make an infinite dungeon, but they had to figure out how to limit access to the endless.

During the five years Path of Exile has been out, they’ve learned they always need to restrict and control progression by making it cost resources. That’s because, as studio cofounder and technical director Jonathan Rogers tells me, players have a knack for messing themselves up when they’re given freedom to set their own challenges. He says that they’ll tend to watch streamers, who usually play on the hardest difficulty, watch them win big rewards and then try the hardest mode possible themselves. “And then when they get completely crushed they’ll get angry and say the game’s unfair.”

So, how to provide a limit in an infinite dungeon? Rogers, who is part of a small senior team that comes up with the concepts for each league, thought he saw an answer in mining. ”There’s a Flash game called Motherload,” he says. “I was thinking of that.“

In case you haven’t played Motherload, it’s a game in which you steadily dig down, mining minerals and investing the proceeds in upgrading your miner. In Delve, he thought, you’d ‘mine’ out different sections and steadily open out the the dungeon, restricted by the need to invest in upgrades. But Rogers soon realised that the concept would inherently slow players down.

Slowing players down is a real problem in Path of Exile. “There’s this thing in our community called the clear speed meta,” Rogers explains. Over time, Path of Exile has become faster and faster because players tend to optimise their characters for speed. ”Pretty much any time we’ve tried to cut that back it’s led to players being really unhappy, so we have to make sure that if we’re reducing speed, we do it very slowly so no one notices.”

So, with three weeks to go until Incursion’s launch, which was when the larger team would start making Delve, Motherload was off the menu. But Rogers definitely liked the idea of mining, and he began thinking about the way Incursion gave players a limited time to kill a number of monsters. “So, OK, that’s interesting and fairly obvious,” Rogers says. “Maybe we could do something different where instead of time we could maybe limit distance?”

So, players can take as long as they like, but only walk a certain distance. It was then that he came up with Delve’s core concept, of using light in a dark mine as a way of limiting distance.

First idea: players would lay out a string of electrical wire and have a stock of maybe 30 lights, automatically laying them down as they walked. “It sounded cool but we tried it and found it just wasn’t good,” says Rogers. There no tension between light and dark, because wherever you went there’d be light, unless you’d run out, in which case it was time to return to town anyway.

They tried a version where you’d drop lights manually, but that interfered with the whole clear speed meta thing. Maybe there could be certain locations where lights would come on when you were near? But that meant being in the dark when you weren’t.

“We kept playing with it over a week until I finally came up with the idea, hey, maybe the problem was that you’re the one dropping the lights and maybe the real solution is to have something else do it?” And so they created a crawler which would roll along a track, dropping lights behind it.

Surely this was it. “We tried and it still wasn’t fun. There was no tension,” says Rogers. You could just stop and stand in the light and there was no feeling of time pressure. “I think I was a bit blinded by wanting distance to matter, and I lost track of the fact that time is an important resource.”

And so the team iterated yet again and finally came up with the idea that rather than dropping lights, the crawler would have one mounted on it, and it was up to the player to keep up with it as it moved along.

“It was good, because if you stop you’re taking damage. There’s always a resource being spent: either you’re in the light, in which case you have to run and keep up with fighting monsters or you stand in place and let the crawler get ahead of you, so you’re running out of time; or you’re sat in the dark, in which case you’re taking damage so you either have to heal or use other resources, like flares. So there’s always a tension, and it feels frantic. The moment we did that, it immediately became fun.”

About two and a half weeks after Incursion was launched, and with two and a half months before this next one, Delve finally moved out out of prototyping and into production.

From here, the biggest issue ahead seemed to be the need to revamp the way the entire game renders shadows. Now they killed you, shadows gathered more meaning, and every point of light now needed to throw them accurately. “It was quite a challenge,” says Rogers. But one of Grinding Gears’ graphics engineers was playing around with a new technique which is far less expensive than the normal method. “I guess you could call the technique ’screenspace variance point light shadow mapping’. A graphics engineer person would know what that means. It’s pretty cool.”

Meanwhile, Rogers and a few others worked to balance Delve’s system of resources that manage player progression. Flares give you a few seconds of light when you venture away from the crawler. Dynamite allows you to blow open blocked passages. Both are purchased and upgraded with azurite, a blue mineral awarded when you reach new nodes on the map. And then there’s sulphate, which players find in each area of the game and pays for each journey into the mine with your crawler.

“At the end of the day it comes down to making an Excel spreadsheet,” says Rogers. “That’s the game designer’s life. We basically model everything out in Excel. My co-founder Chris [Wilson] is really good at it.” All went well and they shipped on time.

But they’d made a mistake. High-level players were meant to collect sulphate from endgame areas because they’re the most fun to play. Since endgame areas cost resources to play, Grinding Gear had to bump up the sulphate rewards to ensure they were worth the cost of collecting them, and went for a factor of ten.

“But we underestimated how much faster someone could go through a non-endgame area and find the resource than doing the endgame areas. We found people could do runs in one of the non-endgame areas with a max clear speed build in about 15 seconds.”

Rogers laughs, but it was a serious issue. ”The problem with players is that if something is the most efficient thing to do, they’ll do it because they say they’re forced to do it, and also complain that it’s boring.” Grinding Gear had to fix it fast.

The obvious solution was to raise the sulphate reward from endgame areas, so they boosted it by 30 times and balanced it by also raising the sulphate cost of playing Delve by 30 times. Thus, the non-endgame farming strat was no longer viable, while in real terms the endgame cost the same as before. Sounds good, right?

Nope. Players logged in to see the cost of playing Delve had increased by 30 times and were immediately up in arms. What’s more, Grinding Gear had also underestimated Delve’s popularity among players who hadn’t yet progressed to the endgame. With the original balance, players didn’t need access to the endgame to get the sulphate they needed to pay for deep runs in the mine, and now, faced with a vastly raised price of entry, they couldn’t.

The team had to once again go over the numbers, scaling things down again a little and exchanging exponential increases for linear ones so people who were behind could still catch up.

“This seat-of-the-pants balancing was really frustrating,” says Rogers. “If you change stuff like that it loses the trust of the community and you have to build it back up again. Yeah, it was quite painful, but thankfully we’re OK now.”

Grinding Gear walks a tightrope with Path of Exile, rewarding and restricting players in exquisite balance. “If we make the game more rewarding, people will quit faster, even though they feel they’re having a better time,” says Rogers. “Some of the leagues that have been the best in terms of player reception have also been some of the worst in terms of retention for our company, so we’ve got to be careful. It’s a tension, but ultimately, we’re always trying to make people have the best time.”

Delve’s a perfect example of that tightrope. When players were grinding non-endgame areas and complaining the game was boring, they asked why Delve had to cost sulphate. It was fun, so why couldn’t it be unrestricted?

But Delve’s reward systems are balanced around playing it with restrictions. “There has to be a limit. It’s not something players are going to want to hear but yeah, we can make Delve free, but we’d also have to scale back its rewards a lot, and they’re obviously a huge part of why they find it fun to do. We had to find a way to push people back to the fun part of playing.”