mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.18k stars 1.76k forks source link

UI pattern for collision editing from map #822

Open neagix opened 9 years ago

neagix commented 9 years ago

I am trying to create the collision polygons for tiles in a map. The tiles are tiny and I need to select them one by one.

It would be nice if I could right-click on a tile and then the currently selected tile in the tileset would update, and so the tile collision editor would show me exactly that one I clicked.

This way I would go much faster. Right now what I do is:

bjorn commented 9 years ago

select it in the tileset mini-window

It doesn't need to stay a mini-window. You can resize it and you can zoom in to make your tiles bigger.

re-open the tile collision editor (doesn't update)

This shouldn't be necessary. It's a bug when it doesn't update along with changing tile selection. I can't reproduce the issue myself, so which version of Tiled are you using exactly and which operating system are you on?

It would be nice if I could right-click on a tile and then the currently selected tile in the tileset would update, and so the tile collision editor would show me exactly that one I clicked.

I think this is a suggestion that is worth a try though.

neagix commented 9 years ago

@bjorn I am using master at 915fd321e46a700bb07b0eed4b542651cfbad104 on Linux 64bit with qt4

I mean it's a mini-window because it's not docked in the main window of Tiled.

Regarding the bug: you're right, it works fine when selecting from tileset, sorry for the bad report.

So in the end I am only missing right-clicking on a single tile and having this selected in the tileset. I tried to hack a bit the source code, but I am really no good in Qt... :8ball:

bjorn commented 9 years ago

Ok, this is similar to #138. I think the main questions are:

neagix commented 9 years ago

if it were to be implemented, I'd see it more when user is selecting a single tile.

Otherwise, if you choose to merge it to #138, I think it would be best that it were another selection mode.

As I said, I am just trying to figure out the best approach to create collision maps for all tiles in a map. When tiles are very small, it's not feasible to do this without support of the map view (and nonetheless it's a general feature more people could use).

bjorn commented 9 years ago

When tiles are very small, it's not feasible to do this without support of the map view (and nonetheless it's a general feature more people could use).

I don't understand. I already pointed out you can zoom in on the tileset view as well. Is this not enough?

neagix commented 9 years ago

@bjorn no, imagine a big map with 8x8 tiles

bjorn commented 9 years ago

@neagix Sorry, imaging a big map doesn't help me. What I'm wondering about is why it is not feasible for you to rely on the tileset view rather than the map view when your tiles are very small, given that you can zoom in to make the tiles bigger on both the map view and the tileset view.

neagix commented 9 years ago

@bjorn ahah, I can see pretty well that you can't! :)

The problem is not about viewing the individual tile larger, I don't care about that, but instead about seeing which one should be an obstacle or not.

In detailed maps you see which tiles are obstacles in the map view, not in the tileset view, because the tiles are all pretty similar and being so small they look like a big chunk of pixels, nothing determinate.

This issue is about having an UI interaction that allows to select them from map view, since in tileset view they are not easily distinguishable one from another.

bjorn commented 9 years ago

@neagix Alright, now I understand what you mean. What I don't really understand now though, is how you manage to pick the right tiles while making the map. :-)

neagix commented 9 years ago

@bjorn because the map is drawn by the artist or anyway scanned from existing material

I am surprised this is not a common scenario :)

bjorn commented 9 years ago

@neagix Hmm, but if your map is produced this way, wouldn't it be easier to use an object layer to place colliding regions instead of using the tile collision editor?

neagix commented 9 years ago

@bjorn I thought about that, but then I would not be able to create new maps by copy/pasting block of tiles (with right click select feature), thus work would get wasted next time I want to make a derivative map

kheftel-old commented 9 years ago

woohoo, I'm late to the party but excited for this feature. even if it's only for single tiles, it'll still be super helpful!

bjorn commented 6 years ago

Reopening this issue because it broke with Tiled 1.0 now that tileset editing is so separated from map editing. I think eventually we'll have to find a way to bring them back together again.