
- #Libgdx texturepacker vs texture packer how to
- #Libgdx texturepacker vs texture packer full
- #Libgdx texturepacker vs texture packer software
- #Libgdx texturepacker vs texture packer code
If you want to use Photoshop to do this, that’s too stupid and inefficient.

I use something like this:Īs far as the issue of the two dimensional array, you can transform it to a one dimensional array and extract any frame that you want from it.Making multiple small images spliced into a large one (sprites sheet), for game development, this can save the storage space and loaded memory that texture images require in game for web design, this (CSS sprites) can greatly reduce the images loading frequency and time, so as to make web pages load faster. The caveman method is simple to use in code, but you have to make sure that your spritesheet is flawless.Īs far as the issue of the two dimensional array, you can transform it to a one dimensional array and extract any frame that you want from it.

#Libgdx texturepacker vs texture packer software
Also, you have force POT checked, this will force the software to generate a texture that is a power of two, meaning the texture will be 2^n x 2^n regardless of the stuff your are adding. For instance it looks like you have edge padding checked, and that's probably what's adding the extra space at the ends.
#Libgdx texturepacker vs texture packer how to
I don't use this texture packer software, but you probably have to learn more about how to use it and what you are getting out of it. If you want to use this rather than an atlas i suggest you fix your spritesheet so that you don't have any empty frames. Fred has another example called Textureatlas for texture atlas. The caveman example does not use a texture atlas, it just grabs equal frames from a spritesheet. The flicker is due to the extra empty frames that you have in your image. So I'm thinking the flicker at the end of my animation are these blank frames. Notice the border is longer than it needs to be. I've attached the png file that I use as input for the Atlas and a screenshot of what TexturePacker looks like when I add that pic. So I wonder if TExture Packer is forcing me to have 7 frames across because of the Max Page Width?
#Libgdx texturepacker vs texture packer full
So only 7 full frames would be able to fit across if I had 7. Each animation frame is 117 high by 143 wide. Now, looking at the max width for the page, it's set to 1024. And it LOOKS like there's space for 3 more sprite frames judging by the border displayed around my image in Texture Packer. It seems the TExture Packer adds extra space on the end of my 4 images as if it's trying to fill up the width of the page. So after trying to debug for a while, I decided to reduce the spritesheet to just 4 images and then pack it.

When I log the Length property of my lgTexture array, B4A tells me that I have 7 elements instead of the 4 I expect. I was hoping that the resulting array of lgTextureRegion would have some kind of method to add more frames but it seems to only give the Length property.Ģ.)The second, bigger issue seems to be that when I run my animation (which only uses 4 frames because of the issue above), the animation seems to flicker at the end. But I wanted to use all of the frames and not just a single array of frames for the animation. But I use the GetRegionArray() function but it seems that it's designed to return a specific array (of a two-dimensional array) based on index. I modified it to be 16 frames with 4 columns and 4 rows. In short, I have two issues.ġ.) The spritesheet had 6 rows of sprite animations, 5 to a row. And I tried out the GDX Texyure Packer with a spritesheet IF found on line.
#Libgdx texturepacker vs texture packer code
Using the Caveman animation example I modified the code to pull my animation frames from the Atlas. I've got a small game in the works where I'm trying to have all images and animation sequences in a Texture Atlas.
