I have a folder containing many 8x8 tile images. They are png images and are for sure 8x8 pixels. I added the folder of tile images to the Assets.xcassets in Xcode. I have also added a .sks tileset to my Xcode project.
When I add one of the images to my tile set in a new tilegroup the image is very blurry. It still is when put on a SKTileMapNode in the scene editor. It worked perfectly fine just yesterday and I have no idea what changed since I left Xcode open and haven't changed anything since then.
I have tried many things. Here is a list to rule out possible reasons for this issue:
- The TileSet and the SKTileMapNode tileSize property is the correct 8x8
- The size of the SKTileMapNode and the actual window itself are both the same aspect ratio of 2:1 w:h and the scale mode is set to .aspect fit.
- I have tried cleaning the project with Xcode and restarting Xcode.
- I have tried making a new TileSet
- I have tried making a new SKTileMapNode
- I have tried re-importing the tile images folder
- I have tried changing properties in the actual tile images themselves in the .xcassets
- I have tried toggling Enable Automapping in the SKTileMapNode
- I have tried making a completely new project with just the tileset and tilemapnode
Through my testing the issue seems to be with adding the tiles to the tileset. For some reason they are always blurry and I have no idea why. There is only one other post about this that I could find which was on StackOverflow with no answers and one reply saying maybe the tiles are being resized. ChatGPT gave a list of possible solutions which sometimes has helped with other problems but none of those worked either.
I am on Xcode version 14.2