Change tile size


(Ten Shu) #1

Hi, this is my first post here.

I ve tried tiled map editor a while ago, loved it. and now starting to use the new version for a “real” project.
But I have a question:
I ve started a map with 64x64 tile. is it possible to now change it to 32x32 without redoing everthing?
I mean, the textures will be the same size but the grid would be 32 instead of 64…is this possible?

thank you

ten.


(Thorbjørn Lindeijer) #2

When the textures stay the same, I’m not exactly sure what you expect to happen. But to start, you can change your map tile size to 32x32 in the map properties and see what happens. Generally when your tiles are actually 64x64, they will start to overlap since they are rendered too close together (Tiled does not scale them down to the tile size of the map, since the overlapped drawing can be useful sometimes).

If this does not help you, please be more specific about what you’d like to happen.


(Ten Shu) #3

Thank s Bjorn you discribed perfectly my issues.
when go to map properties. and change my tile to half the size it was. then my level became half the size because everything overlap…is there a way to not have that happening?

I want to reduce the size of the tile because it would allow me to do more variety with my assets.

for instance…this texture i drawn it in 64x64

but now i realize if i do 32x32 i can add much more variety into my textures.
Because currently alot of my asset repeat.
I know it s kind of a rookie misteak. :flushed:
I m more of a 3d artist usually…

Thanks


(Thorbjørn Lindeijer) #4

So, unfortunately Tiled has no feature for applying such a change. If Tiled was scriptable (but it isn’t yet), it could be something you could do with a little script.

If you really have a lot of maps to adjust, you could write a function for doing this in C++ by extending Tiled directly, or you could try to write something in Python using for exampe tmxlib (though it hasn’t been updated in three years so it won’t support all TMX features).


(Evan Ouellette) #5

So there is no way to have tiled scale the tileset tiles appropriately based on the size of the tile of the maps?

I have a similar situation where my tileset pieces are 32 px but I want the tiles draw at 64 px


(Thorbjørn Lindeijer) #6

It won’t scale the tiles to the tile size of the map, but in your case you could just put the zoom at 200%, right?


(Evan Ouellette) #7

I don’t know how to do that, but if I could, would that also stretch the bounds for the objects and wall tiles I use for collision detection?


(Thorbjørn Lindeijer) #8

No automatic stretching will happen. Any objects would stay the same size unless they are adjusted in some way, since their position and size is stored in pixels (and as such is independent of the tile size).


(Evan Ouellette) #9

yeah,so it doesn’t really help then :confused:


(Thorbjørn Lindeijer) #10

Sorry I rather mixed up the different conversations here. Of course if you change the zoom to 200%, it will also affect the objects. You just focus the editable combo box in the right of the status bar and type “200%” and press Enter. This of course doesn’t change your map, but you just wanted everything displayed bigger, right?


(Evan Ouellette) #11

so I have a map, and I have a wall that has the property Impassable.

If I zoom to 200% while I play the game, and the character object interacts with the now zoomed in wall, will the coordinates of the tile map match the now zoomed in version and say yes there is a collision. I’m abstracting my code somewhat, I realize collision is in my own code

Edit: Nevermind, I’m an idiot. Problem solved


(Jorin G ) #12

I can’t seem to edit my map’s properties. They’re displayed on the left-hand side of the editor, but clicking on one does nothing. Help!

I get it now. If I want to change the width, I click on the field with “32”, not the one labeled Width.