mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Suggested new behaviors for Erase Terrain (both of them) #3483

juanitogan posted onGitHub

This is related to (nullifies): https://github.com/mapeditor/tiled/issues/3126 https://github.com/mapeditor/tiled/issues/3379 point 2.

I believe all Erase Terrain buttons (map editor and terrain editor) should be removed. They are not obvious and, once noticed, are not immediately apparent as to what and why they are there. Here’s my proposal for how to remove them.

Map Editor

This is the easier one to rework. The toolbar needs another button for Terrain Eraser. Perhaps assign it to (U)n-brush, Shift+E or Shift+T; and/or maybe assign it to the right button when in T mode (similar to background/mask color in a paint program). The point is, promote the Terrain Brush like any other tool in a paint program by putting a Terrain Eraser next to it. The user selects one or the other... and not some weird sub-mode of the one. That way, they can keep their selected terrain brush when going into erase mode and back. The terrain palette should be treated exactly like a color palette. That is, a terrain is always selected (if there is one to select).

Terrain Editor

This is a bit hard to describe, so please bear with me. In short, when “tagging” tile “corners,” the first thing I tried for correcting a mistake was to click the tag again. This whole operation feels more like a toggle system than a painting system (even though, technically, it is exactly the same as pixel painting). I (embarrasingly) had to read the docs a few times over before I finally figured out the expected work pattern.

I suspect the reason why I want to treat this editor different than a paint editor is because it is more of a programming screen than it is a screen for artistic iteration. That is, your actions here are purely logical and tend to be done one terrain at a time (often also ignoring large parts of the tileset). Thus, my goal is to make this “programming” task as easy and as intuitive as possible.

Also, to quote part of https://github.com/mapeditor/tiled/issues/1729, I’m not the only one trying to click to correct:

There's no way to remove a single marking, only all colors on a single tile. I attempted clicking again, right clicking, middle clicking, ctrl+clicking etc.

One of the difficulties here is that the interface is currently biased towards the act of painting over tagged tiles with a new tag color. That’s fine, but the most common use case, however, is correcting mistakes (I believe). Thus, it is recommended to bias the interface for that instead.

Like the recommend change to the Map Editor, a terrain should always remain selected in the terrain palette, regardless of tag/erase mode.

My proposal is as simple as this: When the user clicks a tile corner, the state of what is found under that click sets the tag/erase mode. That is, if that corner is already tagged, remove it. If not, tag it. In short, treat each hot spot like a check box.

Okay, yes, the complexity is with click-and-drag tagging, along with multiple terrains to tag. For this, there are two options. As mentioned, my preference is that the tag/erase mode gets set by what’s under the mouse-down point. If no tag, then tag with the selected terrain (color). If there is a tag, then erase any other tags you drag over (regardless of color). I’ve used tools like this and they aren’t as odd as it might sound. The layer visibility and lock buttons in Aseprite come to mind. You can click and drag those on and off, depending on the state of the first one you mouse down on.

Thus:

  • If clicked corner == no tag, then mode = tag.
  • Else, {if clicked corner == any color, then} mode = erase.

Yes, the downside is that if you want to over-paint with new tags (instead of erase) you need to first click the one of the tags off and then click again to tag. That, or start your tagging from an area with no tag, if you can.

The other option is to expand the above actions a bit, like so:

  • If clicked corner == no tag, then mode = tag.
  • Else, if clicked corner == currently-selected color, then mode = erase.
  • Else, {if clicked corner == any other color, then} mode = tag.

While this second option sounds more sophisticated by allowing easy re-tagging, users will often find it unpredictable (unless they are crazy good at tracking which “color” is currently selected). In other words, erase mode can be either one or two clicks away, depending on the state of something they may not be looking at (which, surprise!, resets its state if you switch to another TSX tab and back). Thus, while it makes re-tagging easier (secondary use case), it risks making correcting mistakes more frustrating (primary use case). Yeah, best to stay away from this option. But, it’s here if you want to test it. And, who knows, testing may prove me wrong.

If the above two options fail (somehow), it would be helpful to at least give the Terrain Editor a mini toolbar with the same two buttons (essentially) as my proposed change to the Map Editor (but call them something different like Tag Pencil and Tag Eraser).


While you are in changing the toolbar, the Map Editor toolbar is a bit odd to to adapt to. I think most would “get” this picture quicker:

[dotted rectangle] [dotted irregular shape + wand] [globe+wand] ||| [stamper] [eraser] [eyedropper] [paintbucket] [filled rectangle] [filled ellipse] ||| [map+brush] [map+eraser]

Place the selectors before draw tools because you need to select before you can fill. Also, according to other programs, the Magic Wand in Tiled is a Magic Wand in contiguous mode, and Select Same Tile is a Magic Wand in global mode, so I suggested new icons to reflect that. Just looking for something better than the “touching Tetris” icon. Maybe replace the globe idea with a collection of dotted squares, depending on what fits. (paint.net uses a light bulb for contiguous and a rain cloud for global, if you like those ideas better.)

The eraser goes next to the stamper to give the stamper context as the main draw tool. I’m tempted to change the stamper to a pencil because stamper means clone (as in clone from drawing, not palette) but I get the stamper now after seeing how the multiselect in the tileset works with the tool. Could change icon to stamper+pencil but that’s probably going too far. Maybe consider calling it a Tileset Clone Brush, Tileset Stamper, Tileset Cloner, or Tileset somethingrather. Including “Tileset” in the name might help in understanding the different between Tileset tools and Terrain Set tools. But, this is a small thing.

Brush, not pencil, on the Terrain Brush icon.

The rectangle for the shape tool looks too much like a monitor (partly the glass-blue fill, partly the heavy outline, mostly the very low shadow). Both rectangle and ellipse should be top-level buttons because it is not likely other shapes will be needed like paint programs have (and if they are, find another solution when adding them). (I just now realized there was an ellipse [a.k.a. ”circle”] option.) Breaking this out follows the same logic as to why I did not suggest combining the Magic Wands into one tool.

Yeah, okay, Tiled’s eyedropper/tile-picker is assigned (as a momentary action) to the right mouse button in some modes. It would be useful to some as a tool as well (modifiable by Shift/Ctrl/etc. if you like). Shortcut might be pic(K)er (same as paint.net) or Shift+B. (Aseprite: eyedropper is both a selectable tool [I], and assigned as a momentary action to the Alt key.)

If you feel like you now have too many toolbar buttons, move the transform stuff to the menus (where it is usually found). Could be in either Edit or Map.


👎 for a separate Terrain Eraser. I think instead, the Empty terrain should just be listed as the 0th terrain in every Terrain Set instead of hidden somewhere away from the Terrains list. A Terrain is exactly what it is, and I think treating it as something separate just makes it harder for people to understand the Terrains feature. A possible exception would be in the Map Editor, those terrain sets where every tile that isn't completely Empty has no Empty markings - it wouldn't work meaningfully there anyway, so there's no reason to list it.

👍 for clicking a terrain again to clear it in Terrain Editing mode. However, I'd still like to have the Empty Terrain listed as a terrain I can use, both for easy drag-drawing, and for the reason above.

~ I think Magic Wand and Select Same Tile should be merged into a Magic Wand tool with Contiguous as a toggle. A similar toggle should be added for the Bucket Fill. The icon would just be the Magic Wand icon, recognizable from similar tools in other programs. Select Same Tile is infrequently needed IME, especially because it's a little too picky -"Ignore transformations" would be a handy option to add in addition to "Contiguous", both for Magic Wand and Bucket Fill.

~ I don't think the selection tools need to go before the other tools (you can fill without selecting anything), but I do think there should be a separator between them and the drawing tools. Better yet, I'd love to see each section of the toolbar be separately draggable or even fully customizable.

If you feel like you now have too many toolbar buttons, move the transform stuff to the menus (where it is usually found). Could be in either Edit or Map.

👎 I think you might misunderstand what the transform buttons do. They apply to your current brush, and are much more frequently needed actions in Tiled than in image editors. Also, the transform buttons are on the tool options bar, which is separate from the main toolbar.

Overall, I think Tiled's reliance on toolbar options makes for a good experience, and if some of the different tool options were broken out into separate tools, the UI would be overwhelming for new users - and even for some experienced ones. I think it's better to have to poke around than to be overwhelmed. That said, I do think it would be nice to have some way to customise the toolbar, ideally which would allow you to pin certain sub-tools like the different fill/selection shapes (but not, e.g. the flip actions, since those are one-off actions rather than tool behaviours).

posted by eishiya over 2 years ago

I'm not sure I fully understand your first paragraph. There is already a Terrain Eraser, so I'm not sure if you agree or disagree with my proposal, or want something completely different. For map editing, I am basically saying, relocate it to the toolbar and stop treating it as Terrain 0 so that users can go into erase mode ("color 2" if you like) without losing their selected ("color 1") terrain. While not everyone works like this, some do (I typically do until I learn the shortcuts -- which, if its a tool I use rarely, I never learn the shortcuts). Otherwise, the same argument for not having an eraser could be applied to any paint program... and, yet, we still have erasers (some set the eraser to color 2, some set it to mask/transparent).

Then again, yes, I do agree that, if nothing else, it would be better to have a Terrain 0 than the way it is. That was, indeed, one of my first thoughts: "That, given the way this currently works, there should be some sort of empty terrain listed as part of the terrain palette." It would be far less confusing that way. Better still, however, I think the paint programs set a better work pattern overall (with the caveat that paint programs let you add a transparent or background color to the palette, if you want, and I've suggested nothing similar here - other than permanently assigning Terrain 0 to the right mouse button, I suppose). If the idea a background terrain (or a "color 2" terrain) were in play, I could see this going different, but its not, and that's a can of worms I don't care to open.

As far as terrain set and terrain editing go, yeah, it's a whole different story.

you can fill without selecting anything

Well, yes, of course, I just didn't think I needed to be so explicit as to explain all workflows here. I was just merely trying to point out that most (all?) paint programs I've used put these first because that is the logical work order when using them. I see no difference here. Not something I care to dig into, just something I would rearrange if I were already changing other things on the toolbar.

👎 I think you might misunderstand what the transform buttons do.

You are completely correct that I misunderstood these. Thank you for the correction. That's what I get for making a side remark without proper research first. I picked up Tiled for the first time just a couple weeks ago and have been hitting it pretty hard to set up a lot of terrains and automaps. I have yet to use the map editor for anything other than testing all that. Also, I'm not using rotated or flipped tiles on this project and had completely forgotten about that use case. My mistake there. Thus, in light of all that, first, I personally didn't think the toolbar was too busy for them where they are. It was just a side comment, trying to think ahead. Second, now that I understand that they are not what they appear to be, I would recommend different icon art, but, more importantly, I would replace these four buttons with 2 toggles and a 4-button radio group, so that you always know where you are at, and how to get back: h flip, v flip; 0, 90, 180, and 270.

I've proposed breaking only one tool out into two, the shape tool, for an increase of one button. I don't think this will overwhelm anybody. Indeed, early paint programs had these broken out. Simple ones, like Irfanview, still do break them out, simply because (I imagine) it makes more sense than rolling up only two shapes into one button. Will Tiled ever really need more shapes? I did, however, also add a button for the Terrain Eraser, and another button for the Tile Picker (because it feels to be missing). I still don't think this overloads the toolbar. But, sure, options to hide what you'll never use is always best, but I'm less concerned about how to do that at the moment.

posted by juanitogan over 2 years ago

After trying to use Bucket Fill to change a global magic wand selection (Select Same Tile), I saw that Bucket Fill (as eishiya suggested) needs the same contiguous/global treatment as the magic wand. Thus, I now agree with eishiya that contiguous should be a modifier (toolbar toggle) on a combined Magic Wand (likewise with Bucket Fill). While I believe that a global magic wand is generally more useful in Tiled than in paint programs -- and, thus, a candidate for it's own tool -- it does seem a bit too much to consider doing the same thing to paintbucket as well. And, yet, they indeed should work alike.

(Side note: The Shift-key modifier used for global fill is not discoverable by mousing around the toolbar or menus, as such actions should be. I had to google it. [If nothing else, add such help to the tooltip... or bottom-bar context help.])

I also agree that the magic wand should have yet another modifier for including transformed matching tiles. This would be analogous to magic-wand tolerance/sensitivity modifiers in painting. And, if wanting yet another stretch goal, a layer/visible-layers[/image] modifier is also typical.

Thus, I'm now at suggesting three(ish) tools added to the main tool set (Terrain Eraser, Tile Picker, and Ellipse Fill [or change the Shape Fill icon to include both shapes]), and removing one (Select Same Tile). And... still a side topic to the main topic.

posted by juanitogan over 2 years ago

It should be noted that Erase Terrain in the map editor, as currently built, is not merely Terrain 0. No, some state is maintained and used (perhaps indirectly) about the last selected terrain brush when erasing. For example, if you paint some terrain with one brush, switch to another brush that uses the same center tiles as the first brush (much of my tileset is like this), Erase Terrain will then erase the first terrain as expected but with the edges of the second brush instead (which is handy in some use cases for adding different types of holes into the terrain). And, thus, it makes even more sense to always show the selected terrain brush while in the proposed Terrain Eraser mode/tool since it clearly affects the eraser in some cases.

posted by juanitogan over 2 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests