Procedural game design in HAMM-3R

The game uses a real-time two-step procedural generation system to create an abandoned space tanker (i.e., where the second half of the game takes place).

In addition to the space tanker, it also autonomously arranges game elements such as posters sticking to walls and bits of conversations using basic grammar rules and uniform random sampling.

Objs%20-%20gun_B_02

The abandoned space tanker

The generation of the tanker is designed to be fast and lightweight. Technically speaking, it follows a fixed structural design divided into two main areas connected by a middle room. In each section of the abandoned tanker there is one main path (leading towards the game's intended destination) and 2–3 dead-end paths for exploration. The latter are either blocked by a broken door or a group of explosive barrels (placed to prompt the player to shoot them).

To ensure this structure is always respected, we use graph grammar techniques inspired by the work of Joris Dormans and Sander Bakkes. A graph defines the layout structure, which is then converted into a level using a template-based system similar to the one used in Spelunky. The template system also helps keep layouts symmetrical and visually distinct between areas randomly distributing objects and doors.