User Tag List

Results 1 to 7 of 7

Thread: Layer Slow Down

  1. #1
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Layer Slow Down

    I have a couple of questions regarding layers. I have 5 layers in a level for parallax effects and such in my application and my game starts slowing down to unplayable FPS when three or more enemies come onto the screen who rely on 31 fastloops for their line of sight to work properly. I am developing on a netbook because for one thing it's the only thing I have to use right now and for another thing I'm going to port the game to iOS when I am able so I thought a netbook would be a good development platform as well for this endeavor because it's probably somewhere near as powerful as the iPad or iPhone. Is there any way I can speed up my application?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2006
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the issue lies more with the 31 fastloops then the 5 layers.

    Also, iOS is not very fastloop friendly, it is recommended to avoid them for iOS. and 31 fastloops running is ALOT.

  3. #3
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you suggest I do instead of using fastloops to achieve line of sight?

  4. #4
    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)
    You could look at the ForEach object - it's a bit faster than FastLoops. Also, there may be other coding methods to get your line of sight working.
    Good luck!

  5. #5
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Isn't ForEach only good for iterating through clones of an object, though, rather than applying it to this situation? I'm already using ForEach to iterate through many clones of enemies in my game however. I've optimized the ForEach loops as much as possible I think.

  6. #6
    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)
    Corien - as I understand it ForEach will work with Qualifiers so they don't have to be clones of the same object. Simply make each object you need to check part of a qualifier group, eg Neutral and loop through that.

    So you have 31 separate fast loops? When I first read this I thought you just had 1 fastloop that looped 31 times!
    Are you doing a fastloop per direction? It might be possible to do all the directions at once in a single fast loop.

    You might be able to speed it up by using Automatic Pairing - see this useful article by Chris Burrows: http://www.diybandits.com.au/MMF/art...icpairing.html
    This way it should take similar amount of time whether you have 1 enemy or 10

    You might find some of Chris Burrows other tutorials & articles useful, eg embedded collision detection, fastloop bullets:
    http://www.diybandits.com.au/MMF/tutorials.html

    To see if it's your fastloops that are to blame try removing half of them or halving their loop count and see if you get a noticeable improvement in speed (remember to keep a backup of your original project, just in case)

    Another idea is to kill the 5 layers of parallax temporarily to see if you get enough of a speed improvement.

  7. #7
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have 1 loop going 31 times. Yeah it speeds up the game if I either get rid of the fastloop or the five layers. I need something to replace the 31 loops, if nothing else, to get the two line of sight objects for each enemy to move all the way across the screen but not through obstacles.

Similar Threads

  1. Layer Object: Moving X and Y of layer is very slow
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 5th April 2013, 01:19 AM
  2. Creating a new Layer: Layer referrances
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th October 2012, 11:44 AM
  3. Layer Object can't move counters to specific layer
    By JoKa in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th November 2007, 11:11 AM
  4. Big Bug my ufo slow down and application slow down
    By DJ_Wild in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th October 2007, 04:58 PM
  5. Bug when moving a layer with layer object
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 2nd July 2006, 11:40 PM

Posting Permissions

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