Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Selected Tile Preview to "Shape Fill Tool", just like the "Stamp Brush" has #3890

Open
VideoGirlAi opened this issue Feb 16, 2024 · 6 comments
Labels
feature It's a feature, not a bug.

Comments

@VideoGirlAi
Copy link

Is your feature request related to a problem? Please describe.
I like using the rectangular paint in tilemap editors. It allows for easier control and, also, in Tiled, the rectangular Shape Fill Tool properly repeats the pattern of multiple-selected-tiles when drawing, unlike the Stamp Brush.
But, there's a big problem with the rectangular paint ("Shape Fill Tool") in Tiled: you cannot see a preview of what tiles you have selected.
The default free-draw tool ("Stamp Brush") has a preview of selected tiles that follows the cursor; the Shape Fill Tool does not have this, and therefore you cannot see if the tiles are rotated or mirrored until after painting them. You also have no visualization of how the tiles will be placed down on the map without any preview.

Describe the solution you'd like
Just like the Stamp Brush, it'd be great if the Shape Fill Tool could have a selected-tiles preview that follows the cursor. Perhaps this could be resolved by reusing Stamp Brush preview code for the Shape Fill Tool? (I'm not sure, as I am not really a programmer).

Describe alternatives you've considered
There are no alternative solutions, aside from just dealing with the confusion that having no preview creates, or using Stamp Brush instead of Shape Fill Tool, neither of which are ideal.

I truly believe that implementing a preview for the Shape Fill Tool would improve user experience.
Thank you for reading my request.

@VideoGirlAi VideoGirlAi added the feature It's a feature, not a bug. label Feb 16, 2024
@eishiya
Copy link
Contributor

eishiya commented Feb 16, 2024

Previews in Tiled mean that when you click/commit, that's what you'll get. The Shape Fill Tool already shows the shape you're drawing and how the tiles in your brush fill it, while you're drawing the shape. Showing your brush while not drawing a shape would be inconsistent with all other preview behaviour, since it would be previewing something that isn't what would be drawn when you click/commit.

If you're not seeing ANY preview at all, even while drawing the shape, that sounds like a bug. There should be a preview:
image
If that's the case, please state which Tiled version you're using and how you obtained it, and your OS.

@VideoGirlAi
Copy link
Author

Previews in Tiled mean that when you click/commit, that's what you'll get. The Shape Fill Tool already shows the shape you're drawing and how the tiles in your brush fill it, while you're drawing the shape. Showing your brush while not drawing a shape would be inconsistent with all other preview behaviour, since it would be previewing something that isn't what would be drawn when you click/commit.

I see what you mean by how the preview would be different from the shape being painted. I personally would still love to be able to see what tiles I'm about to paint though, even if it's not going to be the same shape; the tiles themselves will still be the same after all.
Due to having no cursor preview, rectangle paint in Tiled doesn't feel as good as map editors like Godot's editor that previews the tiles for rectangle paint (but I have many issue with Godot's editor, too, which is why I'd like to use Tiled). The fact that the tiles must be painted to know what you're putting down feels unintuitive. Even RPG Maker at least shows a white outline for the amount of tiles selected, while Tiled shows zero preview whatsoever.
This is possibly just a problem with how my brain works, as I am quite forgetful, so I could select multiple tiles, then some seconds could pass, and then I'm unsure if I'd rotated the tiles or not, for example.

@eishiya
Copy link
Contributor

eishiya commented Feb 16, 2024

I agree, some sort of indication would be nice. Even while making the screenshot for my post, I felt it was a bit disorienting that there was nothing. However, this preview should be visually distinct from the "real" preview, to avoid confusion, since it's not previewing tiled-to-be-painted.

Such a preview would be particularly useful for aligning larger stamps with existing tiles, since it would show you how the shape would align relative to where you'd start drawing the shape.
I wonder how this secondary preview should work in Random mode though?

@VideoGirlAi
Copy link
Author

VideoGirlAi commented Feb 16, 2024

I wonder how this secondary preview should work in Random mode though?

Showing an outline for the total size of selected tiles could be a potential solution for a random tile preview:

snapshot_2024-02-15_(20-13-26)

The white square outline in the above image is what I'm referring to. It follows the cursor around.

@eishiya
Copy link
Contributor

eishiya commented Feb 16, 2024

Aye, that makes sense for regular mode where the shape is filled with your whole brush. But Random mode fills the shape with random tiles from the brush, so the effective brush size is 1 tile. I worry that showing the full brush, whether as a preview or as a rectangle, would be confusing in that case. Perhaps showing a 1x1 rectangle would be fine.

If the preview shows the actual tiles though, that would make showing random mode more challenging, since it would have to either show the whole brush, or pick a single random tile from it, both of which are misleading. Maybe showing all the tiles superimposed would work to indicate random mode in that case.

@VideoGirlAi
Copy link
Author

VideoGirlAi commented Feb 16, 2024

Aye, that makes sense for regular mode where the shape is filled with your whole brush. But Random mode fills the shape with random tiles from the brush, so the effective brush size is 1 tile. I worry that showing the full brush, whether as a preview or as a rectangle, would be confusing in that case. Perhaps showing a 1x1 rectangle would be fine.

If the preview shows the actual tiles though, that would make showing random mode more challenging, since it would have to either show the whole brush, or pick a single random tile from it, both of which are misleading. Maybe showing all the tiles superimposed would work to indicate random mode in that case.

As far as I understand it, with Random Mode toggled on while using Shape Fill Tool, you still select tiles from a set size (even with ctrl + left-click in the Tile Selection window and selecting tiles far apart from one another, the empty area in-between tiles still remains, effectively making it still a rectangle selection), so I think the outline preview could still work.
EDIT: I just tested with Circle Fill too: when right-click-selecting a group of tiles, you select in a rectangular fashion. So even in Circle mode, the selection itself seems to be a rectangle.

Another idea could be showing one of the random tiles with some symbol by it, like the dice icon in the corner of the preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

No branches or pull requests

2 participants