Tiled P3 — animated tiles (→ SpriteAnim) + tile objects #71
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#71
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 P3 of the Tiled design (#66). Design record: Design: Tiled maps §3.4.
Scope — animated tiles + tile objects
<animation>'s<frame tileid= duration=>list onto the existing SpriteAnim engine-owned system (the compiler already auto-ticks SpriteAnim each frame). An animated GID resolves to a SpriteAnim cursor; frame = f(elapsed), deterministic, ticks for free.gidrender the tile image (with their own flip flags) as a placeable/rotatable sprite.Golden fixtures
rpg/island.tmx+beach_tileset.tsx(33<animation>blocks / 131<frame>s);sticker-knight/(tile objects with flip flags).Acceptance
Depends on #69. Priority medium.
P3 landed in
main(58e1105).<animation>'s{tileid, duration}frames advance as a pure function of the fixed 60/s engine frame counter (the same clock SpriteAnim rides):elapsed ms = frame * 1000 / 60, walked across the frame durations to the current one. An animated GID resolves at draw to the current frame's GID with its flip flags preserved — deterministic, frame-identical across runs, ticks for free.Tiled.frame_gid(map, gid, frame)/Tiled.animated(map, gid)expose it;Tiled.draw_anim(map, camx, camy, frame)draws a map with animations advanced (passTime.frame).giddraw the tile image (with their own flip flags), bottom-anchored at the object position, as placeable sprites;tmap_draw_fullrenders object layers alongside tile layers.Acceptance
frame_gidat 0/100/200/300 ms hits local 0/40/80/0 (wrap), and the flip flags ride an animation swap.Also validated against the design's named fixture
rpg/beach_tileset.tsx(33<animation>blocks / 131<frame>s). Proven byexamples/library/tiled_p3.ludic(14 assertions) inx test(94 passed).