pixelkiln 0.118.0 → 0.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +6 -0
- package/docs/TILES.md +32 -1
- package/package.json +1 -1
- package/skills/pixelkiln/references/tiles.md +26 -0
package/CONTRIBUTING.md
CHANGED
|
@@ -48,6 +48,12 @@ PixelKiln can use, add an entry at the top of that list. The newest entry
|
|
|
48
48
|
shows its figures and code sample; earlier ones collapse to a short row. Show
|
|
49
49
|
only output from a real call, with the bill the docs record.
|
|
50
50
|
|
|
51
|
+
The `/tiles` terrain brush paints with the tile lookups in
|
|
52
|
+
`website/app/lib/brush-tilesets.ts`, generated from the locks under
|
|
53
|
+
`website/art/` by `npx tsx scripts/gen-brush-tilesets.ts`. Run it after a lock
|
|
54
|
+
or a set's wording changes, and add a set by adding it to the list at the top of
|
|
55
|
+
that script; do not edit the generated file.
|
|
56
|
+
|
|
51
57
|
Website sprites are generated from `website/art/pixelkiln.manifest.json`.
|
|
52
58
|
Treat those requests as paid work: run `plan` and `audit` first, use an explicit
|
|
53
59
|
hard budget, and commit the manifest, lockfile, and reviewed outputs together.
|
package/docs/TILES.md
CHANGED
|
@@ -171,7 +171,10 @@ The generic format is the lossless interchange contract:
|
|
|
171
171
|
- `format: "pixelkiln-tileset"` and `version: 1`
|
|
172
172
|
- atlas image, cell size, sheet size, and columns
|
|
173
173
|
- one ordered tile record with atlas id, original provider `sourceIndex`, role,
|
|
174
|
-
rectangle, optional bitmask, and `stampOnly`
|
|
174
|
+
rectangle, optional bitmask, and `stampOnly`. A `terrain` tile finds its
|
|
175
|
+
corners by role: its role may end in a number of the provider's own
|
|
176
|
+
(`tile-06-wang-0`) that is not its place in the list, and a set exported by an
|
|
177
|
+
older version put rules on the wrong tiles, so export it again
|
|
175
178
|
- normalized rule type, arity, connectivity, terrain names, and masks
|
|
176
179
|
- the complete raw provider rule object in `providerRules`, including rule
|
|
177
180
|
families a current exporter does not yet normalize
|
|
@@ -309,6 +312,34 @@ layout and with no origin both visibly wrong. CI's headless Godot reads
|
|
|
309
312
|
The Tiled offset follows Tiled's documented drawing rule and has not been
|
|
310
313
|
loaded in Tiled.
|
|
311
314
|
|
|
315
|
+
### Building kits
|
|
316
|
+
|
|
317
|
+
A `tiles` asset with `tileFeature: "building"` returns separate pieces (floor,
|
|
318
|
+
walls, corners, pillars, doorways, stairs, solid blocks), not a corner or edge
|
|
319
|
+
mask per tile. Its rules are a `composed` family: `providerRules.parts` in the
|
|
320
|
+
generic file names each piece's index and `stack_stride_px` the height of one
|
|
321
|
+
level. No engine exporter maps it, so the generic file is the output, and a
|
|
322
|
+
scene is built by placing pieces by cell and height.
|
|
323
|
+
|
|
324
|
+
What a kit's pieces share, measured on the stone-hall kit (52 by 58 cells):
|
|
325
|
+
|
|
326
|
+
- The floor diamond is at the same place in every piece, here its top left at
|
|
327
|
+
(10, 37), so a piece for cell (x, y) at level z is drawn with that point on
|
|
328
|
+
`((x - y) * 16, (x + y) * 8 - z * 16)`. Draw back to front by `x + y`, then z.
|
|
329
|
+
- `footprint` in the generic file is the diamond of the tile with the most
|
|
330
|
+
opaque pixels, which for a kit is a wall, not the floor. Take the anchor from
|
|
331
|
+
the floor piece.
|
|
332
|
+
- A level is `stack_stride_px` (16). A solid block is two levels high; there is
|
|
333
|
+
no half-height block, so one can be made by cutting 16 rows from the middle
|
|
334
|
+
of a block.
|
|
335
|
+
- Stairs come in pairs that each climb a level between them (pieces 40 and 41
|
|
336
|
+
climb north), so a two-level rise is two pairs, the upper pair on half blocks.
|
|
337
|
+
The east pieces (42 and 43) are a smooth ramp, not steps.
|
|
338
|
+
|
|
339
|
+
`website/art/pixellab-isometric/compose-hall.py` places the kit into a hall of
|
|
340
|
+
three tiers with a side room, from the generic export. It is the page's example,
|
|
341
|
+
and a starting point for an importer.
|
|
342
|
+
|
|
312
343
|
## LDtk
|
|
313
344
|
|
|
314
345
|
The `.ldtk` export is a whole project file: open it in LDtk 1.5 and the set is
|
package/package.json
CHANGED
|
@@ -147,6 +147,32 @@ re-baselines the whole bundle, so read the difference first.
|
|
|
147
147
|
|
|
148
148
|
Export never changes source PNGs or the lockfile.
|
|
149
149
|
|
|
150
|
+
### Building kits
|
|
151
|
+
|
|
152
|
+
`tileFeature: "building"` returns separate pieces (floor, walls, corners,
|
|
153
|
+
pillars, doorways, stairs, solid blocks) with a `composed` rule family, which no
|
|
154
|
+
engine exporter maps: export `generic` and place the pieces by cell and height.
|
|
155
|
+
`providerRules.parts` names each piece's index; `stack_stride_px` is one level.
|
|
156
|
+
Facts that held for the stone-hall kit, to check on another before relying on them:
|
|
157
|
+
|
|
158
|
+
- Every piece has its floor diamond in the same place, so a piece for cell
|
|
159
|
+
(x, y) at level z is drawn with that point at `((x - y) * fw / 2, (x + y) *
|
|
160
|
+
fh / 2 - z * stride)`, back to front by `x + y`, then z. Take the anchor from
|
|
161
|
+
the floor piece: `footprint` is the diamond of the tile with the most opaque
|
|
162
|
+
pixels, which in a kit is a wall.
|
|
163
|
+
- A solid block is two levels high and there is no half block: cut 16 rows from
|
|
164
|
+
the middle of one.
|
|
165
|
+
- Stairs are pairs that climb a level between them (40 and 41, north), so a
|
|
166
|
+
two-level rise is two pairs with the upper one on half blocks. The east
|
|
167
|
+
pieces (42, 43) are a smooth ramp.
|
|
168
|
+
- Do not sink a full block to support stairs: its lower half shows below the
|
|
169
|
+
floor.
|
|
170
|
+
|
|
171
|
+
`website/art/pixellab-isometric/compose-hall.py` is a working example (a three-tier
|
|
172
|
+
hall with a side room). Look at the render before calling a layout done: the
|
|
173
|
+
back walls hide anything behind them, so put doorways and ramps on the open
|
|
174
|
+
front, not in a wall that faces away.
|
|
175
|
+
|
|
150
176
|
### Merging connected sets
|
|
151
177
|
|
|
152
178
|
Without a flag each set exports as its own two-terrain tileset. In an engine
|