Contents

dusk.loadMap()

Synopsis

Loads a map from a file.

Description

This function can be used to load map data from a file for editing before building a map. It takes a file path that points to a map exported from Tiled and loads it. Dusk currently supports maps exported as either JSON or Lua.

Please note that this is not the same as simply reading a JSON file or require()-ing a Lua file. Dusk adds extra data into the map structure for dusk.buildMap().

Arguments

fileName : String

The file path of the map to load.

Returns

mapData : Dusk Map Data

The loaded data.