The grid format¶
A map leaves the workshop, and comes into it, as two files: a tile sheet, <name>_<T>.png, and a text, <name>.txt, that places its tiles. The format is plain enough to be written by hand, by a script, or by an image generator and a language model working together: generate tiles of 16 × 16, then a map that uses them.
An example¶
papydeck grille 1
# a forest, two layers (a comment: # followed by a space)
tuile 16 # the side of a tile of the sheet: 8, 16, 24 or 32
taille 40 30 # the map, in tiles of that side
planche foret_16.png # the sheet, named for its side
solides 1-12 20 21 # the solid tiles of the sheet
grimpables 7 9 # the climbable tiles (ladders)
plateformes 3 4 # the platform tiles (landed on, crossed from below); one tag per tile
calque fond # a layer, bottom to top, 8 at most
0 0 5 6 6 7 0 0 … # 40 numbers per row, 30 rows
…
calque devant
0 0 0 0 32h 0 …
…
collision # optional
#.......................................
…
The sheet¶
A PNG whose name ends with _8, _16, _24 or _32: the side T of its tiles, in pixels. Its tiles are numbered from 1, in reading order, left to right then top to bottom, empty tiles included. Transparent pixels are holes (the console has no half-transparency in the background: a pixel is there or it is not).
The text¶
The first line is papydeck grille 1. Then, in any order, before the first layer:
| Line | |
|---|---|
tuile T |
the side of a tile of the sheet: 8, 16, 24 or 32 |
taille W H |
the map, in tiles of that side. In cells of 8 (W × T/8 by H × T/8), a map holds 80 × 60 to 256 × 128 |
planche <name>_<T>.png |
the sheet the numbers refer to |
solides … |
optional: the solid tiles, as numbers and ranges (1-12 20 21) |
grimpables … |
optional: the climbable tiles (ladder rungs), same syntax |
plateformes … |
optional: the platform tiles (top face only), same syntax; a tile is in one line at most |
Then each layer: calque <name> (lowercase, digits, _), followed by H rows of W numbers separated by spaces. 0 is empty; 5 is the 5th tile of the sheet; 5h, 5v, 5hv place it mirrored horizontally, vertically, or both (free on the console). The first layer is at the bottom.
Last, optionally, collision: the cells you walk on, with the signs of the console's .mask — # solid, = platform (top face only), H climbable (a ladder), a..o any set of faces (` + value: top 1, bottom 2, left 4, right 8; e = top + left) and . free, without spaces. Either one line per tile (H lines of W characters), or one line per cell of 8 (H × T/8 lines): the number of lines says which. Without a collision section, the collision comes from the tagged tiles: every cell where a solid tile is placed, on any layer, is solid; otherwise, where a climbable tile is placed, climbable; otherwise, where a platform tile is placed, a platform.
A # followed by a space starts a comment, to the end of the line, except on the lines of the collision. Every mistake is refused with its line and, when it is a cell, its column: line 41, column 4: “3z”: a tile number, 0 for none, with h, v or hv for a mirror.
Importing¶
A new map from a grid: Library, Maps, +, Or from a grid. Choose the text and its sheet together; the sheet summarises the grid (size, layers, collision), asks for the map's name and where the sheet comes from, and Create the map from the grid creates, fills and saves it.
Into an open map: Tiles tab, Import grid, the two files together. The inspector summarises the grid and names the levels drawn on the map, which will see the new drawing. Replace swaps the map's layers and collision for the grid's; the map must be the same size. Its tiles join the tile bar, deduplicated, mirrors included, and one stamp per tile of the sheet above 8. Terrain painting goes, and so do the decors placed on a layer the grid does not name. One Ctrl+Z undoes it all.
The sheet is cut into 8 × 8 base tiles within the console's budget of 704: a sheet that would overflow it is refused whole, with the count, and nothing is written. Its origin enters the map's sources like any import.
Exporting¶
Tiles tab: choose the side T, Export grid. You get <map>.txt and <map>_<T>.png:
- every layer is cut into blocks of T × T; the distinct blocks make the sheet, 16 per row, and a block that is the mirror of another reuses its tile with
h,vorhv; - placed decors are flattened onto their layer, as F would do;
- the collision goes out per cell of 8, with the five signs, the masks of the placed decors included (solid);
solidesnames the sheet tiles that contain a solid tile,grimpablesthose that contain a climbable one and no solid one,plateformesthose that contain a platform one and neither of the others;- terrains are not carried: their tiles are, their matter is not.
The export refuses only one thing: a map whose size is not a multiple of T/8 (a map 80 cells wide cannot be cut into tiles of 24). Exporting with T = 8 always works.