1

I have simple background vector image with filesize around 100Kb. When loaded SKTexture, its size is 20Mb.

Known formula for footprint in bytes is width * height * ( 32 / 8 ). Ok, matches.

But

1 background Parallax layer:  3 * 20 = 60
3 layers                   :  3 * 60 = 180

That's almost 200Mb for game scene backgrounds only. My idea was to load all of the textures (there aren't that many) at app launch, to avoid (slow) scene loading. But with this texture math it's impossible.

Am i missing something? Can image size be smaller or multiple loadings are needed?

elektricni
  • 319
  • 1
  • 5
  • 12
  • What do you expect? If you plan on using textures that large, you are going to have to use a lot of space. You are going to have to reduce size and scale, or find parts that repeat and use multiple nodes to render the image – Knight0fDragon Nov 12 '19 at 13:10
  • I don't know. Maybe some kind of image optimization based on pixel color? Detailed HD should be big, you pay for those details and crispness. But couple of plain white clouds on transparent background shouldn't have the same memory footprint. I've tried to use png8 instead of vector, but result is the same. – elektricni Nov 12 '19 at 14:11
  • why would it not have the same footprint? The data needs to be raw (that is what your math does), your eyes cannot perceive compressed data, and to expect the GPU to decompress data on the fly would be crazy. – Knight0fDragon Nov 12 '19 at 14:22

0 Answers0