Tiled P2 — collision & grid: per-tile hitboxes / properties / layer → esys_move #70
Labels
No labels
area:ci
area:docs
area:input
area:net
area:rendering
area:repo
area:stdlib
area:tooling
area:types
cleanup
dx
priority:high
priority:low
priority:medium
proposal
status:in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: workshopsoft/ludic#70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up P2 of the Tiled design (#66). Design record: Design: Tiled maps §3.5.
Scope — collision & grid integration
Make loaded maps drive collision. Normalise three sources into the existing
Solids{tile,wall,oneway}feed foresys_move(runtime/native/systems_move.ludic), in priority order (design §3.5):<objectgroup>hitboxes (rect/ellipse/polygon/point) — the precise source;solid,oneway,trigger) on tile/tileset;Keep
Grid.*/Path.*(runtime/native/grid.ludic) working over the loaded map via the P1 compatibility projection.Golden fixtures
Hand-authored per-tile
<objectgroup>fixture (official examples lack it) + a property-convention fixture (design §4).Acceptance
esys_movemovers correctly.Solidsfeed.Path.a_starover the loaded map matches the hand-authored-map baseline.Depends on #69. Priority medium.
P2 landed in
main(0cb5777).Normalises three collision sources into the byte tilemap
esys_move/Grid.*/Path.*read, in the design's priority order (§3.5):<objectgroup>hitboxes (Tiled.tile_shapes) — the precise source;solid/oneway/triggerbool property convention (Tiled.collision_kind);Tiled.project), the fallback source, applied automatically on load.Tiled.collide(map, layer)drives collision from a visual layer's per-tile metadata alone (a tile with no collision metadata stays passable).Tiled.collision_kindclassifies a GID (0none /1solid /2one-way /3trigger) from its metadata; the projection adds the collision-layer fallback.Grid.*/Path.*keep working over the loaded map via the P1 projection.Acceptance
esys_movemovers correctly — an<objectgroup>-floor (Tiled.collide) stops a falling Body at the tile top.Solidsfeed — acollisionlayer of plain tiles (fallback) and apropslayer ofsolid-property tiles hash byte-identically.Path.a_starover the loaded map matches the hand-authored-map baseline —grid_maze.tmxgives path len 8, (1,1)→(6,3).Proven by
examples/library/tiled_p2.ludic(14 assertions) inx test(93 passed).