

I think one other new game I found uses texturepacker (and adobe's new. I'm actually pretty sure Teen Titans Go Channel Crashers and hour of code: MineCraft use texturepacker (but the latter uses JSON instead of XML, assuming it does use texturepacker. RE: Reversing TexturePacker Sheet + XML - DarkGrievous7145 - 05-26-2016Īnd I've encountered some games using texture packer, myself. Reversing TexturePacker Sheet + XML - puggsoy - 05-22-2016ĭoes anybody know a way of unpacking a sprite sheet that's been packed together with TexturePacker, given a corresponding XML file? I am able to write my own program for doing that (the format is very straightforward) but I figured that if something already exists for it then I won't waste time reinventing the wheel. +- Thread: Reversing TexturePacker Sheet + XML ( /thread-29258.html) As well, I made sure there were no odd sized sprites.Reversing TexturePacker Sheet + XML - Printable Version I have tried running TP separately for HD and SD images but it didn’t work.
#UNPACK TEXTUREPACKER XML PRO#
I haven’t tried other sorting algorithms, since I’m using the non pro version. TexturePacker -data a -format corona-imagesheet -allow-free-size -shape-padding 2 -border-padding 2 -sheet animation.png -no-trim -algorithm Basic -scale 0.5 *.png TexturePacker -data a -format corona-imagesheet -allow-free-size -shape-padding 4 -border-padding 4 -sheet animation-hd.png -no-trim -algorithm Basic *.png TexturePacker -data a -format corona-imagesheet -allow-free-size -shape-padding 4 -border-padding 4 -sheet animation-hd.png -no-trim -algorithm Basic -auto-sd *.png These sets of commands created proper imagesheets for SD and HD: I ran a test on the latest texture packer beta 8: 100 sprites. For scales 1.0, 1.8 and 4.0 you will need your high res images to be divisible by 20! This is so that when you set the scale to 0.75 for your 1.5 resolution images there will still be a whole number of pixels for TexturePacker to work with. For example if you are going to use 1.0, 1.5 and 2.0 you must make sure the high res images are divisible by 4. It gets more complicated if you are producing assets for more resolutions. lua file in Corona that was generated for the 1.0 scale images. I export these images and then change the scale to 0.5 and change padding to 2 then export my 1.0 scale images. When using TexturePacker I use an imagesheet that is 2048x2048 and set padding to 4. if I am using scales 1.0 and 2.0 then I just need to make sure that the width/height of my 2.0 images are all even (divisible by 2). The way I make this work is to ensure that all my images at the highest resolution I am going to use are divisible by the other scales I want to use e.g. If they are not then you will find that TexturePacker (rightly so) may move the images around when you change the scale. You should work with the highest resolution first but must make sure that the images are divisible by the other scales you want to use. The other problem that you will find is when you are creating multiple resolutions. I think some kind of trimming divisor will be needed in TexturePacker to fully support this feature, but seeing as the API is not yet in a Corona stable release I doubt that Andreas will want to commit to adding the functionality If this results in odd pixels (or more accurately pixels that are not divisible by the scale you want to produce) then the images will jump around slightly due to different offsets.įor now I am not using trimming as I need to use dynamic image scaling. As Andreas mentioned TexturePacker will always try and pack the images as best as possible. The main problem you will have is with dynamic image scaling. I have used the API and it is stable enough.
#UNPACK TEXTUREPACKER XML CODE#

Create a new exporter by opening the TexturePacker package then create a copy of the Corona Exporter folder under Resources/exporters/corona-imagesheet.The code that I posted previously adds these values to the exporter for conorna SDK in TexterPacker. You will see in uma.lua that trimming is used by setting the values for sourceX, sourceY, sourceWidth and sourceHeight for the imagesheet. I got the information about sprite trimming from the latest Corona SDK in the sample code HorseAnimation. I’ve spent a while getting all this to work - here goes
