-
Notifications
You must be signed in to change notification settings - Fork 0
LDtk
Layers in LDtk can be of various types. Each one supports different kind of data. They can be organized from the Layer panel using simple drag and drop.
All current layers are supported in Cotton. (integer grid, entities, tiles, auto-layer)
There is a couple of different layers. I personally found this tutorial to be explaining the different layers types quitte well. Video: Tutorial
These layers are grids of Integer values (ie. 1, 2, 3 etc.). Each value is associated with a color and an optional string identifier (for easier access in your code). We use this layer for determining collisions. Check the example project for collision configurations.
You can learn how to use IntGrid layers in this tutorial.
Tile layers contain bitmap images organized in a grid. These layers must be linked to an existing Tileset to work.
You can learn how to use Tile layers in this tutorial.
These layers host Entity instances, which can be placed along the grid or in free mode.
You can learn more about Entities in this article.
Auto-layers are actually based on IntGrid layers with a twist: they have a Tileset linked to them and rules to paint tiles automatically.
You can learn how to use Auto-layer layers in this tutorial.