Skip to content

[0.10.0] Multi worlds

Sébastien Bénard edited this page Jan 20, 2022 · 5 revisions

Summary

Future versions of LDtk will support multiple world in a single project file, each world having its own array of levels.

Before this multi-worlds update, the following values are stored in the root of the JSON:

  • levels array (containing all layers etc.)
  • worldGridWidth
  • worldGridHeight
  • worldGridLayout

After the update, there will be a worlds array in the root of the JSON, where those fields will be moved:

worlds: [
  { 
    levels: [ ... ],
    worldGridWidth: XXX,
    worldGridHeight: XXX,
    worldGridLayout: XXX,
  }
]

Getting ready for the update

In any project, you can enable the new multi-worlds support:

  • open your project,
  • open the Project settings panel (shortcut F1)
  • open Advanced settings at the bottom of the panel
  • check Multi-worlds support
  • save.
  • the project JSON will now use the new format described above.

You can easily support both old & new formats:

  • if the worlds array in the root is empty, then levels, worldGridWidth, worldGridHeight, worldGridLayout are stored in the root of the json.
  • if the worlds array contains something, then use the values inside of it.