


#Libgdx texturepacker vs texture packer android#
On desktop no, but on my android device (moto g3) it runs at 20 fps and then drops to like 10-14 as more enemies spawn.

I’ll try to post some snippets at the bottom of this post though.
#Libgdx texturepacker vs texture packer code#
But if you want to help analyze the other problems i’d be glad to post some info I just was hoping to narrow it down a bit first since i’m a bit embarrassed by my code and its a bit massive. I thought maybe I was wrong and that splitting up my spritesheets and then repacking them made it worse than when I left them together and split them up using split in my constructor. It didn’t make any sense if the textures are all considered one for texture binding. I was actually just asking about whether or not I understood texturepacker and textureatlas right because of the huge draw call change just from repacking the textures. Unless I was wrong about how the packer works my only other idea for such a huge change after just repacking it is that now that the images aren’t packed as spritesheets the images they contained could be on divided between the first and last page of the packer so could be causing more texturebinds with my animations? But then even with a 1 page textureatlas I am getting on average 40-100+ calls per loop and a max of about 590.Īlso am I better off making multiple texture atlas’s? one for frequently used images, and another for ones that are rarely used? (assuming I can’t fit them all onto one page, currently they are 3 pages unless I make them 4096x4096 which texturepacker advises against). is it better to make spritesheets then put the spritesheets through the packer? again I was under the impression that once they were packed it would count as 1 texture anyway (or whatever number of pages it ended up packing into). but I put code in my loop to count the highest draw call of all loops and the worst one was like 3400 calls in 1 loop. so it’s 2 days later and I finally finished it, the texture atlas is actually the same size but now I am getting insane draw calls. so I spent the last 2 days painstakingly breaking up my sprite sheets into individual frames so that I could pack them more efficienctly (before I had a mix of sprite sheets and individual images that I put through the texturepacker). In a attempt to reduce it further I decided to repack my textures to optimize the texture packer better. My previous textureatlas setup was running around 40-80 draw calls per loop, which seems way too high based on the numbers I saw people quoting as reasonable. Else, the GUI is spawned with input, output and settings set according to what was given.I was under the impression that images packed together using texturepacker and references using a texture atlas would count as one image (assuming your texturepacker fit into one file) but that doesn’t seem to be the case, am I mixing up how a texturepacker works?

input="path/to/input/folder" -output="path/to/output/folder" -settings="path/to/settings/file" The "-silent" option directly packs the given project or input folder without spawning the GUI. Arguments are: -project="path/to/project/file" -silent If you don't want to use project files, you can directly set the input and output directories, as well as defining a settings file. I strongly recommend you to have a look to the following page for instructions on how the libgdx texture packer works: Command-line usageThe application can also be used through command-line, if you need to include texture packing in your build workflow. InstructionsThe libgdx-texturepacker-gui is, as says its name, a GUI for the awesome texture packer that comes with every libgdx distribution.
