User Tag List

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

Thread: Understanding Object Overlap

  1. #1
    Clicker Fusion 2.5 Developer
    TheFieryPlumber's Avatar
    Join Date
    Oct 2012
    Location
    Delaware
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Understanding Object Overlap

    What I understand about MMF2 is that it's impossible for objects in different layers to collide or interact with one another; what happens if a large mother object has multiple child objects, and perhaps I want to have the player object overlap behind or in front an extensive library of certain categorized objects (Which could've been easy if the layers have the option to interact). Is there a simpler alternative method of arranging objects cleanly without the constant use of "send to back", "send to front", "send backwards", or "send forwards"?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An Overlap Condition triggers regardless of which Object is visually in front or back of eachother ( they need to be on the same layer though ).

    You can easily have Overlaps across all of your Layers, its just a little messy.

    METHOD A
    Say your Player exist in Layer 1.
    And you want the Player to be able to interact with Objects in Layer 2.
    You can have an invissible Player Dummy Object ( like a collision mask ) existing in Layer 2, which allways follows the Players possition.
    This way you can easily determine if Player in Layer 1 is Overlapping something in Layer 2, without messing with Players Order or Layer in any way.

    METHOD B
    You can have the Player interact with any number of Layers, by moving Player thorugh all the Layers and check for Collisions inbetween the moves, and of cource move him back to his original Layer in the end, like this:

    ( Player starts at Layer 1 )
    - Check for Collision
    - Move Player to Layer 2
    - Check for Collision
    - Move Player to Layer 3
    - Check for Collision
    - Move Player to Layer 1

    This method will probably mess up the Players Order when he returnes to Layer 1.
    You could maybe overcome this by storing the Players Order ( Z position? ) before you move it between Layers, and apply the Z position once it returns again, dont know how this will work out though ( i think you need the Layer Object for this ).

    METHOD C
    This method does not require any extra Objects and does not require you to move Objects between Layers to check for Overlaps.
    This methos can check for Overlap across all or any Layers without much hazzle, but all Overlap areas ( or collision masks if you prefer ) have to be rectangular.

    To do this method you manually check for Overlaps by compairing to the overlaping Objects X Y coordiantes, hench the rectangular Overlap areas.
    When you compair Object X Y coordiantes this way, which Layers the Objects reside in is irrelevant.
    Your mind might melt trying to do this method, but it shouldnt be that hard.
    ...
    Dono if this is of any help.
    If not maybe you could explain again?

  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)
    Quote Originally Posted by TheFieryPlumber View Post
    Is there a simpler alternative method of arranging objects cleanly without the constant use of "send to back", "send to front", "send backwards", or "send forwards"?
    Yes. Use the Layer Object.

    Always -> Sort by Y position decreasing

    This will cause any object with a lower Y value to draw behind any object with a higher Y value. This is usually the solution to the majority of people's layering issues. For more advanced situations, you would sort by an alterable value decreasing, and the alterable value would be the object's y position plus some other manually defined value to force certain objects to draw at a specific level.

    Also want to throw out there.... you don't have to use an Always event if the objects aren't going to be moving around one another. You can just sort once and be done with it. For instance, if you just have some level and you want to make sure all the objects properly draw to the right order straight away, you can change it to Start of Frame and then do the y decreasing sort once.

  4. #4
    Clicker Fusion 2.5 Developer
    TheFieryPlumber's Avatar
    Join Date
    Oct 2012
    Location
    Delaware
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Konidias View Post
    Yes. Use the Layer Object.

    Always -> Sort by Y position decreasing

    This will cause any object with a lower Y value to draw behind any object with a higher Y value. This is usually the solution to the majority of people's layering issues. For more advanced situations, you would sort by an alterable value decreasing, and the alterable value would be the object's y position plus some other manually defined value to force certain objects to draw at a specific level.
    Thank you for replying, but exactly what do you mean by "Y value"?

    A. The vertical position of an object (whether it's above or below another object)
    B. An option in the "layer object" that manages the Z value of each active object (saying I can write a custom value number for each object that indicates how the objects are behind or in front one another)

    P.S- Can the layer object manage the arrangement of groups of objects?

    King_Cool- I understand that objects will always interact with one another if they're in the same layer. The reason this concerns me is because, I want objects to overlap properly; like having all items always appear inside containers (say, transparent glass container with opaque light streaks and all) rather than having an odd couple of items appear in front of the containers.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheFieryPlumber View Post
    Thank you for replying, but exactly what do you mean by "Y value"?

    A. The vertical position of an object (whether it's above or below another object)
    B. An option in the "layer object" that manages the Z value of each active object (saying I can write a custom value number for each object that indicates how the objects are behind or in front one another)

    P.S- Can the layer object manage the arrangement of groups of objects?

    King_Cool- I understand that objects will always interact with one another if they're in the same layer. The reason this concerns me is because, I want objects to overlap properly; like having all items always appear inside containers (say, transparent glass container with opaque light streaks and all) rather than having an odd couple of items appear in front of the containers.
    But... Thats your job man, you have to programm the Items to order behind the Containers, or the Container to be infront of the Items...

    Are you saying you dont know how to do this?
    That you find it problematic how its done?
    Or are you looking for the 'best' way of doing it?

  6. #6
    Clicker Fusion 2.5 Developer
    TheFieryPlumber's Avatar
    Join Date
    Oct 2012
    Location
    Delaware
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To be honest, I'm looking for the most efficient way of doing it.
    Even as a really novice programmer, I know how to arrange objects properly but individually, as well as executing simple customized code.
    I know programming's the toughest and longest part about making even the simplest game; I just want to make the game with as little mundanity and unnecessary time consumption as possible.

    "...having all items always appear inside containers..." What I mean by that is "without even looking at the "send to back", "send to front" options, I can simply have an item object or an entire group of item objects remain behind the container objects, no matter how much I copy, clone or manipulate.”
    To my understanding of the layer object both you and Konidias is referring to, if the "Y value" of the layer is identified as B (And by looking back at your suggestion in Method B, it's probably true), that itself just made my programming job a tad less tedious.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think what will benefit you ( if you dont allready know ) are Qualifyers.
    You can apply Actions to groups of Objects, by giving the Objects the same Qualifyer and referring to the Qualifyer in the Event Editor.
    You assign a Qualifier to an Object thought its Property Window.

    Think of it as a bunch of Objects belonging to the same group, for convenient and easy referrance.
    Hope this helps.

  8. #8
    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)
    Quote Originally Posted by TheFieryPlumber View Post
    Thank you for replying, but exactly what do you mean by "Y value"?

    A. The vertical position of an object (whether it's above or below another object)
    B. An option in the "layer object" that manages the Z value of each active object (saying I can write a custom value number for each object that indicates how the objects are behind or in front one another)

    P.S- Can the layer object manage the arrangement of groups of objects?
    By Y value I mean the Y position of each object. The vertical position.

    But as I mentioned, you can also sort by any value you choose. In my above post I mentioned if you want more control over specific objects, you would set an alterable value to their Y position and then some other value that will force that object to be treated like it's at a different Y position. For example, if an object is at Y position of 200 and you set the alterable value to Y position + 100, then the value will be 300, and the object will get sorted as if it's at Y position 300 (meaning it will draw over an object that is at y position 250 even though the original object is really at Y position 200... since the layer object *thinks* it is at 300 and not 200)

    As King_Cool mentioned, you can use qualifiers to group objects together, and then apply my technique to force them to always draw on the same "level" together. However I still don't think you're going to get exactly what you're wanting. If you posted an example of what you need, we could probably get it to work for you.

  9. #9
    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)
    I made an example... when you load up the example, it will actually be "broken". Read the comments to see how to fix it. Then it will make a bit more sense what is happening.

    layering-konidias.mfa

  10. #10
    Clicker Fusion 2.5 Developer
    TheFieryPlumber's Avatar
    Join Date
    Oct 2012
    Location
    Delaware
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Man, it would've been awesome if the answer was B!

    Thank you both so much for your help!

    I will use the layer object and find a way to work around it, so every object has their own place in the game.

    P.S- The constant mention of "groups", I did mean qualifiers; I knew the term and its use, but I just forgot the name.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Understanding ForEach Object and Parent/Child Objects...
    By TheFieryPlumber in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 24th May 2013, 03:19 PM
  2. How to make a backdrop object overlap an active object? mfa included
    By path in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 30th August 2012, 10:07 PM
  3. Object overlap - Overlap area
    By Ls2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 12th May 2012, 10:06 PM
  4. Testing overlap between two of the same object
    By brawltaunts22 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 3rd May 2012, 12:45 PM
  5. [IsItPossible?]Get %age of object overlap
    By Karzon in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th March 2008, 11:47 AM

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
  •