A tool integrated in Unity to draw and generate 3D or 2D mazes randomly with your own prefabs.
Another game jam, another unity tool. During this Ludum Dare 22, end of 2011, I was alone to create the whole game, and as a developer, no way I could learn and create 3D models during that week-end since I also take time for my own family. So I limited myself to cubes for rooms, but for the beauty of it, I directly created in C# the 3D room model.
The game, Sqared, references directly the movie named Cube in the way it uses cubes located next to each other with traps in it. I added a feature that allow to dialog with other characters and the little twist of the game is that you can switch with the other character: the player starts with a standard body, then can (must) switch to be in a wheelchair, an old person with a stick, a striper (choices inspired randomly from the movie or the game design). The player will be able to exit the maze only with the body (s)he chooses, and some traps can only be taken out by a specific body: the player has to choose its path and bring home the chosen one.
All along the game jam, the scenario was constantly evolving, bringing more features, characters and traps to avoid. The maze changes following that evolution, so everything stays consistent. Moving room and making them connected took a long time each time I changed the story or added a feature. It became obvious that I had to create a little tool to help me handle that changes.
In a week-end, I created a tool to draw 3D mazes from my own prefabs
I came to the conclusion that it was pretty quick and easy to create a level design tool inside Unity, and I wondered if it could be useful for other developers. I took a month to improve the tool and push it on the brand new Asset Store.
During that first month, and the whole studio life, that tool evolved, to finally create A Maze Kit, a tool in which you can:
- draw yourself a 2D or 3D path
- create procedurally using different configurable algorithms a 2D or 3D path (Depth First Search was the first, with some variations)
- visualize and edit the path from the scene view in Unity
- generate the final labyrinth from prefabs in one click
- choose a theme (a set of prefabs) that allow to create a complete game!
The asset is released with two themes:
- a 2D theme: a stealth game where you have to find objects in the level and get out without being noticed,
- a 3D them: a Top Down Shooter within a maze where you have to find the exit.
We then launched a research and development phase that looked very promising as the tool was able to put any shaped 3D prefab next to each other following algorithms. I learned a lot during that time about what is topology thanks to the R&D labs from Poitiers (XLIM), and also thanks to the talents of Viviane, a coder I hired for that task, who could code and create diagrams explaining everything in parallel.
From all tools shared in the asset store, I always thought that was the one that could help the most but that we finally never used in any public project, until now. Overall, the research on generation algorithms and their data representation stays state of the art, no matter which engine and which engine is used.
So you see what can do the first release of the asset, I’ve put the trailer right below!
Credits
- Design, development v2 : Viviane Jaraczewski
- Design, development v1 : Frédéric Rolland-Porché
- 2D/3D art : Anne-Sophie Girault
- Marketing : Julie Mazé