Item type: Chunk

Table Of Contents

Represents a group of Spawnable Objects. This is used to manually place individual objects (ie coins, bombs, etc) at specific grid points. See the Spawnable Objects documentation for which specific objects can be spawned and their respective data fields.

A chunk’s data field is a map whose keys are GridX values, and values are arrays of Spawnable Objects. Each entry in the chunk’s data map represents a single column of objects spawned at a particular X coordinate.

As with other items, multiple chunks (and other item types) can be defined, and will be spawned in order of their appearance in the items array.


Example #

Spawnable Objects aligned in a single column (ie, they have the same X values) should be included in the same entry:

{
  "items": [
    {
      "type": "chunk",
      "data": {
        "0": [
          {"key": "c", "gridY": 50},
          {"key": "c", "gridY": 60},
          {"key": "c", "gridY": 70}
        ],
        "50": [
          {"key": "c", "gridY": 50},
          {"key": "c", "gridY": 60},
          {"key": "c", "gridY": 70}
        ]
      }
    },
    {
      "type": "chunk",
      "data": {
        "0": [
          {"key": "c", "gridY": 50},
          {"key": "c", "gridY": 60},
          {"key": "c", "gridY": 70}
        ],
        "50": [
          {"key": "c", "gridY": 50},
          {"key": "c", "gridY": 60},
          {"key": "c", "gridY": 70}
        ]
      }
    }
  ]
}

The example above spawns a vertical line of 3 coins at X = 0, and the same vertical line of 3 coins at X = 50.

Then, the second chunk is spawned immediately following the first. Essentially, this chunk is spawned at X = 50 + endPadding and X = 100 + endPadding, where endPadding is either the user-defined X padding between consecutive chunks, or the default system padding (about 8 GridX, so consecutive chunks don’t overlap).