FlatRedBall integrates closely with the fantastic tilemap program Tiled. If you’ve ever resized a PNG file, then you may have received a message notifying you that the number of columns in the tileset have changed.
Tiled is notifying you that the tileset was originally created with a PNG which had a different size compared to its size now. Unfortunately, clicking Yes may result in unexpected (and broken) results.
Fortunately a solution exists to this problem. If you have clicked Yes you will need to undo your changes by closing Tiled without saving your file. If you have saved your file, you will need to revert it in Git (or whatever version control program you are using). Unfortunately if you do not have a way to undo your changes, your file may be permanently corrupted.
To solve the problem:
- Click No on the popup
- Select whichever tileset references the resized PNG
- Click the Edit button to edit the tileset
- Make a change to the tileset. The change doesn’t matter, as it will be undone- a change is needed so that Tiled will let you re-save the tileset (TSX) file. For example, change the Type of one of the tiles.
Save the tileset (TSX) file
Undo the change to the Type (or whatever change you made earlier to save the file)
Save the tileset (TSX) file again
After performing these steps, your map will still look like it did before, but Tiled will no longer ask you about the number of columns changing. Also if you look at the TSX file in a diff program, you will some of the values in the TSX have changed.
Once this change has been made, the map should render correctly in FlatRedBall as well.