As we know, there is a GL_MAX_TEXTURE_SIZE on each mobile phone which makes things really hard. I write an app for all mobile devices and I need to load some huge spritesheets combined with 64 frames when each of them has 512x1024 dimensions.

As I tested and read, I should load spritesheets <= 1024 so it will work on all mobile devices including IPhone3 and some old Androids.

If I have a spritesheet 512x1024 with 64 frames, it's dimensions are really, really large - for ex. if the spritesheet has 64 columns, it's with is ~61000 px.

Of course, I can cut it, but it gives me 64 images and I have no idea if this if efiicient of not.

How do you handle things like this? Scaling the graphics down is not an option - it lowers the quality and my game IS QUALITY.

If someone has any experience I would be grateful!

  • \$\begingroup\$ Take a look at array textures in OpenGL. I don't know how the support for them is however with the platforms you want to support. \$\endgroup\$ – cozmic Jul 31 '16 at 9:10
  • \$\begingroup\$ Is your situation similar to this? - stackoverflow.com/questions/21278675/… \$\endgroup\$ – WeirdElfB0y Aug 3 '16 at 10:33

I never tested it before on Android ... But on Desktop im doing it like following :

First I create a big spritesheet using a TexturePacker . I put those files into the project Folder .

Then I use the libgdx AssetManager to load those SpriteSheet ( TextureAtlas ) dynamicly.

I haven't tested it yet but I think it should also work on Android if you Pack your spritesheet into a textureAtlas and load it via AssetManager into your game :)

Going to test that tommorow, hope I helped ya a little bit =)

  • \$\begingroup\$ is your spritesheet bigger than 4096x4096? \$\endgroup\$ – Jacob Aug 3 '16 at 6:11
  • \$\begingroup\$ On Desktop ... Ya it is \$\endgroup\$ – genaray Aug 3 '16 at 7:25
  • \$\begingroup\$ But OP has 64 frames each of which is 1024 pixels in width. So even by using Texture Packer, it will be a large atlas. \$\endgroup\$ – WeirdElfB0y Aug 3 '16 at 10:21
  • \$\begingroup\$ it doesn't matter if it's large. Desktop allows to use max 4096 graphics, so texture atlas somehow overrules this and you can load bigger. I will test tomorrow :) \$\endgroup\$ – Jacob Aug 3 '16 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.