Advertisement

Help with backgrounds/foregrounds

Started by September 26, 2000 02:19 PM
0 comments, last by OoMMMoO 24 years, 3 months ago
Im working with directx on a side scroller game, I want to make a level in the forest where there are trees behind the character and trees behind those trees that move a little slower than the ones in front, I also want to maybe have a tree or 2 infront of the character as your running through the level how would I go about doing this?
quote: Original post by OoMMMoO

Im working with directx on a side scroller game, I want to make a level in the forest where there are trees behind the character and trees behind those trees that move a little slower than the ones in front, I also want to maybe have a tree or 2 infront of the character as your running through the level how would I go about doing this?


i believe most people refer to this as parallax scrolling. Generally you can create a region for each parallax level as big as the screen. As the player moves you move each of these regions forward, but at a different speed (far away levels move slower). Assign all objects to a certain parallax level, and give them a world position. You clip the object against its parallax level region and draw it to the screen. At a certain point you may want pieces of the background to repeat. There are different ways to impliment this.

cmaker

- its not the principle. its the money.
cmaker- I do not make clones.

This topic is closed to new replies.

Advertisement