dynamic image loading - lag

I'm currently putting together a 2d side scroller. To stay under the texture memory limit I'm loading the background images on the fly and removing the old ones. The problem I'm having is that there is a half second lag/freeze in the game when the image is loaded for the next background. I've been googling and whatnot and have yet to find an answer... setting the (isVisible = false) property does not have any effect on the texture memory.

Basically I'm wondering if anybody has found a solution.

thanks,
Steve

The problem and the solution are obvious: loading an image takes time, so there's no way to do this without a lag (on mobile devices with Corona).

The easiest solution is preloading all images. If the size of the background is too big you will need to re-use images and create some sort of tiled background.

views:1508 update:2011/10/17 21:25:02
corona forums © 2003-2011