Skip to content
Download

Scenery with tiles

  1. Tileset. Import the image as a sprite, slice it at the tile size and create the tileset with + › New tileset…. In its tab, mark the solid tiles.
  2. Layer. In the Layers panel, + Layer › Tiles.
  3. Paint. Pick a tile in the Inspector palette and drag in the room. The right button erases.

Solid tiles block moveAndStop, placeFree and onGround, like an object with Solid. The player code does not change.

if tileAt("Chao", self.x, self.y + 12) == 7 then Audio.play("passo_na_pedra") end
if solidAt(self.x + 10, self.y) then self.flipX = not self.flipX end
  • Decoration with no collision: another Tiles layer with Collides off.
  • Automatic edges and corners: the terrain brush, in Tileset and tiles.
  • Collision uses the grid: the level size has no cost.

Reference: Layers and tiles.