Skip to content

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:

PropertyDescription
name: stringThe name of the level.
maxLevelDuration: intThe maximum duration of the level in seconds.
roundTileIndices: stringA comma separated list of round tile indices.
excludedCollisionTileIndices: stringA comma separated list excluded collision tiles.
biome: stringThe Level's biome.
thumbnail: intThe 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:

IDNameBiome
0Tutorialoutside_area
1OutsideAreaSmalloutside_area
2OutsideAreaMediumoutside_area
3OutsideAreaLargeoutside_area
4CaveSmallcave
5CaveMediumcave
6CaveLargecave

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 NameDescription
detail_layer_1Is the highest layer which means that it is rendered on top of all other layers.
walkable_layerIs rendered below the detail_layer_1 and holds all tiles that entities can collide with.
detail_layer_2Is rendered below the detail_layer_1 and walkable_layer.
detail_layer_3Is 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 NameDescriptionPropertiesRequired
playersContains the player entities.angle: float
characterType: string (moot or major_dom)
yes
boxesContains the box entities.angle: floatno
pressure_platesContains the pressure plate entities.angle: floatno
collectiblesContains the collectible entities.angle: float
collectibleType: int (valid types can be found here)
levelEnding: boolean
no
breakable_floorsContains the breakable floor entities.angle: floatno
doorsContains the door entities.angle: float
connectedPressurePlates: string (ids of pressure plates)
logicType: string (and or or)
doorType: string (trapdoor, door-h3, door-h4 or door-h5)
no
storytellersContains the storyteller entities.angle: float
storylines: 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.