Friday, October 12, 2012

Android scrolling background

OK, here we are.  This is how I implemented the scrolling background in Spy Jumper.  Pretty simple.  Basically it takes images that are width by (width/2).  They are stacked on top of each other.  It basically recycles one of 6 sections (or however many you want to set) to the top of the screen.  Speed can be adjusted for the scrolling and I use a formula to calculate for screen densities. In the below image is 4 different sections of background being called. 0,0,1,2,3,0
 

No comments:

Post a Comment