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

It’s pretty obvious that the excellent Exapunks is a game about hacking. Specifically, it’s a game about programming viruses and sending them into networked systems to monkey around with data, set in a great alternative 90s Wired cyberworld of PC cases flashed with black and red decals and zines set in Apple Garamond.

For its makers, though, Exapunks is a game about limitations. Its format is the result of hard decisions about how much space you get to write your code in, how much freedom you get to solve its puzzles, and how it’s presented on your screen. And even now, creative director Zach Barth isn’t totally sure he and his team got it right.

By Barth’s count, Exapunks is Zachtronics’ seventh commercial game, and six of them have been Zach-likes. That’s what Barth calls them, by the way. “Zach-likes, or whatever,” he says, maybe just slightly reluctantly. “Open-ended puzzle games.”

The point is that he makes a very particular kind of puzzle game. Across SpaceChem, Infinifactory, TIS-100, Shenzhen I/O, Opus Magnum, and now Exapunks, they present challenges with no single solution, just a themed set of constraints and the instruction to make something work within them.

“I don’t want to say it’s an established genre, because not a lot of other people are making them, but in my mind part of what we do is to innovate on the formula,” he tells me. “You can say we keep making the same game over and over again, right? Because that’s kind of true, but in the same way that an FPS studio keeps making FPS games, you import a lot of assumptions from your previous games and they become your starting point, and from there you think, ‘How can we make this fun, it’s own thing?’”

Exapunks’ starting point was Barth’s high school dream. He’d seen Hackers and he wanted to be one. “I thought it was the coolest thing ever.” As someone who was into computers, hacking seemed to present a cool way to do stuff on them.

But he never became a hacker. As he headed into his college years Barth started making games instead. But he retained his ambition to make a hacking game that was filled with references to the 90s hacking scene that he once coveted, fleshed out with zines that players would read alongside the game.

The first broad concept for the game came from Keith Holman, Zachtronics’ technical director, who thought it’d be great if, instead of puzzles, players could compete to program against each other. “He’s not a big fan of the Zachtronics formula, which is funny because he’s worked on all of them,” says Barth.

It turns out that adversarial programming has a long history. At one end of the scale there are games in which players program AI routines for little bots that go into battle against each other. At the other end there are pure programming competitions in which the battlefield is the computer itself, such as Core War. Players write programs – viruses by any other name – that execute themselves and work to manipulate the computer’s memory locations in order to wipe out competing programs.

Barth, worried about the game’s fortunes riding on having enough players to provide matches, didn’t want to make a multiplayer game, but he was nevertheless inspired. What about a puzzle game about writing viruses like Stuxnet, which was designed to attack a very specific kind of industrial controller used in Iranian nuclear centrifuges in order to destroy them? A game about writing programs that unfold, multiply and deploy themselves to make changes to the physical world.

And so, in Exapunks, you write viruses that order you free pizza and remove the peanuts from candy bars. And a lot of other things besides.

(As an aside, one problem with hacking that the team ran up against as they researched the field was hackers. “It turns out that hackers are assholes,” Barth says. “We interviewed a bunch and mostly they stole credit cards and figured out ways of ripping off phone companies to get free phone calls. And that was it, apparently. Sometimes they’d try to get each other arrested for fun. We didn’t really want to make a game about that.”)

As the game’s themes and its story, written by Matthew Burns, started to inform the nature of the puzzles, Barth began to think about how the game would relate to his previous Zach-likes. And a big question within that was how it would present the code players would write.

Two previous Zach-likes feature coding. TIS-100, which is about programming a fictional 80s computer, features a fixed grid of components to which you can only write a fixed amount of code. “Largely, that was a UI consideration that turned into a design consideration,” says Barth. “If you make it so people can write any amount of code then it has to scroll. And if there’s scrolling, you can’t see it all and it’s hard to debug. I wanted to make the puzzles simple enough that you could solve them and have all the code on-screen at once.”

Barth is a big fan of games in which everything is on-screen at once, and many Zachtronics games manage to achieve that, from SpaceChem’s reactor to Ironclad Tactics’ board, without scrolling or hiding information behind other elements.

The other coding Zach-like is Shenzhen I/O, in which you create electronics products. Here, you write code into electronic components which must fit on a fully visible circuit board. But Barth’s implementation came with a problem. To ensure all the code visibly fits in the components, the game limits how much you can write, and that presents less accomplished players with a greater challenge, because flabby code takes up more space.

Some Shenzhen players like the way the game forces them to optimise, but others like to choose their challenges. So when he came to make the next Zach-like, Opus Magnum, Barth wanted to satisfy the second group by making more open-ended puzzles in which the challenge is not so much solving the puzzle but in picking what they then want to optimise. Opus Magnum imposes no arbitrary limits on the alchemical machines you design, giving you as much space on the board as you like to make them. It’s up to you to set yourself the differing goals of designing fast, cheap or compact solutions.

But when he came to Exapunks, Barth was still thinking about the strict limits of his two programming games. Exapunks’ key concept is that you solve puzzles with EXAs, little bot-like things that you send into a network visualised on the right side of the screen. Each has a set of code that governs its behaviour, telling it to move between locations, read and write data, transport it around, and destroy other EXAs.

Still stuck in the headspace of the previous games, the first version placed a limit on the code an EXA could hold. “And right away, it was really stupid! We should let you write as much code as you want! It worked in Opus Magnum, let’s be bold,” says Barth.

“Saying we decided not to restrict the amount of code people write, it sounds like it’s not an impressive thing, but for us it was an important decision, the same as I imagine people making a firstperson shooter obsess over minutia, little fine details that normal people don’t even notice.”

But where would all this code sit? The team couldn’t see how they could draw the network in such a way that an EXA’s code could sit inside it, and so they visually disconnected the code from the EXA, listing it in a panel to the left instead.

“I don’t really feel good about it, I still don’t really think it’s that great a design decision, but it’s what the game is,” says Barth. He’s right: it can be difficult to track which code is for which EXA as you play, and since all your code for all EXAs is in that single panel (and when you get them cloning themselves the count can balloon) it can impose a lot of scrolling.

But it gives you freedom. And maybe too much freedom, because it led to an issue that was new to Barth. If you give players unlimited space, the fastest programs are not smartly compact ones which elegantly loop around on themselves, but long ones which simply list every single step. “Yeahhhhh. So that was a problem,” he says.

To combat these solutions the code does, in fact, have limits, aimed at being big enough that most people won’t reach them. “The problem is that people still do bullshit cheesy stuff and there are people who are so bad that they run up to the limits and they’re emailing me and upset,” says Barth.

So a change that’s coming soon will allow players to code as long as they want, but if it goes over the limit their solution won’t appear on the histogram that appears at the end of each puzzle to show how it stacks up against other players’ solutions. “That’s the current plan. I don’t like that plan; if we set the limits too low, people won’t use the leaderboards and histograms, but it allows them to be really bad without ruining it for people who are optimising.”

Exapunks is absolutely clear in its setting, themes and intent, and though it’s still in Early Access, it’s already polished to a sheen. But these incongruities and imperfect fixes highlight its contrasts with Opus Magnum’s clarity and intuitiveness. “It’s definitely a flawed game,” admits Barth.

And yet he also feels Exapunks is exactly what he wanted it to be. “The biggest challenge has been after launching it, reconciling what I wanted it to be and what people want it to be. We’re in Early Access so we have the ability to figure it out but it’s been tough.” Perhaps that’s fitting for a game that’s so utterly expressive of the messy abstractions of code.