Hello all... HQ backgrounds... how??

Discussion in 'Public Game Developers Forum' started by iMerlin, Nov 3, 2010.

  1. iMerlin

    iMerlin Member

    Oct 20, 2010
    8
    0
    0
    Hello all... Ive spent the last couple of months learning the ins-and-outs of gaming. I started with OpenGL ES, went to cocos2d and still having a good time with that.

    My one question that I cant seem to locate info on is how to do a nice, high quality background. Something with multiple layers one scrolling faster than the other... like parallax scrolling.

    Ive seen plenty of tutorials on tile maps and using Tiled to create them. Ive created a couple of basic, Zelda looking ones but Im looking for something that has some depth to it.

    Can anyone give me some pointers or a link to a tutorial on how to accomplish this?

    Thanks
     
  2. gammabeam

    gammabeam Well-Known Member

    I'd love to learn more about this as well!
     
  3. iMerlin

    iMerlin Member

    Oct 20, 2010
    8
    0
    0
    It doesnt look like we have any takers on this one gammabeam. There has to be a way to do it without having a super large png image as the background.

    I created a giant one and loaded it in and made it scroll so my player could use the accelerometer to move around, but this didnt really achieve what I was hoping for.

    I cant see doing this in Tiled, especially not with the 32px tile size. I wonder if I can have 320x480 tile sizes and just build it like that.
     
  4. There are two parallax samples in the Cocos2D package.

    They use the ParallaxNode to create a scrolling background.

    You can also do it yourself. Let's say you are scrolling the background from right to left and want to use several smaller "tiled" images.

    You add a new nodes/image on the right just before it would appear on the screen. Then every frame you move the visible images to the left. Then as each one moves far enough into negative x coordinates, you just remove it from the display.

    Once you've done this for one layer, just do it again with a second or third layer with new graphics and change the scrolling speeds.
     

Share This Page