clock menu more-arrow no yes mobile

Filed under:

Double Fine's Hack 'N' Slash arms you with a USB sword and the power to debug

In Double Fine's new PC adventure game Hack 'N' Slash, players will solve puzzles, explore dungeons, battle knights and slay bosses through the power of computer programming.

Originally pitched in 2012 during Double Fine's company-wide game jam, Amnesia Fortnight, Hack 'N' Slash gives players control of an elf named Alice. (Though in true adventure game form, players can rewrite her name.) Armed with a USB sword and using some of Double Fine's own internal debugging tools, Alice can hack objects in the game world and manipulate the variables that govern the game's objects, reverse engineering the game itself. Blocks, barrels, moving platforms, even the enemies that populate the game's dungeons can all be hacked to bend to the player's will.

"It borrows the aesthetics of a top-down adventure game, but it's really this puzzle game that teaches you about hacking," Hack 'N' Slash project lead Brandon Dillon told Polygon in a gameplay demo this week.

"it's really this puzzle game that teaches you about hacking"

Some of the basic hacking action Alice can do involves her USB connector-tipped sword. If she encounters an object with a USB port on it (not every game object does), she can insert the sword and get access to the object's variables. In the case of a movable puzzle block, she could adjust a variable that determines the block's maximum number of moves. Or she could hack it to reverse its direction, so that if she pushes it left, the block instead moves right. She could hack a barrel to have zero health, causing it to split open, revealing something good inside.

Dillon showed that Alice can also hack enemies, like a grizzled knight who chased her around the dungeon. Using her USB sword, Alice could adjust the knight's variables, specifically his movement speed, to make him less of a threat. Dillon lowered his movement speed variable to zero, paralyzing him. Then he went further, making his movement speed value negative, so he moved in the opposite direction.

Alternatively, Alice could have hacked one of her own variables to survive: her health. Dillon raised her health meter from the standard three hearts to a few hundred. He could have hacked her heart count far beyond that, he said.

"I could have made myself invincible to the guard, just by holding down a button and boosting my health to ridiculously high value," he said. "It's a 64-bit precision number. We were trying to figure out how big it could go, but it's something like, 10 to the 500th, it starts expressing it in scientific notation."


In addition to her sword, Alice will get a magical hat called the Third Eye Hat, or "debug hat," as Dillon called it. Using the Third Eye Hat, Alice will bring up Hack 'N' Slash's debug mode. It's the same debug visualization that Double Fine uses, Dillon said, and it exposes information — like the fact that a key object is inside a treasure chest object — and interface details only the game's developers would normally see.

The debug mode view draws borders around some objects, like blocks and chests, and is especially useful in solving certain puzzles. For example, in the demo Alice needed to cross a dark chasm, but there was no bridge or platform visible. Switching on debug mode view, it became apparent that a series of invisible blocks moving back and forth across the chasm could be used to hitch a ride. The catch was that those blocks were moving very slowly. So Dillon hacked another variable, the game's internal clock, speeding up the movement of the blocks.

Players can execute more complex hacks by finding books, which represent actual files in Hack 'N' Slash's file system. In order to solve another chasm-crossing puzzle, Alice hacked into a file that determined how a bridge is dynamically built. Diving into the function that built that bridge, Dillon changed one of the constants in the code, so instead of building the bridge out to a maximum of eight tiles, the loop built 50 tiles, forming a bridge Alice could cross.

"I want non-technical people who like puzzles ... to get through the entire critical path of the game"

Alice has another hacking tool at her disposal: bombs. Instead of blowing things up, bombs pause the execution of code for whatever objects are caught in its blast. Dillon showed how this is useful by using the bomb on a cluster of blocks that couldn't be hacked normally, because they didn't have USB ports. "Blowing up" the blocks opened up a portal into the code, allowing Alice to hack certain variables. Dillon switched the parameter that decided whether or not a block had a USB port on it — flipping the boolean from false to true — and made those blocks hackable.

Dillon concluded our demo in an amusing way. After snatching the key from the block-bordered treasure chest, he opened a door and acquired a new variable. It was the "End Demo" variable, which he set from false to true, taking us back to Hack 'N' Slash's title screen.

Double Fine plans to ease players into Hack 'N' Slash's mechanics gently, he said, exposing them to programming concepts through puzzles that are easy to digest at first.

"I want non-technical people who like puzzles and lateral thinking to get through the entire critical path of the game," Dillon said. "And then there are a lot of secondary puzzles you can solve if you really want to dive deep and get that technical knowledge."

Hack 'N' Slash is slated for release on Linux, Mac and Windows PC this summer.

Sign up for the newsletter Sign up for Patch Notes

A weekly roundup of the best things from Polygon