Background image to tile set


(Fran Tardencilla) #1

I have a big image for the background of my game which could not be loaded as it is so I decided to split it into tiles, I did it on Photoshop with the slice tool and saved it for web as a png, I got around 890 tiles each one 168 by 168 pixels, then even if I use one single tile from my new tiles my game does not work. Any suggestions about why this might be happening?


(魔大农) #2

Welcome to the Tiled forums!
Rather than figuring out why the tile is not showing I’d reconsider using the big image as a whole. Do you know why it cannot be loaded?

The power of tiles is the fact they are reused. It’s no use dividing your world into small tiles when each of them will be unique.


(Thorbjørn Lindeijer) #3

Assuming the image was roughly square, having 890 tiles means they were cut from a grid of about 30x30 tiles (sqrt(890)). With each one being 168x168 pixels, such a texture would be 5040x5040. If it wasn’t square, one of the dimensions could be significantly greater. While modern gaming hardware should be able to deal with 8K or even larger textures, there is plenty of hardware around that only supports 4096x4096 or even 2048x2048 textures. This may be the origin of your problem.

However, it does not explain why even one 168x168 tile won’t load. When your other tilesets do work, it may be that you’re using a “Collection of Images” tileset, which may not be supported by your framework or library. Which one are you using?

Edit: I read in your other topic that you’re using libGDX. In that case maybe the following SO question is relevant: