mapeditor / tiled

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

Add ability to change all instances of a gid by other #979

Open Darky-Lucera opened 9 years ago

Darky-Lucera commented 9 years ago

Sometimes I have to reorder the tileset (to reduce some visible artifacts) or add new tiles to one of the tilesets used by the map, and normally I have to redo the map layers that used the old tileset.

I think that the process will be easiest if tiled would add the posibility to change all instances of one gid with another gid.

The first problem is difficult to solve in tiled because as the gids are changed you have to redo the map layers that use the tileset.

To solve the second problem there is a workaround, you can move the tileset to the end of the tileset list (inside tiled), then you can change the image file with the bigger one and the map continues viewing well. But you have to add the new tiles at the end of the tileset.

bjorn commented 9 years ago

To solve the second problem there is a workaround, you can move the tileset to the end of the tileset list (inside tiled), then you can change the image file with the bigger one and the map continues viewing well. But you have to add the new tiles at the end of the tileset.

Hmm, the first step should not be necessary. Tiled should never have any issues with tiles being added to the end of a tileset.

For the initial request, would pull request #866 suit your needs?

Sometimes I have to reorder the tileset (to reduce some visible artifacts)

What kind of visible artifacts are these, btw?

Darky-Lucera commented 9 years ago

For the initial request, would pull request #866 suit your needs?

yes it does, thanks

What kind of visible artifacts are these, btw?

Sometimes, depending of where you place the tiles inside the tileset, and depending of the scale and/or rotation, the texture coordinates will trespassing the tile boundaries.

bjorn commented 9 years ago

Sometimes, depending of where you place the tiles inside the tileset, and depending of the scale and/or rotation, the texture coordinates will trespassing the tile boundaries.

Ah, alright. If you want to avoid having to reorganize tiles to get rid of these problems, you could instead use 2 pixels of spacing in between your tiles and make sure that the pixels in this space match the colors of the edge pixels of the tiles. Of course, this would complicate the editing process and is quite tedious, so it's something that could be automated as well, either by an external tool or inside the game engine.