Dark Light

In his talk at the Game Developers Conference 17-bit’s lead engineer, Zach Aikman, revealed how a variety of mathematical techniques were used to create the dungeons in Galak-Z.

On the surface Galak-Z in a throwback to games from times gone by. It revels in its Saturday morning cartoon aesthetic and the frantic gameplay is a loving homage to 16-bit shooters from the early ‘90s. In Aikman’s own words the game is a heady amalgam of Asteroids, Halo, Far Cry and Spelunkey with a dash of anime Starblazers thrown in for good measure.

Predominantly a dungeon-based shooter (in space) the game uses variety of unorthodox methods to create its environments. The result is a set of levels created using procedural generation and then enhanced by hand.

Aikman explained how the PAX demo of Galak-Z seen in 2013 featured a completely handcrafted dungeon, named the 4th Cave. In that build every element was made by hand, from the placement of items to the layout and structure of the level itself. Although happy with the result (which was positively received at the show) the long creative process served as a warning of how much work lay ahead for the team.

The PAX demo also helped to highlight the strengths of Galak-Z; control, complex interaction, exploration and ambience. With efforts focused here there wasn’t a huge amount of time or resource left to spend chisling away at cave walls or planting shrubbery.

“Our level design approach started to shift very rapidly,” says Aikman. “We had a hunch that we could randomly generate our levels, but we didn’t quite know how we would go about it.”

Aikman took the lead and introduced an approach that uses ‘Cellular Automata’, a model of simulating living cells that are governed by a specific rule set. The rules are applied to every cell at each stage of the simulation. In short, the density of ‘living’ cells affects and revives dead cells, and vice-versa.

This method was used to kickstart the process of creating the dungeons in Galak-Z. The result of the simulation was a series of interesting shapes that evolved of their own accord and could then be built upon.

The results were somewhat crude but they lay the foundation for the game’s dungeons. Showing one example Aikman says, “It’s got pretty much everything you would want in a Galak-Z level; islands, narrow passage ways, pockets for hiding and placing lava pools. There are so many things you can do with this space.”

Galak-Z

The next step was to use an algorithm to place objects within the dungeon. “You need to place treasure, enemy patrol paths, hazards, obstacles. All the things that make the game fun and interesting, you still have to place, and that’s a really difficult thing to do,” explains Aikman.

Cellular Automata was used once on a room-by-room basis. Only once the simulations were complete did the development team step in to complete each dungeon.

The remaining elements were added using a layer-based system that covered everything from loot, items, enemies and waypoints. Kind of like Photoshop for creating space-shooters. “Room creation becomes decidedly less complex when you go layer by layer.” Aikman says.

However, he is also keen to stress that his approach is only one of many.

“There’s not a text-book approach to generating procedural concepts, the process is just as unique as your game is,” he concludes. “We failed many, many times along the way, but each failure taught us something new about the game we were trying to make.”

Galak-Z will released on Playstation 4 later this year.

Related Posts