User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 26

Thread: Slight but noticable slowdown after adding a bunch of active objects for dark effect

  1. #1
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Slight but noticable slowdown after adding a bunch of active objects for dark effect

    Hi guys, been awhile and hard at work on my new game however I ran into a snag last night that while not crippling it's a bit disheartening because I really don't want to remove this feature.

    My game Weebish Mines is a platformer / Metroidvania that's very influenced by the old NES classic "Legacy of the Wizard". Anyhow all's well with how I'm handling the dark effect / torch areas in the game normally but after I added the effect to an entire game area I'm noticing a lot of slowdown.

    Each 'tile' or whatever (though techincally it's not really tile-based) is a black 16 x 16 active object that exists on top of everything. I'm running a fast loop through the # of black tiles that sets their flag 0's to *off* and then if any are overlapping the guy's torch it sets that flag 0 to *on*. Last if any flag 0 is *on* it makes that black tile invisible and we get the effect that's seen here in this video:

    http://www.youtube.com/watch?v=_sNco4rbSqY

    (Sorry I forgot how to embed a youtube video here)

    I thought at first it might just be the fastloop process for these now that there's a lot of them however upon disabling the fastloop completely I'm still getting the slowdown. So since I figured maybe it had something to do with the amount of active objects on the screen I tried increasing the # of objects at runtime from 1000 to 2500 and then 5000 for laughs but the slowdown still remains.

    Sorry, I hope this is clear enough. I don't have HWA or even know how it'd work with this if I could. Any tips for solving my problem please? I'm using vanilla MMF2, a slightly older build than the current one- I just don't know what build it is right now (254, 255?)

    Thank you!!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Del_Duio View Post
    Hi guys, been awhile and hard at work on my new game however I ran into a snag last night that while not crippling it's a bit disheartening because I really don't want to remove this feature.

    My game Weebish Mines is a platformer / Metroidvania that's very influenced by the old NES classic "Legacy of the Wizard". Anyhow all's well with how I'm handling the dark effect / torch areas in the game normally but after I added the effect to an entire game area I'm noticing a lot of slowdown.

    Each 'tile' or whatever (though techincally it's not really tile-based) is a black 16 x 16 active object that exists on top of everything. I'm running a fast loop through the # of black tiles that sets their flag 0's to *off* and then if any are overlapping the guy's torch it sets that flag 0 to *on*. Last if any flag 0 is *on* it makes that black tile invisible and we get the effect that's seen here in this video:

    http://www.youtube.com/watch?v=_sNco4rbSqY

    (Sorry I forgot how to embed a youtube video here)

    I thought at first it might just be the fastloop process for these now that there's a lot of them however upon disabling the fastloop completely I'm still getting the slowdown. So since I figured maybe it had something to do with the amount of active objects on the screen I tried increasing the # of objects at runtime from 1000 to 2500 and then 5000 for laughs but the slowdown still remains.

    Sorry, I hope this is clear enough. I don't have HWA or even know how it'd work with this if I could. Any tips for solving my problem please? I'm using vanilla MMF2, a slightly older build than the current one- I just don't know what build it is right now (254, 255?)

    Thank you!!
    HWA is only available in the newer builds. You should really try the latest version, HWA really makes a difference. After doing that, simply change the display mode to be "Direct3D9", and your game will use HWA. Also, instead of using a fastloop to loop through objects, you should try the ForEach object (as soon as the download link is back, that is, since the site where you download it from is down as of now (alternatively, I could potentially upload my copy of the ForEach object so you can download it before then)).

  3. #3
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by happygreenfrog View Post
    HWA is only available in the newer builds. You should really try the latest version, HWA really makes a difference. After doing that, simply change the display mode to be "Direct3D9", and your game will use HWA. Also, instead of using a fastloop to loop through objects, you should try the ForEach object (as soon as the download link is back, that is, since the site where you download it from is down as of now (alternatively, I could potentially upload my copy of the ForEach object so you can download it before then)).
    I'll download the current build of MMF2 now and start using it later today. The main reason why I haven't yet is when I made the jump from MMF1.5 to MMF2 a lot of things that should have worked with MMF2 didn't and it caused huge problems that took awhile to fix. I guess I just don't want to have to go back and fix a bunch of stuff that already works with my old build

    So do you think HWA might solve the problem? I've heard of it of course but I'm not sure on what it does exactly. Do you have to have a really good computer in order to have a game that can run using it? The main computer I make my stuff on isn't connected to the internet ever to avoid getting viruses and etc and it's maybe 5 years old or so.

    And what's ForEach? I finally started learning how to correctly use fastloops lol.

    Thank you for your reply!

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Del_Duio View Post
    I'll download the current build of MMF2 now and start using it later today. The main reason why I haven't yet is when I made the jump from MMF1.5 to MMF2 a lot of things that should have worked with MMF2 didn't and it caused huge problems that took awhile to fix. I guess I just don't want to have to go back and fix a bunch of stuff that already works with my old build

    So do you think HWA might solve the problem? I've heard of it of course but I'm not sure on what it does exactly. Do you have to have a really good computer in order to have a game that can run using it? The main computer I make my stuff on isn't connected to the internet ever to avoid getting viruses and etc and it's maybe 5 years old or so.

    And what's ForEach? I finally started learning how to correctly use fastloops lol.

    Thank you for your reply!
    To use HWA, you just have to have a computer with a graphics card, it doesn't have to be good at all (the laptop that I'm using being a good case-in-point). HWA just uses the graphics card for drawing things instead of the CPU, which makes the CPU have a much lighter load. ForEach is an extension available for MMF2, it's basically a fastloop for objects (it loops through each instance of an object, and it's a lot faster than a fastloop).

  5. #5
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by happygreenfrog View Post
    To use HWA, you just have to have a computer with a graphics card, it doesn't have to be good at all (the laptop that I'm using being a good case-in-point). HWA just uses the graphics card for drawing things instead of the CPU, which makes the CPU have a much lighter load. ForEach is an extension available for MMF2, it's basically a fastloop for objects (it loops through each instance of an object, and it's a lot faster than a fastloop).
    Thank you, that's very helpful info!

    I've scoured the internet and all roads to that ForEach object seem to lead back to a link that's no longer valid. Is it included in 256 build do you know?

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Del_Duio View Post
    Thank you, that's very helpful info!

    I've scoured the internet and all roads to that ForEach object seem to lead back to a link that's no longer valid. Is it included in 256 build do you know?
    I don't think it is, but someone who has it could put their copy of it in a ZIP file and upload it here for you.

  7. #7
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well, until that happy day I'm going to give the new build's HWA a shot and see if that fixes the currrent issue.
    Thanks a

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleUnicode Add-on
    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)
    AyreGuitar's Avatar
    Join Date
    Jan 2011
    Location
    Wales, UK
    Posts
    1,113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Del_Duio - I'm pretty sure you don't need any kind of looping as long as all your black tiles are duplicates (not clones) of the same object. Try this:

    Always - Show Black Tile
    If Torch is overlapping Black Tile - Make Black Tile Invisible

  9. #9
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Blaaaaaaah..

    I installed build 257.12 and using Direct3D8 it worked and solved the slowdown up until I killed a bat where it immediately crashed (the program tries to create a blood splash and change the scale a bit, nothing fancy). Worse, with this new build MMF2 crashed 4 times in the span of 15 minutes just when I tried to scroll around the frame at design time! Any idea if that's a common occurence with the new build or why that might be happening?

    Moew info: My game's running at 47-50 FPS normally until I move the guy in the center of the frame and it starts scrolling, where it dips down to 32 FPS. All the black tiles are copies and not clones, and it HAS to have something to do with the amount of objects and not the fast loops as a last ditch effort I deleted the whole fast loop event group and the slowdown was still there while running the standard display.

    So I've had to revert back to Standard display as Direct3D9 (suggested above and what I tried first) made my graphics all distorted and blurry.

    I have 512RAM and the crap Dell standard factory graphics and sound card. Which might mean I have no graphics card at all, who knows? Doesn't / shouldn't MMF2 auto shut off the HWA if it can't be used by the end user? I mean how do you guys handle your games that have HWA in them? Won't it crash a lot for people without graphic cards?

    Sorry if my terminology's all wrong!

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, man. Why don't you try using the textblitter object instead? Just make it pretty big and have it have 32x32 black boxes as characters (you only need 2 characters: empty and black). You can use the callback function to isolate the specific character in an x,y region where your player is, relative to the textblitter's x,y positions, and max that character's semitransparency. I've never done it, but it should be pretty simple, as callbacks are extension-based loops. Using a bunch of actives without HWA in a big frame does probably cause a big slowdown.

    I hope a guy called Fifth sees this, as he's bent that extension to fit similar circumstances with awesome results.

    Alternatively, doing what AyreGuitar suggests is a good idea, but if you go that way don't use overlapping conditions. Compare regions/alterable values instead: always set each black box's alt value A to their own grid coordinates (ie. (x/32*1000)+(y/32)), and then compare that value to the player's (ie. value A of black box = (player's x/32*1000)+(player's y/32) -> make black box invisible. Just remember to add an always condition before this condition that makes the black boxes visible. MMF's object selection loops are much faster than fastloops.

    That game's looking nice, by the way

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. [Massive Bug] Large String objects cause huge slowdown
    By netninja in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 11th November 2013, 03:35 AM
  2. [BUG 257-9] Large background objects causing slowdown
    By AyreGuitar in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 21st April 2013, 11:24 AM
  3. Active picture object - slowdown on layer 2
    By willy in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 27th August 2011, 07:21 PM
  4. Problem with paralax effect giving slowdown
    By Daimonmau in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 23rd June 2010, 05:21 AM
  5. Adding Player2 without active
    By Blizna in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 21st September 2007, 06:48 PM

Tags for this Thread

Posting Permissions

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