photonstorm/phaser — pull request #377 by Malax (2014-02-07 17:09:46+00:00)
Title: Added a warning when the tile set image has not the expected dimensions.

I wanted to use a ![tilesheet I found on the internet](https://f.cloud.github.com/assets/177877/2112074/6e37b296-9019-11e3-9944-2b206d4cc171.png) to create a map with tiled. All went fine, but when i tried to load the map in phaser no map was shown, but no errors or warnings popped up.

After a long debugging session I found out that the TilemapParser relies on the fact that the tilesheet image must have dimensions with multiples of the width / height of the tiles (+ margins and spacing) and will calculate nonsense values for x in the "super tileset index".

That would not be a problem when Tiled would fail as well, but as it turns out, Tiled worked like a charm with the tilesheet.

I added a check for that case which will simply spit out a warning so that other newbies like me wont have to debug half day long to find out what they did wrong. :-)