Maps
A map is a grid of tiles from a tileset, in layers: the ground on one, the
trees and walls on another. Right-click in the file list and pick
New map… to make one (a .map.json file), and it opens in the map
editor. Your game puts it on the screen with CREATE MAP, as Tile maps in
Making Games with Crash shows.
Painting
Choose the tileset from the menu at the top (Choose a tileset…), pick a tile from it, and paint. Alt-click a tile on the map to pick that one up. The tools are in the column down the left, each with a key (hover over one to see it):
- Paint (B), Erase (E), Line (L) and Rectangle (U), for putting tiles down and taking them up,
- Fill (G), Flood Erase (Shift+G) and Replace (R), for a whole area or every tile of one kind,
- Select (M), to copy, cut and paste a block of the map,
- Lift (T) and Lower (D), which move the tile you click to the layer above or below, and Lift Similar (Shift+T) and Lower Similar (Shift+D), which move every tile like it,
- Edit Meta (I) and Meta Match (Shift+I), for the map’s metadata layer: markers that tell your game something about a place, like “an enemy starts here”. Meta Match puts a marker on every cell showing the same tile,
- Auto-Tile (A), which paints with an auto-tile set and picks every edge and corner for you (and Auto-tile on draw does it with every tool),
- Stamp (S), which puts down a block of the tileset at once (pick one with Pick region…),
- Boundary (K), for walls and floors (below).
Beside the tileset at the top is what the tool in hand can be told: the brush’s size, which auto-tile set, the stamp, the marker.
Several tilesets
A map can be painted from more than one tileset: the ground from one, the trees from another, a dungeon’s doors from a third. In the tileset menu, Add a tileset… adds another, and × beside one takes it out again, with its tiles. The palette shows each tileset’s tiles under its name.
Choosing or adding a tileset opens a picker that goes through the project’s folders, starting where the map’s tilesets are: double-click a folder to go in, click a name in the path along the top to come back up, or type in Search every folder. Each picture shows its tile size when it has one, and one the map can’t take (in use already, or with tiles of another size) is dimmed, saying why. Change the tileset… swaps a map’s one tileset for another; its tiles keep their numbers, so a tileset laid out the same way re-skins the map.
Each tileset’s tiles have numbers of their own on the map: the first tileset’s from 1, the next one’s from the row after the first one’s end, and so on. The menu shows each one’s numbers. Each one’s auto-tile sets, animations and arrangement come with it, so Auto-Tile and Stamp can use any of them; an auto-tile set’s name says which tileset it’s from.
If a tileset grows past the numbers it has (you’ve added a row of tiles in the tile editor), opening the map moves the tilesets after it along to fit, and their tiles with them. Undo takes it back.
Layers lists the map’s layers, with + Layer for another. A map can grow and shrink with the + and − on each of its edges, or Resize….
What will the player see?
Turn on Screen and a frame the size of your game’s screen sits on the map. Drag it about to see how much of the map fits on the screen at once. Grid shows the tiles’ edges.
Walls and floors
A map’s tiles are only pictures: what stops a sprite is a boundary. Draw them with the Boundary tool, as rectangles, slopes in any of four directions, or enclosures that keep things in. Generate… makes them for you, from the tiles on the layers you say are solid.
Copy BASIC copies the boundaries as BOUNDARY ADD lines to paste into
your game. They’re also saved beside the map, where a scene file can use
them.
A maze in a moment
Maze… fills the map with a maze or a cave. Pick how it’s made (Recursive Backtracker, Prim’s, Recursive Division, Binary Tree, or Cave), how big a cell is, and whether the walls are auto-tiled, then Generate. Don’t like it? Regenerate.
Lots of maps: the atlas
A big world is lots of rooms. An atlas (New atlas…, an
.atlas.json) shows them side by side and says how they join. Drag maps in
from the left, drag from the dot on one map’s side to another map to link
them, and double-click a map to edit it. ⬅ at the top of a map takes you
back to its atlas.