The mask labels under the tile preview sat inside the zoomed board.
Pixi rendered them at 10 px and stretched them with the zoom, and
each label was shrunk to the width of its tile on its own. They came
out blurry and in different sizes. The example map also only showed
a ring, so narrow paths and crossings were never previewed.
- The labels live in their own layer in screen space and are
re-rendered at the fitting font size on every zoom.
- All labels share one size, at most the 10 px of the theme. Below
6 px they are hidden.
- A label has two lines: the sides on top, the corners dimmed below.
- The example map keeps the ring cell for cell and adds a network of
1 tile wide paths below it. It has straight 1xN and Nx1 pieces,
curves, two T junctions, a crossing and a dead end.
- The map stands next to the grid in a wide panel and below it in a
tall one. Fit picks the layout with the larger tiles, and only Fit
changes it, so zooming does not make the board jump.
- The new hook __gm.tile.captions() reports size, scale and lines.
Found on the way: the taller map made Fit zoom out further, and 3
pixel checks on the 16 px terrain tiles failed. The side by side
layout fixed that.
Tests:
- ./check.sh: 160 files, 2364 tests, CHECK EXIT 0 (was 2363).
- e2e 39: ALL PASSED, 29 checks (was 28).
- New unit test: the example map has straights, a curve, a crossing
with four notched corners, a T junction and a dead end.
- Counter check: with the labels back in the zoomed board the new
caption check fails (scales [0.648, 1]).
- The e2e sum in the README is now 1381. It is calculated only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sheets such as "TD - Tileset - Plains" draw an autotile as a 6 x 4
block: a 3 x 3 nine-slice, a vertical and a horizontal strip and a
single tile on the left, the inner corners on the right. The floor
kind only knew the RPG Maker 2 x 3 layout, so these sheets could not
be used as autotiles at all.
- New TileKind "terrain" with 16 px tiles in a 6 x 4 block. All 47
neighbour combinations are resolved per quarter, so the renderer,
the collision and the palette stay untouched.
- Whole tiles are used where the sheet draws them: the 16 side cases,
the four single notches and the two diagonal pairs. Hand-drawn
strips and single blocks therefore look as drawn.
- Only the missing cases are composed, for example an edge with a
notch or two notches side by side. They take the side tile and put
the notch quarters in.
- A notch also takes the quarter above or below from its notch tile
when fill would stand there. Tall cliff notches keep their wall.
On ground and stones fill meets fill, so nothing changes there.
- The label rule for floor and terrain now runs through one notch
function. Floor still passes the MZ table test.
Not touched: the tile board only refits on open and on Fit. Switching
an open tile to a kind with another tile size leaves it small until
Fit is pressed. That was the case before.
Tests:
- ./check.sh: 156 files, 2290 tests, CHECK EXIT 0 (before 2283).
- e2e 39,40: ALL PASSED, 90 checks (before 86). 39j checks 47 tiles,
pixels of single, notch, pair and composed tiles, and undo to floor.
- Counter-checks: without whole notch and pair tiles one unit test
and one e2e check fail. Without the taken quarter one of each
fails. Originals restored by cmp and rebuilt.
- Check sum: 1363 measured by CI plus 4 is 1367, computed only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>