FasterChef was our entry to the 2016 Portsmouth GameJam, and after winning the competition we decided we wanted to make it into a full game with many more levels. During the GameJam, the levels had to be hand-created inside Unity, and each level was saved as a Unity scene.
We could’ve improved the workflow a little by making each level a prefab rather than an entire scene, but the best option seemed to be to have the levels serialised into a text format like JSON, and then have only one scene that loads each text file.
Since the levels were being stored as text, it didn’t matter what language was being used for the editor. For my job I use Python and Qt daily, so it seemed like the obvious choice for a lightweight editor. The level was broken up into five main layers, and from each layer you can see a ghost of the other layers to make placement easier.
These red blocks mark out the level structure, so that the shape of the level can be planned out independently of the actual tile-set. They are invisible when playing the game.
These are 3D models that vary based on the tile-set, that make up the visuals aspect of the environment. You place them on top of the red collision boxes.
These are further 3D models that act as decoration, they rest on top of environmental models and are things like pots or pans. By having the decoration separate from the environment, more variety can be achieved with less tiles.
These are markers such as level-start or level-end, or the locations of the items that you can pick up. For most of them, you can only put down one at a time.
One of the mechanics in the game is moving obstacles, represented by chefs. This layer allows placement of Chefs, and setting their path.
Once the editor was up and running, I realised that I wanted to be able to test it there and then. I could save the level and import it into Unity for testing, but that’s quite an overhead for quick testing, so decided to make a “Test Mode” where you could try out your level as you build it. The game mechanics had to be re-implemented in Python, but that only took a couple of hours, so was a worthwhile investment.
It still needs some work to support different tile-sets and there are a few bugs, but overall I’m really happy with how it turned out. You can try it out for yourself here.