User Tag List

Results 1 to 5 of 5

Thread: Possible solution to overlap delay (courtesy of BartekB)

  1. #1
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    603
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Possible solution to overlap delay (courtesy of BartekB)

    So @BartekB posted a neat idea in the Fusion 2.5+ thread when I mentioned the Overlap Delay bug.

    Quote Originally Posted by BartekB View Post
    @casleziro Not related to the question's answer, but have you considered having invisible hitbox actives at 0,0, moving the first object in relation to the second* and checking against that instead? I started wondering of other workarounds when you have listed yours. I have not tested this yet, but in theory it should work.

    * By "Moving the first object in relation to the second" I mean:

    then... in another event:

    lastly...


    This makes use of the fact that collision masks don't move, therefore, you move the first object in relation to how the collision would actually happen.

    In another similar solution, you could save the position at start of event loop, then when you want to overlap, you move the first object negative of what the second object moved with this expression:

    Same for Y. This solution has the advantage of not using an additional object as the collision mask.

    I do not want to derail this thread that is about 2.5+. So perhaps a new thread should be opened up if this is going to be discussed further.
    At first I thought his solution wouldn't work, similar to the "prediction" method that had been tried previously, but I threw something together anyways and I think I might have been wrong: bartekB overlap delay.mfa

    This appears to be working 100%.

    The only downfall I can see is that in order to use this method, you would need to iterate through each object that can be collided against, and move the initial testing object through all of their delta positions and back in order to test collision, and do this for every testing object. This might end up being more expensive than the "create new object" method in the grand scheme of things

    But unless anyone finds a situation where this method fails, I think it can be added to the list of solutions to this problem.

    Tagging @schrodinger and @Volnaiskra since we all brainstormed hard about solutions to this in the past

  2. #2
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    603
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Realized I had the "move" events under the "move relative" events. Switched them around:bartekB overlap delay2.mfa

  3. #3
    Clickteam Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleInstall Creator Pro
    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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    619
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hey, thanks for making it into an example!

    With your iterations downside, you could for each loop an object that requires testing. Then, move all the other possible objects negative delta of the object being for each looped. I think this way you only really need to iterate on one object type for this to work. The rest is taken care of by Fusion.

    To explain my idea here's an example. OverlapDelay-OneForEachLoop.mfa (Yes I know that the red objects don't move so it's not necessary here, but it's just proof of concept)

    However, I'm curious how fast both of the solutions are. If I'll get some results, I'll update on that here
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  4. #4
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    603
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hmm, am I doing something wrong here? In your example, I'm trying to move the "A" object back a pixel when overlapping the "B" object, but it doesn't seem to be interacting correctly: OverlapDelay-OneForEachLoop2.mfa

    I tried the method in my original example too, but the same thing happened. I even tried moving A back, moving B back by offset, then closing the group entirely so nothing else could be run, but it still happened.

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    603
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Figured it out. I needed to move the second object to its original position before I move the first object back a pixel for collision, otherwise the second object will always slide through the first. It's simpler to use another value, "x original" for the second object, and set that to its initial position before the offset for collision, then move it back to that value after.

    OverlapDelay-OneForEachLoop3.mfa

Similar Threads

  1. Two actives overlap destroy one solution
    By Evilized79 in forum Fusion 2.5
    Replies: 2
    Last Post: 29th May 2015, 09:53 AM
  2. Object overlap - Overlap area
    By Ls2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 12th May 2012, 10:06 PM
  3. Delay! help
    By scurvy in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 7th February 2010, 04:20 PM
  4. Help With 'Delay' - Is It Possible?
    By HRMNKRDN in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 20th July 2009, 09:22 PM
  5. Delay Events
    By Atom in forum File Archive
    Replies: 0
    Last Post: 23rd February 2009, 03:08 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
  •