This project provides a level generator that can be controlled by a human user to generate tile-based levels as well as episode data that can be used to train an AI agent for procedural content generation (PCG) through apprenticeship learning.
- Unity 2017.2.1f1
Open the project in Unity and load the scene Scenes/Editor
. This is
the primary scene used for human-controlled level creation.
This generator is used to create top down dungeon levels in the style of adventure games like The Legend of Zelda.
Tile-based levels are created by controlling a "digger" character. At the start of a level creation session, the digger is presented with a grid filled entirely with blocks. As the digger moves from tile to tile, they "dig out" each space that they move to, converting it into a traversable open space. Actions the digger can perform are:
- Movement up, down, left, and right to clear out paths
- Create small, medium, and large square rooms centered around the digger
- Place treasure, enemy, and level exit tiles
- Place keys and locked doors
The following keys can be used for manual control of the digger:
w
,a
,s
,d
or↑
,←
,↓
,→
: movement1
: Create small room (3x3)2
: Create medium room (5x5)3
: Create large room (7x7)j
: Place treasurek
: Place enemyu
: Place keyi
: Place locked door (Note: Keys must be placed before doors can be created to ensure playability)p
: Place level exitEsc
: Save and quit the current level generating session- Upon quitting, text will appear in a selectable console on the screen with the path to files containing the generated tilemap and the recorded episode data (a series of states and actions).
Insert
: Spawn an AI digger at the starting location which executes a concrete set of actionsDelete
: Destroys the AI digger