Do you use Sprites for side scroller background images?

For games like Jet Pack Joyride, the many different background level designs are seamlessly joined together and go on for a very long time.

I’m wondering how this is achieved?

Do they have a super long PNG image (like 30,000px background image) that scrolls in the background or do they use Sprites chopped up into many frames on a single (or even multiple) sheets?

Thanks

I’m also curious how is this achieved, so I’ll help us by upping this thread.

Cheers

There are limits to the size images that can be loaded.  For many devices, this is a 2048x2048 image.  This would limit the backgrounds to a reasonable maximum of 2048 wide.  I doubt most people do this with sprites.  A more common technique is to use multiple backgrounds that are strung together.  In an endless running type app, this might mean repeating backgrounds after you cycle through your list.  On my space shooter, I used two 2048 long backgrounds and just cycled between them.

Rob

For my scrolling background, I had a similar approach to what Rob did. I basically displayed images and had their edges touch, creating a seamless effect. Whenever one image was about to go off-screen, I’d display a new one next to it.

To be efficient, the best approach is to have one more image than it takes to fill the screen. In doing so, as soon as the image goes completely off-screen, you can simply move it to tag onto the other end of the background.

Thanks Rob and IKinx for answers

If anyone else is interested in this kind of game creation, I actually found in the meantime a supercool free tutorial about making endless runner from a scratch, using Lua in Corona SDK:

http://mobile.tutsplus.com/series/build-an-endless-runner-game-from-scratch/

I just wanted to add that it’s not my site nor my tutorial, so I’m linking it only in the purpose of knowledge. If this violates Corona policy or something like that, please inform me and I’ll remove this.

Thanks everyone for the valuable information!! Since my background images won’t be repeating over and over, I think the best way for me is to save out multiple images and as soon as one starts to go off screen, i’ll call up the next image to create a seamless effect.

Again, thanks for your help!!

I’m also curious how is this achieved, so I’ll help us by upping this thread.

Cheers

There are limits to the size images that can be loaded.  For many devices, this is a 2048x2048 image.  This would limit the backgrounds to a reasonable maximum of 2048 wide.  I doubt most people do this with sprites.  A more common technique is to use multiple backgrounds that are strung together.  In an endless running type app, this might mean repeating backgrounds after you cycle through your list.  On my space shooter, I used two 2048 long backgrounds and just cycled between them.

Rob

For my scrolling background, I had a similar approach to what Rob did. I basically displayed images and had their edges touch, creating a seamless effect. Whenever one image was about to go off-screen, I’d display a new one next to it.

To be efficient, the best approach is to have one more image than it takes to fill the screen. In doing so, as soon as the image goes completely off-screen, you can simply move it to tag onto the other end of the background.

Thanks Rob and IKinx for answers

If anyone else is interested in this kind of game creation, I actually found in the meantime a supercool free tutorial about making endless runner from a scratch, using Lua in Corona SDK:

http://mobile.tutsplus.com/series/build-an-endless-runner-game-from-scratch/

I just wanted to add that it’s not my site nor my tutorial, so I’m linking it only in the purpose of knowledge. If this violates Corona policy or something like that, please inform me and I’ll remove this.

Thanks everyone for the valuable information!! Since my background images won’t be repeating over and over, I think the best way for me is to save out multiple images and as soon as one starts to go off screen, i’ll call up the next image to create a seamless effect.

Again, thanks for your help!!