Levels
Each level is a JSON file which consist of multiple layers. Levels are designed using Tiled. In addition to the JSON file, there is a tileset file which contains the tiles used in the level. Tilesets are designed using Aseprite and can be shared between multiple levels.
The name of the JSON file is also the level id.
Properties
Each level must have the following properties:
| Property | Description |
|---|---|
name: string | The name of the level. |
maxLevelDuration: int | The maximum duration of the level in seconds. |
roundTileIndices: string | A comma separated list of round tile indices. |
excludedCollisionTileIndices: string | A comma separated list excluded collision tiles. |
biome: string | The Level's biome. |
thumbnail: int | The thumbnail of the level see thumbnails for more. |
Thumbnails
The thumbnail is a number that represents the level's thumbnail. The following thumbnails are available:
| ID | Name | Biome |
|---|---|---|
| 0 | Tutorial | outside_area |
| 1 | OutsideAreaSmall | outside_area |
| 2 | OutsideAreaMedium | outside_area |
| 3 | OutsideAreaLarge | outside_area |
| 4 | CaveSmall | cave |
| 5 | CaveMedium | cave |
| 6 | CaveLarge | cave |
Layer Structure
There are two types of layers. Each level must have the following layers:
Tile Layers
These layers contain the tilemap data. The order of the layers is important.
| Layer Name | Description |
|---|---|
| detail_layer_1 | Is the highest layer which means that it is rendered on top of all other layers. |
| walkable_layer | Is rendered below the detail_layer_1 and holds all tiles that entities can collide with. |
| detail_layer_2 | Is rendered below the detail_layer_1 and walkable_layer. |
| detail_layer_3 | Is rendered below the detail_layer_2. |
Object Layers
These layers contain the entities and their properties. For each entity type, there is a separate object layer.
| Layer Name | Description | Properties | Required |
|---|---|---|---|
| players | Contains the player entities. | angle: floatcharacterType: string (moot or major_dom) | yes |
| boxes | Contains the box entities. | angle: float | no |
| pressure_plates | Contains the pressure plate entities. | angle: float | no |
| collectibles | Contains the collectible entities. | angle: floatcollectibleType: int (valid types can be found here)levelEnding: boolean | no |
| breakable_floors | Contains the breakable floor entities. | angle: float | no |
| doors | Contains the door entities. | angle: floatconnectedPressurePlates: string (ids of pressure plates)logicType: string (and or or)doorType: string (trapdoor, door-h3, door-h4 or door-h5) | no |
| storytellers | Contains the storyteller entities. | angle: floatstorylines: string (each line is separated with %%) | no |
Level Loading
Levels are loaded by the server and sent to the clients when a level starts. For the client, only tile layers are important. Object layers are only used by the server to create entities.
Templates
INFO
A Tiled template for each biome can be downloaded here.
In the templates folder is a object_templates folder which contains a template for each entity type with predefined properties. You can drag and drop the object from the file explorer on the left side into the map. Make sure you've selected the correct layer.
Please detach the object from the template layer after you've placed it (right-click object -> detach). Otherwise the map cannot be loaded.