0
\$\begingroup\$

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!

\$\endgroup\$
2
  • \$\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\$ Commented Jul 31, 2016 at 9:10
  • \$\begingroup\$ Is your situation similar to this? - stackoverflow.com/questions/21278675/… \$\endgroup\$ Commented Aug 3, 2016 at 10:33

1 Answer 1

1
\$\begingroup\$

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 =)

\$\endgroup\$
4
  • \$\begingroup\$ is your spritesheet bigger than 4096x4096? \$\endgroup\$ Commented Aug 3, 2016 at 6:11
  • \$\begingroup\$ On Desktop ... Ya it is \$\endgroup\$ Commented Aug 3, 2016 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\$ Commented Aug 3, 2016 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\$ Commented Aug 3, 2016 at 21:11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.