I was wondering. Iím aware that fastloops are apparently a huge no no for android applications. But so are large backdrops.
Say, I have a top down scrolling game which contains a large level of 50-100 smartphone screens full of backdrops. letís say the screen size is 760 x 360 pixels, and the complete level is ~7600 x 3600 pixels.
Which approach would be the least cpu/memory consuming :
1. The conventional way
Just build the entire level out of backdrop from the beginning. By this I means I would build the entire level in the level editor using 32x32 backdrop tiles. The entire level would contain 238 x 113 tiles at any given moment.
2a. Fastloop-Build the level as you scroll along way
Build the level as the player moves across the playing field using one active object containing all possible backdrops and a fastloop that pastes the active object into the background as you scroll to that particular spot in the level. An array would be used to determine which backdrop will be pasted into a specific location. The backdrops that are out of the playing field will be destroyed.
2b Regular-loop-Build the level as you scroll along way
This just came to me.. I could easily omit the fastloop and build us a normal loop to cycle an active object (containing all backdrops) across the borders of the playing field and paste the right active object as a backdrop into the background using the same array containting the data of the level. It would be slower than option 2a, but I could increase the speed by adding more active objects that are pasted into the backdrop.
Option 1 would off be the most convenient method to use and test. Options 2a and 2b will require some serious programming, but it would be doable. I would also have to make a level editor to store the right information into an array.