[F8] BitmapData - Infinite Scroller Questions
Hey peeps, yesterday i told myself to learn about this BitmapData class that i have been hearing so much about lately. Now to my suprise it wasn't as complex as i thought it was going to be.
Now what i am trying to do is create an infinite platform scroller. Made up of random tiles. But thats the problem.
What i have done, is made a tileset.gif which is 4 tiles wide and 3 tiles high. Each tile is 70 wide and 100 high. I have 3 bitmap data objects
tileBmp (The main tileSheet gets loaded into here)
levelBmp (Random tiles are selected to make up a level of 40 tiles)
screenBmp (This is the Bitmap that gets rendered to the screen
Here is an example here of what i have done so far. (PS i just quicly made the tiles so no laughing)
BitmapData Platform Scroller
Now i cant seem to figure out a way to keep looping through the image to make it look like an infinite scroll. Does anyone have any concepts they have used to achieve this. Also is their a better way to do this. I was also trying to think of a way to loop through all the tiles in order an infinite amount of times. With no success.
This is for my current project, i posted in my blog, link in my footer :D
PS: Its amazing what a performance hit it takes in a browser. I get 120 fps in the flash player and max 62 fps in a browser.