Hi!
I have about 24 images which is 1080x1920 which I use as background images on one scene(Background changes depending on player score) . My problem is that creating images on the fly results in lag, especially because they’re large. Loading them all at once eats up a lot of texture memory(Reaches about 200MB).
So my solution was to scale them down until 270x480. Loading them individually and on the fly still results in lag. So what I did was put them in a spritesheet. So what happens now is I load 3 of those spritesheets, create a sprite object the size of the screen, 1 is placed in the center of the screen, and the other 2 above it. The sprite obejcts(backgrounds) scroll down automatically, when the whole sprite obejct is off-screen, it returns to the top, above the last background and I change the current frame according to the player’s score.
Texture Memory now only reaches 25MB. This solved the lag problem. However though testing it in the actual device, the backgrounds were a bit pixelated, and for obvious reasons. I’m testing it on a Nexus 5 by the way. Creating a spritesheet with the original size 1080x1920 is just absurd, and texture memory would probably be too large if I load 3 of them.
The only problem now is the pixelated backgrounds. Do you guys have any suggestions for this? Ideas? Workarounds? Or different approach?
