User Tag List

Results 1 to 6 of 6

Thread: Best way of "building up" backdrops in large levels on Android?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)
    Xendelaar's Avatar
    Join Date
    Nov 2010
    Location
    netherlands
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face Best way of "building up" backdrops in large levels on Android?

    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.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    672
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    I have created an endless runner game for android where the play frame size is 130432x704 pixels.
    I use backdrop objects, i had unchecked "handle background collision outside the window" frame option, and every active has "inactive if to far" on "yes".

    So i would recommand the first option.

    I'm saving memory by creating on-demand the parts that are not needed like pause menu, etc...

    I never use any string object, i've replaced them by active system box, and i never do any loop for a text object, they are the most memory consumming thing on Android.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)
    Xendelaar's Avatar
    Join Date
    Nov 2010
    Location
    netherlands
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the tips! option 1 is also by far the easiest one so I'm glad to read that it's the best in your opinion!

    Does the pause function hoard memory? it's something i never use either! this is good to know. Also about the active system box. I never used it though.. I will experiment with it later on. Is a readable string that memory consuming?! that's so crazy haha.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,344
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Warning: Use active system box on Android at your own risk, there are so many bugs related to it, it has made me crazy. Unless you are not creating them at runtime and the screen will not scroll, then you might be fine.

    I have used a variation of your second method with success on Android, although I didn't paste the objects as background because I needed them to be destroyable. If it's only backdrops, I assume method 1 is sufficient, as Dobermann also has experienced

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)
    Xendelaar's Avatar
    Join Date
    Nov 2010
    Location
    netherlands
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bugs you say? darn.. I wouldn't want those! what do you use to display text with?
    What kind of program did you use option 2 for?

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    672
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    I have no bug with active system box, i use them everywhere, with scrolling and all, i call the texts in ini files for translations, etc..
    What bugs are you speaking about?

    The most consuming things is the active objects, in my games i limit the number of enemies at screen, and the others aren't created until they are needed, and i immediatly destroy the enemies that aren't needed anymore.
    My pause menu is composed only of active objects and texts (active system box) so it's why i destroy everything when i caluse the pause menu, and create everything back when the player hit pause button.

    I'm always looking to have the less objects at runtime, i'm also using CF2.5+ to check if there is event that are time consuming.

    iOS brings better performances in my opinion, but Android is the most used, with so much devices that have so bad hardware, and CF2.5 isn't the best option to run smooth on bad hardwares...

Similar Threads

  1. Replies: 5
    Last Post: 6th June 2017, 07:47 PM
  2. Replies: 1
    Last Post: 23rd December 2016, 12:35 AM
  3. Replies: 6
    Last Post: 15th June 2016, 06:05 PM
  4. "Delete created backdrops at" causes crash
    By FlipSwitchX in forum Android Export Module 2.5
    Replies: 1
    Last Post: 15th June 2015, 10:29 PM
  5. Patch Maker 1.3 "Not enough disk space" error on very large drive partitions
    By quark in forum Install Creator and Patch Maker
    Replies: 5
    Last Post: 25th March 2015, 01:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •