User Tag List

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

Thread: Tearing hear out over Order. Proper way to do it?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Tearing hear out over Order. Proper way to do it?

    I always get loads of problems with order of objects if not using tons of layers. Is there some definite good and simple way to handle ordering of objects that works? What I am doing now is having an event that goes through all sorts of objects and moves them to the back, so I start with the objects I want in front and go down the list. For example if I want the grass to be in front, the player to be in the middle and the trees to be in the back it looks like this:

    Run event once:
    Move grass to back
    Move player to back
    Move trees to back

    This does not work very well though and often objects seems to still not be in the right order, especially if they move around in the frame later.

    I know there is the Layer object, I dont want to have an event running ALL the time though sorting the order of things because I have heard that can be very heavy on performance?

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Hm maybe found a better way with ForEach by doing a loop for all objects once.. but still maybe easier way that don't require so many events? (and I am not 100% sure yet this works 100%)

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    use the Layer Object. It doesn't sort constantly, only when you want it to.

    You could have it sort once when the level is created, and of course it's going to need to sort if objects move around.

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Konidias View Post
    use the Layer Object. It doesn't sort constantly, only when you want it to.

    You could have it sort once when the level is created, and of course it's going to need to sort if objects move around.
    Sort with Layer Object how? I need to specify in what order I want them to sort somehow

  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The Layer Object has a Sort Object By command. If you set up

    Always
    >Sort Objects By Y Decreasing

    They will be layered right. You'll have to work with the object Hotspots to ensure layering works right. If you want a quick tutorial example on it send me an email to pkb@iol.ie and I'll send you an example file.
    KnightTrek Productions
    http://www.knighttrek.com

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul_Boland View Post
    The Layer Object has a Sort Object By command. If you set up

    Always
    >Sort Objects By Y Decreasing

    They will be layered right. You'll have to work with the object Hotspots to ensure layering works right. If you want a quick tutorial example on it send me an email to pkb@iol.ie and I'll send you an example file.
    Yes but that is not how I want to sort the objects. I am trying to do different "layers" without using layers. Like trees, player, enemeis, grass and so on. They will have the same Y because it is a sidesrolling platformer. It will be really clumsy if I have to adjust all the hotspots on every item, what if I create a new item and need that sorted, then I need to go into every object again and adjust the hotspot again on all items to make it right. Also I dont know of any way to do scaling that is not dependent on where the hotspot is positioned (like if you want to scale up an object equally on all sides you need to have the hotspot in the middle as far as I know)

  7. #7
    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)
    Outcast - The Layer object is definitely the way to go IMHO.
    You can have the objects sort on an alterable value using the Layer object if you don't want to use the Y coordinate, so you could set all your trees Alt Val A to 1, grass to 2, enemies to 3, player to 4, etc

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AyreGuitar View Post
    Outcast - The Layer object is definitely the way to go IMHO.
    You can have the objects sort on an alterable value using the Layer object if you don't want to use the Y coordinate, so you could set all your trees Alt Val A to 1, grass to 2, enemies to 3, player to 4, etc
    I tried that but did not work. I guess because how could it know how to sort them when so many objects have the same value?

  9. #9
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Oct 2006
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do the reverse, bring stuff to front, not send to back.

    Move trees to front
    Move player to front
    Move grass to front.

  10. #10
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Outcast... you'll need to post an example or a screenshot or something. Without us knowing what your game looks like, we can't advise you any more on how to set up the layering.

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Check for Tearing?
    By FinalSpecimen in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 27th February 2013, 11:28 AM
  2. [bug] Texture tearing
    By colej_uk in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 14th March 2012, 05:36 PM
  3. Unable to hear music in runtime
    By Apex in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 26th November 2011, 06:50 PM
  4. Can't hear samples - Win7
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st January 2010, 03:44 PM
  5. Serious tearing
    By RayMarble in forum Hardware Accelerated Runtime
    Replies: 8
    Last Post: 27th October 2009, 08:22 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
  •