Skip to content

Level Design in Tiled

LordFilu edited this page May 30, 2022 · 9 revisions

Tiled Project

Most game-design in combination with DANG can be done in Tiled. The layers in Tiled are exported with the DANG exporter plugin blit32_exporter.js to a c++ .h-file. This file should be included in the game project and read / interpreted by the TmxExtruder-class of DANG.

Layer conventions

The following types of layer are supported in DANG. So as DANG can export the layers according to its type, layer-name convention as follows is used.

Endings of name-property of Tiled-layers:

Ending DANG layer DANG structure
"bg" Background tile-layer -
"mood" Background object-layer -
"obj" Collision detection object-layer -
"fg Foreground object-layer -
"hud" HUD -
"paths" - Path definitions. Waypoint-structure of DANG
"waves" - Wave definitions. Wavepoint-structure of DANG
"zones" - Zone definitions. Zone-structure of DANG

Example: property name of layer is "lvl_1_mood". THe layer is exported as a mood-layer.

Common export properties for Tiled-layer to DANG-layer

  • z-order: value corresponds to the index of the layer in reference to the number of layers, beginning at the bottom of the list in Tiled.
  • visible: True. If false, the layer will not be drawn. The flag can be changed in the code.

Properties which are not exported:

locked, opacity, tint color, horizontal offset, vertical offset

Background (tile) layer

Type: Tile Layer

Properties

Name: your preferred name, ending with "bg"

Mood layer

Type: Object Layer

Object layer

Type: Object Layer

Foreground layer (optional)

Type: Object Layer

HUD layer (optional)

Type: Object Layer

Paths layer (optional)

Type: Object Layer

Waves layer (optional)

Type: Object Layer

Dimensions layer (optional)

Type: Object Layer