mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.04k stars 1.75k forks source link

Automap does not work correctly for staggered maps #3089

Open eishiya opened 3 years ago

eishiya commented 3 years ago

(This is a known problem, but there did not appear to be an issue open for it. Now there is.)

Automapping only works correctly for orthographic and non-staggered isometric maps. Automapping should take staggering into account and work for all supported orientations.

Supporting multiple orientations would open up some UX issues:

For all of these, I suppose the answers should be consistent with whatever is done when attempting to paste across maps with different orientations.

Tiled has some issues with different stagger values (e.g. #2874), those should probably be tackled first to avoid those bugs propagating into Automap.

bjorn commented 3 years ago

Automapping does work on isometric maps, so I've adjusted the title. Only the staggering breaks the matching.

When using right-click-drag to capture an area from a staggered map, you can paint with this brush anywhere without problems. This works because the Stamp Brush adjusts the stamp based on the location where it is used. But this adjustment is implemented only there, so it's broken for the fill tools for example (you get the same pattern only half of the time). Maybe the adjustment could be factored out of the Stamp Brush, so that it could be reused also by the fill tools and the Automapping.