You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Image Layers (with repeat X/Y, or with oversized images), or when using oversized tiles, the contents of a map can be much larger than its bounds, causing it to get in the way of other maps in its World. Even when editing such a map without other maps visible, this overspill can misrepresent the map, since in most cases, engines will only show in-bounds content.
Proposal
A View option to crop the map contents to the map bounds. This should affect at least Image and Tile layers, where it should be relatively straight-forward.
Objects
For Object Layers, the situation is trickier - Objects don't usually get in the way as much, and it's often desirable to see when an Object is out of bounds even when other layers are clipped and indeed, clipping the other layers may be desirable to help see such Objects better. But, games that use Objects decoratively may also want to clip them to the map bounds. Perhaps there should be a separate View option for Objects, with three options: Show All, Clip to Map Bounds, Hide Out of Bounds. The difference between the latter two would be in how Objects that straddle the map boundary are displayed - clipped, or shown in full. If clipping Objects to map bounds is too complicated, then an option to hide Objects that are completely out of bounds would be fine.
Other concerns
The rectangular bounds can be used for non-orthographic maps.
Parallax should be calculated before the crop, so that parallax cannot cause the map's visuals to extend beyond its bounds.
Infinite maps don't have defined bounds, but clipping is still useful for those. Infinite maps should be clipped to the bounds Tiled displays for them, i.e. some multiple of the 16x16 chunks Tiled uses internally.
These options should not be tied to Worlds, as clipping map contents can be useful even in stand-alone maps.
Maps with foreground parallax layers have larger bounds than their "actual" bounds, and users may want to clip to a smaller rectangle than the map bounds. Even if per-layer sizing is added, the map size would probably be the largest of those layers rather than an arbitrary size (which would be convenient for Tiled map loaders, since it would give them a maximum tile layer size right away), then per-layer sizing won't solve the problem of foreground parallax making the clipping region too large. Clipping to the layer bounds also wouldn't help. To accomodate maps with foreground parallax, it would help to have a clipping rect property on the map which, if not set, is the same as the map's current bounding area. The reason it should be a rect rather than a size is to accommodate infinite maps, but it would be useful for some finite maps with "margin" areas too.
The text was updated successfully, but these errors were encountered:
Problem
When using Image Layers (with repeat X/Y, or with oversized images), or when using oversized tiles, the contents of a map can be much larger than its bounds, causing it to get in the way of other maps in its World. Even when editing such a map without other maps visible, this overspill can misrepresent the map, since in most cases, engines will only show in-bounds content.
Proposal
A View option to crop the map contents to the map bounds. This should affect at least Image and Tile layers, where it should be relatively straight-forward.
Objects
For Object Layers, the situation is trickier - Objects don't usually get in the way as much, and it's often desirable to see when an Object is out of bounds even when other layers are clipped and indeed, clipping the other layers may be desirable to help see such Objects better. But, games that use Objects decoratively may also want to clip them to the map bounds. Perhaps there should be a separate View option for Objects, with three options: Show All, Clip to Map Bounds, Hide Out of Bounds. The difference between the latter two would be in how Objects that straddle the map boundary are displayed - clipped, or shown in full. If clipping Objects to map bounds is too complicated, then an option to hide Objects that are completely out of bounds would be fine.
Other concerns
The text was updated successfully, but these errors were encountered: