SpriteKit SKTextures memory footprint

55 views Asked by At

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?

0

There are 0 answers