Content loading on the fly

Hi there,

I’m building an endless runner game for iOS. Player will teleport to various levels with completely different graphics, so I can’t hold them all in the memory. Is there a way to load them on the fly while discarding the others? Does the iPhone make a hickup when I load new stuff into the memory?

Thank you

K.
[import]uid: 99031 topic_id: 33805 reply_id: 333805[/import]

Can you put each level in its own scene, using Director or Storyboard? Then you could load the new graphics and discard the old ones between levels. If the graphics are large you could play a short animation while they load. You’ll have problems if you try to load images during gameplay.

Alternatively you could do it all in one scene. Just play an animation or use a loading bar to cover the screen while the graphics are swapped out in the background. And only draw the images when they’re on or about to come onto the screen. [import]uid: 109535 topic_id: 33805 reply_id: 134358[/import]

Can you put each level in its own scene, using Director or Storyboard? Then you could load the new graphics and discard the old ones between levels. If the graphics are large you could play a short animation while they load. You’ll have problems if you try to load images during gameplay.

Alternatively you could do it all in one scene. Just play an animation or use a loading bar to cover the screen while the graphics are swapped out in the background. And only draw the images when they’re on or about to come onto the screen. [import]uid: 109535 topic_id: 33805 reply_id: 134358[/import]