TMXTiledMap Unable to have different sprite sizes in tsx file?

TMXTiledMap Unable to have different sprite sizes in tsx file?
0

Hi all, so I’m using the TMXTiledMap to generate my tileMap. I’m using Tiled to generate the tmx and tsx files and right now all my sprites in my tsx files are the same size. But when I tried to import a sprite of different size of 16 by 16 pixels instead of the usual 70 by 70, the program just crashes when I try to create the TileMap.

Annotation%202019-11-30%20161353

So can we not have sprites of different sizes in the tsx file? or is there some other way of doing having different sized sprites to be loaded in the tsx file when generating the tileMap.

Thanks

Hi, What version of Tiled are you using. I found this:

TMX%20Version

And The version of Tiled that generates a 1.0 Map is Tiled 1.1.6

Anyway i also have issues with tmx maps with this version

I 'd created this post:


On the above image look at the two tables stripped they each one occupies two tiles of the spritesheet to try to make them look like one object, take in account that you have to set the circumcising pixels transparent, the same way is downwards, the way you need: You include a smaller sprite inside a whole tile in your spritesheet with transparent pixels on the empty spaces. Tiled lets you flip on the “x” and “y” axis and rotate the tiles (also cocos renders it rotated or flipped while you not try to get the individual tiles, at least in v3.17.2), but if you need different positions, you need to make different tiles on your spritesheet.

Take a look in

https://opengameart.org

for more example spritesheets of tiles.

Hi abrajam,

From what I understand, your proposed solution is to resize every sprite to fit the desired size and simply fill the the empty spaces with transparency. However this would take too long as I have numerous sprites to handle. Thus I was wondering if TMXTiledMap supports sprites of different size so I don’t have to manually resize every single sprite to fit the 70,70. Thanks for your Input though

Hi Imartinignacio,

My Tiled Version is 2019.11.20 so there shouldn’t be any problems that I know of. I’ve read your post and I tried putting the 16,16 sized sprite in a different Tile Layer in Tiled but unfortunately, it still crashed at the same spot. Thanks for trying though

I don’t think that you need to resize them, just acommodate them on the spritesheet with help of guides in PS maybe and tilemap will cut them, then you can group them in objects.

I don’t think it supports it, also another solution could be make more than one tile map with the different tile dimensions and overlap them on game.