Tiled P4 — object layers (shapes + text), custom properties/types, templates → opt-in spawning #72
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#72
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 P4 of the Tiled design (#66). Design record: Design: Tiled maps §3.8–3.9.
Scope — objects, properties, templates
<ellipse>,<point>,<polygon>,<polyline>,<text>(font/size/style/align).string/int/float/bool/color/file/objectscalars;class/enum resolved via the project custom-type table (.tiled-project/objecttypes.xml). Exposed viaTiled.prop(...)..tx/.tj): external reusable object defs with optional embedded tileset.class+ properties map to a Ludic archetype/components (dovetails with the controllers roadmap #57–#61). Off by default; no gameplay coupling in the core load.Golden fixtures
orthogonal-outside.tmx(shapes,probability, colour prop);perspective_walls.tsx(per-tile bool props,<tileoffset>);examples.tiled-project+objecttypes.xml(custom types);sticker-knight/templates/*.tx; hand-authored<text>fixture (design §4).Acceptance
class/enum properties resolve against the custom-type table.Depends on #69. Priority low.
P4 landed in
main(b8c71d2).Tiled.object_count,Tiled.object,Tiled.object_shape, andTiled.prop/Tiled.prop_int/Tiled.prop_typeover any object / tile / layer / map.Tiled.load_typesreads anobjecttypes.xmlproject custom-type table so a class property resolves its default; enum values resolve as strings.Tiled.templatereads a.tx/.tj, andTiled.loadmerges each object'stemplatereference under the instance's overrides (field inheritance).Tiled.spawn/Tiled.spawn_layermap an object's class + properties onto Ludic components through the reflection ABI (Position from x/y, each property → a like-named field). Off by default — no gameplay coupling in the core load; split intotiled_spawn.ludic, spliced only for a Tiled game so a plain map-reading tool never links against the world table.Acceptance
object_shapeclassifies rectangle/ellipse/point/polygon/polyline/text; polygon points + text content read from the tree.class/enum properties resolve against the custom-type table — an object with nohpgets theEnemydefault (10); with an override, 99.type=Enemyandhp=25fromp4_enemy.tx.Enemyfrom an object setsPosition.xandHealth.hpfrom the object.Also validated against the design's named
orthogonal-outside.tmx(ellipse/point/polygon/2×polyline). Proven byexamples/library/tiled_p4.ludic(18 assertions) inx test(95 passed).