Tilemaps, Tiles: Collision scale per tile, merged with the neighbours (#140); check total 1042

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
adminandClaude Opus 5 committed 2026-09-18 15:00:07 +02:00
1 parent d7092c1803
commit e5e9f6533b
4 files changed
+21 -3

No files matched your search

+1 -1
@@ -61,7 +61,7 @@
```
web/index.html Vite source page (dev) index.html built page (generated, served)
src/core/model/ Project (object holders), Asset + AssetTypes, SceneObject, Properties (value types), hierarchy, walk (generic parent/child walks), instance (container content resolved from its template), usages (where an asset is used), container (the cycle guard), placement (what may be dropped where), texture (frames and the slice grid), tile (the three kinds and their block shapes, reading a tile's pictures, the animation step), autotile (which quarter tile a neighbourhood asks for, the 47/16 tiles a block produces, 1 for a plain tile), tilemap (the cells of a layer, which neighbours a cell is joined to, the cells a stroke or a rectangle covers), tilemapCollision (the solid cells of a map merged into rectangles, and where one sits in the world), animation (which frame at time t, a row's value there, what a row may aim at, the players on an object; KeyRef and its lookups) + animationPreview (the root at a frame, written into copies), graphLookup (what a graph sees of the project: behaviors to run, state machines to read), Scope (where a state machine's current state lives: per instance or one for the run — variables are shared by living on a Variables asset instead)
src/core/model/ Project (object holders), Asset + AssetTypes, SceneObject, Properties (value types), hierarchy, walk (generic parent/child walks), instance (container content resolved from its template), usages (where an asset is used), container (the cycle guard), placement (what may be dropped where), texture (frames and the slice grid), tile (the three kinds and their block shapes, reading a tile's pictures, the animation step), autotile (which quarter tile a neighbourhood asks for, the 47/16 tiles a block produces, 1 for a plain tile), tilemap (the cells of a layer, which neighbours a cell is joined to, the cells a stroke or a rectangle covers), tilemapCollision (the solid cells of a map, drawn in or out by their tile's collision scale and merged into rectangles, and where one sits in the world), animation (which frame at time t, a row's value there, what a row may aim at, the players on an object; KeyRef and its lookups) + animationPreview (the root at a frame, written into copies), graphLookup (what a graph sees of the project: behaviors to run, state machines to read), Scope (where a state machine's current state lives: per instance or one for the run — variables are shared by living on a Variables asset instead)
src/core/properties/ PropertySchema, kinds (one row per value kind), listItems (an item's kind, read off its value), resolve (the only override merge), deviation (what is gold), collider/camera/bounds geometry, aspect, enabled, editorRun, assetRef/textureRef (how a reference reads), declaredRows (the row a Property node declares in a shader or particle graph, and the params that node has in both)
src/core/commands/ undoable commands, CommandStack, SetBagValueCommand base, RenameCommand base (undone by renaming back: variable, struct field, port), one import command shape for texture/font/sound, require.ts (validated lookups, and what an instance may not change), naming.ts
src/core/graph/ graph model, NodeRegistry/NodeContext/values, interpreter, dropTarget, nested (behaviors as nodes),
+1 -1
@@ -12,7 +12,7 @@ npm run check # typecheck + lint + format:check + tests, the gate CI runs
# code is lost (tail's is reported), so a red run reads as green
npm run build # writes dist/ and regenerates index.html
./build.sh # the same under `set -o pipefail`, for callers that pipe the output
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1040 editor checks, screenshots in /tmp/gm-e2e-*.png
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1042 editor checks, screenshots in /tmp/gm-e2e-*.png
GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step
./e2e.sh start [GM_STEPS] # the same run detached, see below
./e2e.sh status # live progress, or the last run's result
+15
@@ -138,6 +138,21 @@ The blocking cells are merged into rectangles, row by row, so a wall of twenty c
rather than twenty. In the scene view they are outlined the way a collider is, green and above the
drawing; the game view does not show them.
### Collision scale
A tile's **Collision scale** (1 by default, 0.1 to 2) makes its cells block less or more than
their square (#140) — below 1 for a bush or a thin pillar the hero may come closer to, above 1 to
keep it further off. The box is drawn in or out **only on the sides without a blocking
neighbour**; towards a blocking cell the side stays flush, whatever value that cell has. So a
wall of bushes at 0.5 is one narrower wall, not a string of beads with gaps to slip through.
- The inner corner of an L closes cleanly: the drawn-in upright runs down into the drawn-in foot,
which can take one rectangle more than at 1.
- Cells that meet only at a corner are not joined — that corner stays drawn in.
- Where two layers hold a solid tile on the same cell, the larger scale counts.
The outline in the scene view shows the drawn-in or grown shapes.
In the running game the placed map is a **body of its own** in the collision system:
- **Move** with *Collide with solids* stops at it and slides along it, like at a solid collider.
+4 -1
@@ -59,8 +59,11 @@ asks for; a picture that does not fit is kept and named, never silently dropped.
Ping-pong turns on the last picture, so 0 1 2 1 rather than 0 1 2 2 1.
- **Solid** — off by default. A solid tile blocks movement wherever it is painted, on every map and
every layer (#132); see [Tilemaps](Tilemaps#collision).
- **Collision scale** — 1 by default. How big a solid cell blocks against its square, drawn in or
out only on the sides without a blocking neighbour (#140); see
[Tilemaps](Tilemaps#collision-scale).
Kind, rate, playback and the solid switch are ordinary properties, so the inspector shows them like any other asset's
Kind, rate, playback, the solid switch and the collision scale are ordinary properties, so the inspector shows them like any other asset's
— undo, defaults and the gold mark for a non-default value come for free.
## The tab