libgdx/libgdx — pull request #396 by manuelbua (2013-05-12 14:01:13+00:00)
Title: Get back the gdx-tiled-preprocessor

For reference here is the forum discussion about these and some more Tiled changes to come: http://www.badlogicgames.com/forum/viewtopic.php?f=17&t=8911

I see it was removed since people complained about it and the pre-processing step, since it looked like it was required, at least with the old tilemap implementation.

However this is *not* a required step (anymore), it's just an additional one and will even perform some reduction on the final tileset if using the "--strip-unused" command line option: it will output a new TMX file with additional custom properties and a new AtlasTiledMapLoader has been added to permit loading it.

It has been ported to TexturePacker2 and made it to analyze multiple maps sharing the same tilesets, so missing tiles from other maps using the same tileset shouldn't be a problem anymore, given all the used maps are found in the input directory.

I also noticed that TexturePacker2 didn't avoid duplicate aliases, so this PR will include that patch too.

At this time it requires an Lwjgl application since the TmxMapLoader itself will load maps as it's going to render them: this should be fixed when the loaders will load metadata and graphics resources conditionally.

**NOTE**
On top of these changes, BurningHand and i have been thinking about reorganizing loader code and unifying much as possible, so that to avoid most of the current code duplication: this will be part of a next PR but if you want to look at it to make an idea you ocan find it on my fork (https://github.com/manuelbua/libgdx/commits/tiledmap-base-loader).