tiled icon indicating copy to clipboard operation
tiled copied to clipboard

having flip and rotate parameters available in random mode

Open GrimmDingo opened this issue 11 years ago • 10 comments

options for random mode to include rotation and flipping parameters? preferably with toggles to turn on or off which parameters you wanted to randomize ie rotation on/off flip on/off and not sure if an option for randomizing tiles would strictly be a necessary and be more an automatic thing if multiple tiles are selected,

also a note, keeping as is but allow the selection of flipped or rotated tiles to factor in to the randomized tile palette won't really be an option, because you can't select rotated or flipped tiles from the tileset window.

GrimmDingo avatar Aug 01 '12 04:08 GrimmDingo

Well as a first workaround, do not select the tiles in the tilesetview, but on the map. Just have some area where you select your random stamps, similar to a painters colour palette.

Then you can have rotated/flipped tiles as much as you want in random mode.

stefanbeller avatar Aug 03 '12 20:08 stefanbeller

oh cool okay cool, thanks for the tip, actually that offers a level of control via only having certain angles of flipping/rotating selected, if an option is to be added added I'd suggest adding sub options ie mirror with X □ Y □ tick boxes, the program is quite intuitive, much faster workflow than alot of editors I've tried in the past, and it's feature richness is a massive benefit, kudos to you guys actively dev'ing it

GrimmDingo avatar Aug 03 '12 20:08 GrimmDingo

As a summary and further thought: So imo there could be 2 different enhancements, one or the other:

A) "More Tool Toggles": Both Stamp Brush and Bucket Fill will not have only the Random Mode toggle, but also a toggle for rotation, h-flip an v-flip (3 more toggle buttons?).

B) "More default Tile Properties": Aside from the implemented definition of a probability value for each tile (!), additionally also a bool for each Tile can be defined - for rotation, h-flip an v-flip. These transformation are only used by Tiled, when the User uses a Tool with enabled "Random Mode". If random is off, the Tiles are placed untransformed.

Imo, I see the most frequent use cases for B, because when I place certain Tiles, I already know before if they could and should be rotated or not. But I can't think of a use case where I decide this spontaneously.

@eishiya @bjorn Do you see other use cases? Do you see other enhancement variants, like C)? What would be easier to implement, A or B?

Looking forward to your feedback! :)

UliAbo avatar Jun 05 '22 08:06 UliAbo

With random mode off but some of the flip modes on, that should transform the entire stamp. That means A is way more powerful than B. Per-tile or even per-tileset allowed transformations settings just do not make sense and cannot apply when you're dealing with entire stamps.

Using all the allowed transformations only makes sense if you're filling an area with some base tile or placing independent props, but becomes a problem if you're placing transition/edge tiles. It would be very annoying if Tiled randomizes the vertical flip of my tiles if I'm just trying to paint the top edge of something, just because vertical flip is allowed in the tileset because those tiles are also used for the bottom edge.

So, I have a strong preference for A. However, I think B could be useful in combination with Random mode and only in random mode, which always deals with single tiles. Perhaps there could be a fourth "Randomize Allowed Transformations" toggle, which adds the tile's allowed transformations (if "Prefer Untransformed" is false) to the transformations allowed by the other randomize transformations toggles. This could be useful in scenarios where you're not painting transitions or multi-tile stamps, but placing single-tile props or filling solid areas with variant tiles. This mode could also take advantage of the fact that different tiles chosen by the user may have different allowed transformations, while tool toggles cannot.

eishiya avatar Jun 05 '22 12:06 eishiya

Ok, A would also be good for me.

Do you have also ideas for how it could be done UI-wise?

image

One idea: When Stamp (or Bucket) is chosen, then when enabling the Random Mode, then the three buttons A, B, C can also be toggled on / off (maybe with another color?) I think we need a separate set of them for just defining what's possible when Random Mode is enabled.

UliAbo avatar Jun 05 '22 14:06 UliAbo

There's no reason that the random transformations shouldn't also be applied to whole stamps, not just individual tiles. So, I don't think you should have to enable random tile mode to get those options to appear.

I think it should just be four independent toggles in the toolbar: Randomize Tile (picks a random tile from your stamp, same as the current random mode) Randomize Horizontal Flip Randomize Vertical Flip Randomize Rotation and maybe: Randomize Allowed Transformations (this one would only be available if Random Tile mode is enabled)

There has been talk about expanding the terrain mode to allow either drawing/painting with a single terrain or with random terrains (which is what the current terrain mode does), with the random terrain mode being used if you have both the random mode and the terrain mode being enabled. So, perhaps enabling terrain mode should disable all the random toggles except Randomize Tile? Or maybe it should hide the whole randomize options bar and instead have a single toggle to randomize terrains? I think the latter would be cleaner and easier to understand, as well as allow saving the enabled randomization modes separately for terrains and tiles.

eishiya avatar Jun 05 '22 14:06 eishiya

Thanks for the feedback and ideas, @eishiya @bjorn What do you think about all these points? :) And also how hard would it be?

UliAbo avatar Jun 07 '22 08:06 UliAbo

@bjorn What do you think about all these points? :) And also how hard would it be?

Well, we can't add too many buttons on the tool bar, but I'm thinking we could place all these random-mode related toggles in a menu attached to the Random Mode button. There's not much I can say about the difficulty, this is always hard to estimate when there are already so many options to take into account.

bjorn avatar Jun 07 '22 09:06 bjorn

Yes, a random related menu sounds reasonable! I would appreciate to see that being implemented soon.

UliAbo avatar Jun 07 '22 09:06 UliAbo

All those toggles will need to be actions we can assign shortcuts to. I think it's fine if only Random Tile mode has a shortcut by default (matching the current random mode one).

Is there any way to make it optional whether the random toggles are a menu or appear right on the toolbar? By default, they'd be better as a menu, but sometimes, such as when working with certain stamps, I think I'd rather deal with some temporary clutter so that I can have immediate visual feedback about which ones are enabled.

eishiya avatar Jun 07 '22 12:06 eishiya