0
votes

I want to use in my game effect of perspective view by using few layers, scrolling with different speed. I have three layers. My background is bottom layer, it scrolls very slowly, so it can be in a few times smaller than level. My "semi-background" is second layer, which lays between foreground and background. It scrolls with medium speed, faster than background, but slower than foreground. Third layer is foreground, it scrolls with speed, that my character moves. For scrolling foreground I simply use CCFollow action for my CCLayer, where all objects are placed. Now I'm confused, what is the best way to implement my first and second layers. Does cocos2d have any actions, similar to CCFollow, but having custom speed (speed is not best word to use, but it's difficult to find appropriate term for me)? My background and "semi-background" images are tiled textures.

1

1 Answers

0
votes

The term that describes what you're looking for is "parallax scrolling". There's an entire chapter devoted to it in Steffan Itterheim's book.

I found this tutorial in a quick Google search.
(Dead link above. Wayback Machine led me to this video.)

I hope that helps a little bit!
Mike