Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Aditya

Blitting an infinite scrolling parallax background with BlitMask

Recommended Posts

Hi all,

I have created an infinite scrolling background with 4 layers. For giving the wrapping effect on each layer, I am using 2 copies of the same image and during the loop i am shifting the x positions.

 

Now i want to use BlitMask for this, and i have sccuessfully implemented it too. I just want to have one doubt cleared :

 

- there are 4 sprites for each layer updating in an update loop

- these 4 layers are a child of BGScreen sprite

 

should I use the BlitMask for just the BGScreen sprite or should I create 4 instances for each layer so that i can use the wrapping feature and then blit them each. And finally blit the whole BGScreen sprite too ??

 

any other suggestions are also welcome

 

thanks :)

 

I am attaching the two as files... just for your reference

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×