ludic/docs/language/tiled/tiled-cell_x.md
Orkuncakilkaya 78a5719fae
All checks were successful
bootstrap / cfree-fixpoint (push) Successful in 21s
ci / build-and-test (push) Successful in 1m59s
commit-lint / conventional-commits (push) Successful in 4s
docs / build-and-deploy (push) Successful in 28s
feat(engine): Tiled P5 — image/group layers, iso/hex/staggered coords, Wang (#73)
- Image layers: <imagelayer> renders with parallax + optional repeatx/repeaty
  tiling across the view; the image loads relative to the map file. Group layers
  flatten at build (children render in file order); layer offset/opacity/tint are
  queryable (Tiled.layer_kind / layer_offsetx / layer_offsety / layer_opacity /
  layer_tint), a group's tint applying recursively.
- Orientation transforms: Tiled.cell_x / Tiled.cell_y compute a tile cell's
  screen position for orthogonal, isometric ((x-y)*tw/2, (x+y)*th/2), staggered,
  and hexagonal (rows step by (tileh+hexsidelength)/2, alternate rows shoved per
  staggerindex) — the tile draw now places cells through them.
- Wang: exported Wang-set GIDs are ordinary GIDs and resolve through the standard
  GID resolver; the terrain-corner authoring concept is editor-side (design cut).

Proven by library/tiled_p5.ludic (14 assertions) over the real
isometric_grass_and_water.tmx (iso + Wang) and hexagonal-mini.tmx, plus a
hand-authored image+group fixture. x test: 96 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-01 15:14:36 +03:00

533 B
Raw Blame History


id: tiled-cell_x name: Tiled.cell_x category: tiled kind: namespace-method tokens: Tiled.cell_x sig: Tiled.cell_x(map, x: int, y: int) -> int tip: The screen x of a tile cell for the map orientation. order: 30 ns: Tiled member: cell_x

Returns the screen x (before the camera) of tile cell (x,y) under the map's orientation: orthogonal x·tilew, isometric (x−y)·tilew/2, staggered/hexagonal x·tilew with alternate rows shoved half a tile per staggerindex.