mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.2k stars 1.76k forks source link

Looking for a comprehensive collection of TMX and TSX files for unit testing. #3190

Open vpenades opened 2 years ago

vpenades commented 2 years ago

I'm working on a TMX loader, and I would like to write some comprehensive unit tests for it.

I've checked the tests directory but there's only a few cases that don't cover many of the most complex tiled features.

So I was wondering if there's such a collection of files somewhere.

In particular, I'm looking for TMX files with:

bjorn commented 2 years ago

I once tried to set up a map that used most features, it is the orthogonal-outside.tmx example map. Needless to say it doesn't use all features, in part because that is simply impossible and in part because more features were added after I created the map (like object references).

The right way forward would of course be to extend the tests that you've found to contain small maps and tilesets that cover all the features you've mentioned, because then it is not only useful for loader but also to prevent breakage in future versions of Tiled.

vpenades commented 2 years ago

Thanks for the explanation.

Looking at orthogonal-outside.tmx , I've noticed some gid's with value 2147483930, how should I interpret that value?

eishiya commented 2 years ago

I've noticed some gid's with value 2147483930, how should I interpret that value?

Take a look at the global tile ID docs. Those big numbers are what you get when some flip flags are set, which is how Tiled communicates that a tile has been flipped or rotated.