Wave Function Collapse Prototyping tool

Type:

 Level prototyping tool


Engine:

 Unity


Summary:

Tool created to quickly prototype your levels in an easy and simple way before doing the blockout.




This tool is my major project for my AI master. The objective of this project was to create a prototyping tool that was easy and quick to use. This tool is presented as an intermediate step between the paper sketch and the level blockout. The tool aims to let level designers quickly prototype and iterate over a design before doing the blockout, a process that takes much more time and effort.

With this tool, building and editing a level takes little time and effort. This streamlines the process of prototyping, a very important stage in any project.

The use of this tool is fairly simple. The designer has a set of different tiles to place. The users just need to select the object and click on the grid where they want to place it. The algorithm will take care of giving coherence to the creation by rotating the object or changing the tile for a more suitable one. This makes creating a level easy and fast, letting the designer focus on their creation instead of having to worry about how to place the objects.

The algorithm that allows this to happen is the Wave Function Collapse algorithm. This algorithm recognizes the neighbors' tiles and adapts the new tile to fit. Every time a new tile is placed the algorithm updates the tile itself and its surroundings, making it very easy to remove or edit parts of the level. This ease to change things on the way allows a quick iteration over the level, permitting a better final result which is the goal of every prototyping process.


My contribution to this project

I was responsible for the entire project. I researched how I could use the Wave Function Collapse algorithm in real-time to create the level on the fly. For this purpose, I looked at how the game Townscaper used this algorithm.

Once the research was done, I developed the algorithm and the system to set the rules between tiles using JSON files. With this system, setting new rules was easily done. This allowed me to create and edit more rules as I added more tiles.

I added some visual and sound effects to juice up the tool. Lastly, I developed an import/export feature so users could save their works for later or send their levels between designers.

The tool is free-for-use for any person who may be interested.

All 3D assets are from Kenney assets


Demo video

All My Work