Properties on polyline nodes
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
As requested on the forum, it would sometimes be useful to be able to associate arbitrary data with the nodes of a polygon.
The information could be stored as follows in the TMX format:
<object id="5" name="guard" type="NPC" x="22" y="361">
<polyline points="-3,120 87,91 154,96 181,16 273,-1">
<node index="2">
<properties>
<property name="foo" value="100"/>
<property name="bar" value="200"/>
</properties>
</node>
</polyline>
</object>
For the implementation though, it will be a little complicated because the nodes in a polygon are just floating-point coordinates, whereas everything that can have properties derives from Tiled::Object. And deriving polygon nodes from that class would of course bloat the storage requirements for a polygon, unless the properties would be stored in some other way (but that adds complexity to the Properties view).
It may be that this use-case is better solved by connecting objects (#707).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TMX example and the issue's description of polygon nodes, Tiled::Object, and the Properties view; no files or tests are named. Compare storing node properties with the connecting-objects alternative in issue #707, then establish the storage and UI approach before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100