Canvas not supported

DYLAN GALLARDO

Level Generator


Level Generator

A procedural level generator, created in Unity.

The level generator can procedurally generate levels in the background while other game processes run. It uses a voxel based approach, which only means that each individual room is represented as a grid of cubes, though the shapes of the rooms don't need to strictly adhere to a cube-shape

Level generator voxel room A better view of room voxels

The purple-pink-ish cubes are the room neighbor voxels, which appear at the opening of each doorway. These are used to test for layout errors such as one room blocking the doorway to another.

Level generator voxel room The voxels of a whole layout Level generator voxel room The doorway connections are displayed as the bright axis points Level generator voxel room A side view illustrates verticality

The images above should help to visualize the processes that are happening during generation to create the levels. The side view shows a point I hadn't mentioned yet. Because the level generator doesn't descriminate against a room's height or doorway positions it can spawn valid layouts that have plenty of verticality. This is so long as there are rooms that are built to have doorways at different voxel heights, such as stairways for example.

The generator doesn't care what the rooms look like as long as the base structure can be represented with cubes. You could create a doorway in a ceiling and it would start generating rooms upwards as long as there are no overlaps.