User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Switching background scenery during runtime

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    USA
    Posts
    2,970
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Switching background scenery during runtime

    Okay the game I'm working on I'm switching backgrounds during the game, which is basically in one frame. I have two methods I can use. First one I'm considering is just using backdrops on different layers, and when I need to switch the scenery, hide one layer, show the next one. The other method is just using active objects for the scenery and just changing animations to a different one. It only takes place in one frame and only one screen, so you don't have a big scrolling level.

    Anyway, I was just wondering which one would be less demanding on resources during runtime, especially if I have a lot of things going on at once on the screen. I don't know if layers can affect performance if they are being hidden.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching background scenery during runtime

    Changing the animation in an Active Object is definitely better than hiding and showing layers, performance wise.
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    USA
    Posts
    2,970
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching background scenery during runtime

    Quote Originally Posted by StephenL
    Changing the animation in an Active Object is definitely better than hiding and showing layers, performance wise.
    Okay, that's what I was thinking. Just switching animations on actives would probably be easier anyway.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching background scenery during runtime

    Why would that be true since you only display one set of layers at a time? Why would the performance be worse than having a giant environment made of tons of actives instead of displaying only the needed layers which are made from background objects?

    Not saying you're wrong, just wondering why its so.

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    USA
    Posts
    2,970
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching background scenery during runtime

    Quote Originally Posted by HolyMonkey
    Why would that be true since you only display one set of layers at a time? Why would the performance be worse than having a giant environment made of tons of actives instead of displaying only the needed layers which are made from background objects?

    Not saying you're wrong, just wondering why its so.
    That's what I was debating on. I wasn't sure how layers worked. For instance, if you have a layer hidden and it was removed from being displayed, I didn't know if it didn't really load anything until you show it, or not. I know backdrops take less resources than actives, and I know layers can affect performance with parallax scrolling. But since I'm not doing scrolling of any kind, I don't know if that would matter or not. And I'm not sure if it was really clear in my original post or not, but the game is one screen only, as in you have a 640 by 480 frame and that's it.

    Now, if I had a bunch of layers for different backgrounds, I'm guessing that would hog memory if it's loaded up, but just set to invisible. Whereas an active with animations would only ever display one animation at a time, so even though it's an active, you still don't have as many objects loaded into memory. Other than taking more memory though, I'm not sure if multiple layers would actually affect the active objects and frame rate, especially since I'm not doing any sort of parallax scrolling.

    I'm just making wild guesses though and I'd have to have someone give a definitive answer.

    Like you, I'm just merely curious about the mechanics behind all of this.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching background scenery during runtime

    Unless someone with specific experience or a member of Clickteam give a difinitive answer I'd sugget you do a benchmarking test...try both methods with a frame rate counter on both.

  7. #7
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    USA
    Posts
    2,970
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching background scenery during runtime

    Another thing to consider is if I just used a quick backdrop for the backgrounds instead of making the scenery multiple backdrop objects. I seem to recall quick backdrops don't use nearly as much resources, but I don't know if that's only when you make it a gradient or a small motif image. If I used a 640 x 480 quick backdrop image I don't know if that matters. It wouldn't be very hard to place all the backdrops where I need them to make up the scene, then do a print screen and paste it as one image. Then import that to a quick backdrop.

  8. #8
    Clicker Fusion 2.5
    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)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    338
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching background scenery during runtime

    I think you are right with the quick backdrop thing. It saves memory because it uses small images and tiles them repeatedly to create a larger image.

    Using very large images (640x480) is just slower in general because you are dealing with one big image file. Creating a scene with many smaller background objects would be more ideal on memory. This is why old console games compose large backgrounds of dozens of small 16x16 tiles. Its just more efficient.

    But with the speed and power of computers now, I don't really think it makes a significant difference as long as you are doing it efficiently.

    I would recommend making a separate application trying both options, as someone mentioned above. Do a stress test to see how far you can go with each option, and keep track of your frame rate.

    But I'm sure that on a PC game, using large image files should run just fine. Unless you are planning to port your game to the Gameboy or something.

  9. #9
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    USA
    Posts
    2,970
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Switching background scenery during runtime

    Right now, my game is done in HWA. I may or may not be able to do it in Flash. So taking that into consideration, I would have to do things efficiently to port it to Flash. I'm guessing I'm going to have to change the Flash version of the game a bit to make it run smoothly.

    For the background though, I think I'm going to keep it as separate objects. Making it one big 640 x 480 image I think is the wrong way to go, for obvious reasons. So, now I would just need to test using actives or layers with backdrops. Since I'm using HWA I don't think having the background being actives would matter much. But when it comes to a Flash version I'd have to test to see what runs better. And to save myself a headache, doing it once for both versions makes the most sense.

  10. #10
    rrzillesg
    Guest

    Re: Switching background scenery during runtime

    "background images object"

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Change Background color of string at runtime.
    By Earl in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th June 2012, 10:23 AM
  2. Switching Graphical Modes on Runtime?
    By Renatos in forum Hardware Accelerated Runtime
    Replies: 12
    Last Post: 4th June 2009, 05:49 PM
  3. Gradient Background - that can change at runtime?
    By RickyRombo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 29th May 2009, 05:47 PM
  4. switching 'change resolution mode' at runtime
    By integrality in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 5th April 2007, 03:51 PM
  5. display mode switching at runtime?
    By integrality in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 22nd February 2007, 12:48 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
  •