

TexturePack = texturePackLoader.loadFromAsset(activity.getAssets(), "spritesheet.xml") TexturePackLoader texturePackLoader = new TexturePackLoader(activity.getTextureManager()) Im creating the xml,png and java from texturepacker private TexturePackTextureRegionLibrary mSpritesheetTexturePackTextureRegionLibrary below is what im trying which i have gotten from guides and other posts in this forum. trying to animate a sprite using the AndEngineTexturePackerExtension but im unsure how the tiledTextureRegion gets created for the animated sprite.
#Texturepacker order android
And since my image dimension is 360x280, I put the geometry as that dimension so that my images won't be resized.New to android dev and andengine in general. This will create 14 horizontal images before it goes to the next row.
#Texturepacker order code
So what I did was using this code instead: montage imagename*.png -tile 14x -geometry 360x280 imagename-sheet.png

(I tried cropping it to 3600 x 280 to show only some frames, and Phaser can show the animation without any problem) Since there are too many images, in the end the file dimension was 60480 x 280 and Phaser had some trouble loading it, I can't see the animation there. This does the trick, but it created one very long horizontal spritesheet. Thus there are 157 images I want to put into a spritesheet. So I was trying to make an animation at certain event, something like a cutscene. For lots of example usages, see the ImageMagick montage documentation. For example, the '-tile' parameter can specify the grid layout. You could definitely write a one liner to build a complicated sprite sheet of any dimensions. Once you have your sprite sheet built, then you should be able to load it into Leshy SpriteSheet Tool to further edit or create an atlas or map, or into Leshy SpriteSheet Animator to create and test out animations using the sprite sheet.ĮDIT: After writing this I was just looking at the ImageMagick docs, and you can actually finely control a lot more details.

I know not everyone is into command line tools though, so there may be some better suggestions for those that prefer a graphical interface. On Windows, it should all work well through Cygwin. If you are on Linux or MacOS, this can be done through a terminal easily. These types of commands work well in build scripts or Makefiles, if you are into that style of doing things. That will create a player and enemy spritesheet row, and then append them together into final-spritesheet.png, each one as a single row. For example: convert player*.png +append player-spritesheet.pngconvert enemy*.png +append enemy-spritesheet.pngconvert player-spritesheet.png enemy-spritesheet.png -append final-spritesheet.png This is useful in combination, for example to add another row to the sprite sheet. You can do "-append" instead to make it vertical. That will take all files named player*.png and append them horizontally into a new image named player-spritesheet. For example: convert player*.png +append player-spritesheet.png If you are up for command line tools, the way I do it is with ImageMagick. Bin-packing tries to keep the new image square as well, which is undesirable for that. Leshy SpriteSheet Tool does bin-packing when you add images, which is fine for texture atlases, but not as ideal if you are just trying to append images into a sprite sheet of perfectly even cells.
