Hi People…
Just wanted to get a handle on a preferred way of handling images. In my game I currently have 8 different backgrounds I use at various stages during my game, at the moment I currently create a cache of the 8 images (752x512 JPG ~ 150KB) at start up. But I am beginning to think, convinced by profiling, that I am eating up unnecessarily large amounts of ram - Some of the images aren’t going to be used (should I use lazy-loading perhaps?).
So my question is, should I switch to loading the image when I require it in the game?
Thus only having 1 buffered image at anyone time for the background? A pause in the game whilst it loads the image, for the level, is fine. I am just thinking - with this method I am going to incur more GC’s due to rotation of different backgrounds.
Anyone have any thoughts? Or is this just a straight trade off?
Cookie