mapeditor / mapeditor/tiled

Fix image collection id gaps

Open
#3,864 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
12.9k
Forks
2k
Avg merge
4h 27m
Merged PRs (30d)
8

Description

**Is your feature request related to a problem? Please describe.**
Image collections are too bothersome to use because of tile id gaps, you need to remove them in order to index each tile. This must be done as build step (after tiled exports the tmj), or during startup.

**Describe the solution you'd like**
Tiled before 0.15 (according to the wiki), had consecutive ids. The feature was removed because there was no way to guarantee every map was loaded in order to update its tiles if I got it right. Discuss solutions/workarounds. I'm using a lua script which removes the gaps after exporting, I wouldn't mind a builtin solution along the lines. (Tiled script)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing how image collections are exported to TMJ and how tiles are loaded at startup, then compare the existing Lua workaround with those flows. Done requires an agreed approach for removing tile ID gaps during export or startup, but the issue does not choose one.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.