# Randomize tile flip/rotation

**URL:** <https://discourse.mapeditor.org/t/randomize-tile-flip-rotation/794>\
**Category:** Questions\
**Created:** [October 4, 2015, 12:50am UTC](https://discourse.mapeditor.org/t/randomize-tile-flip-rotation/794 "2015-10-04T00:50:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![finticemo](https://avatars.discourse-cdn.com/v4/letter/f/ac91a4/32.png) [@finticemo](https://discourse.mapeditor.org/u/finticemo)\
**Post date:** [October 4, 2015, 12:50am UTC](https://discourse.mapeditor.org/t/randomize-tile-flip-rotation/794/1 "2015-10-04T00:50:29Z")

</div>

I have used the randomize option, which randomly selects from a number of tiles.  
But my question is about whether there is a quick way to place tiles whose _orientation_ is also randomized?

In most cases, I would be selecting a single tile, and want to fill an area with randomly-transformed versions of it.  
So far, I have found that this is possible by plotting a 2x4 block with all possible flips/rotations (plot all rotations, pick that up, and flip it with ‘y’, forming the other 4), picking that up, and filling with that. However, that is slow and error prone. Is there a better way?

---

<div class="post-metadata">

**Author:** ![Ablu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ablu/32/1496_2.png) [@Ablu](https://discourse.mapeditor.org/u/Ablu)\
**Post date:** [October 4, 2015, 7:09pm UTC](https://discourse.mapeditor.org/t/randomize-tile-flip-rotation/794/2 "2015-10-04T19:09:49Z")

</div>

I think there currently is no easier way than the trick you already mentioned ☹

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [October 4, 2015, 8:16pm UTC](https://discourse.mapeditor.org/t/randomize-tile-flip-rotation/794/3 "2015-10-04T20:16:52Z")

</div>

Yeah, what @Ablu said. There’s an issue about this on GitHub:

> <https://github.com/bjorn/tiled/issues/253>
>
> options for random mode to include rotation and flipping parameters? preferably with toggles to turn on or off which parameters you...

---

<div class="post-metadata">

**Author:** ![finticemo](https://avatars.discourse-cdn.com/v4/letter/f/ac91a4/32.png) [@finticemo](https://discourse.mapeditor.org/u/finticemo)\
**Post date:** [October 5, 2015, 12:43am UTC](https://discourse.mapeditor.org/t/randomize-tile-flip-rotation/794/4 "2015-10-05T00:43:31Z")

</div>

Hmm, thanks. Currently, the main source of the error-prone-ness is that I cannot leave Randomize mode on while I’m plotting the tiles for the template.

This is because sometimes when I click with a single tile selected and with Randomize mode on, the tile changes to nothing. Then when I click again, it goes back to the tile I had selected.  
I’m not sure whether this is a bug or intentional – I certainly have no idea what purpose it could serve, as the blank/correct change never occurs during a drag (where I could understand it as plotting only _some_ tiles along the given path).

Should I file an issue for that?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [October 5, 2015, 7:05am UTC](https://discourse.mapeditor.org/t/randomize-tile-flip-rotation/794/5 "2015-10-05T07:05:41Z")

</div>

> [@finticemo](#):
>
> This is because sometimes when I click with a single tile selected and with Randomize mode on, the tile changes to nothing. Then when I click again, it goes back to the tile I had selected.

Hmm, this sounds like a bug since with just a single tile selected, the brush should act the same way with or without Random Mode. What do you mean with “the tile changes to nothing”?

---

<div class="post-metadata">

**Author:** ![finticemo](https://avatars.discourse-cdn.com/v4/letter/f/ac91a4/32.png) [@finticemo](https://discourse.mapeditor.org/u/finticemo)\
**Post date:** [October 5, 2015, 8:10am UTC](https://discourse.mapeditor.org/t/randomize-tile-flip-rotation/794/6 "2015-10-05T08:10:03Z")

</div>

Normally, you select a tile in the tileset. Then, the tile shown in blue under the cursor is that tile, and clicking plots it on the map.  
However, occasionally, no tile is shown instead. (To clarify – I don’t mean a blank space that is colored blue, I just mean that no tile at all is drawn under the cursor). While this is the case, clicking on the map appears to do nothing.  
Any clicks on the map occurring after the initial ‘loss of tile’ may reset the ‘current tile’ back to the tile that it should be, or may not; the reverse also applies.  
In all cases, the change occurs after a click or drag.

BTW, I’m also finding that it happens with Randomize off, too, so it probably isn’t related to Randomize directly.

I wouldn’t be that surprised to find it is related to a graphics-tablet-specific input issue, since tablets can generate patterns of clicks or motion quite incidentally, that are hard or impossible to do with a mouse. If you think that may be relevant, my tablet is a Monoprice 12"; lsusb identifies it as “UC-Logic Technology Corp. Tablet PF1209”. It uses evdev input driver.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [October 9, 2015, 7:47pm UTC](https://discourse.mapeditor.org/t/randomize-tile-flip-rotation/794/7 "2015-10-09T19:47:11Z")

</div>

Please report this issue on the GitHub issue tracker, and try to describe the steps with which you can reproduce this issue as detailed as possible since I have not personally experienced this issue before. Thanks!
