User Tag List

Results 1 to 9 of 9

Thread: Fast Loops pointless?

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Jan 2009
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fast Loops pointless?

    I was always told that fast loops were the solution to pixel-skipping collision detection problems. I'm not finding this to be the case.

    My character shoots bullets. My original setup used a "Launch at speed 80" action to fire the bullet. I tested with a 1 pixel wall and most of the time it would pass through the wall due to skipping pixels.

    I wanted to avoid this so I tested it using fast loops. Instead of moving the bullet with the "launch at" action, I have it using a fastloop setup like this:

    [condition] > Start Loop "bulletleft" 20 times
    On loop "bulletleft" > Set X to X("bullet")-1

    What expected was to have the bullet still fly across the screen but stop at the 1 pixel wall because the "fast loop" only moves it one pixel at a time, but in one event loop.

    What happened was that it still just passed through the 1 pixel wall. I know it's related to skipping pixels because if I walk around and shoot a lot towards the wall, it sometimes hits it.

    Am I doing something wrong?

    Is there another solution?

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fast Loops pointless?

    You need to add
    >On Loop "Bulletleft"
    >Bullet Collides with the background
    ---Set X to X(bullet)+1
    ---Destroy Bullet
    ---Stop Loop BulletLeft

    Or something of the like.

  3. #3
    Clicker Multimedia Fusion 2

    Join Date
    Jan 2009
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fast Loops pointless?

    Oh. Well I don't use "backdrop" collisions. The solid tiles in my game are identified using a qualifier, and I cannot reference the qualifier in the object's behaviors (which I think is a stupid problem they should fix in later releases of MMF)

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fast Loops pointless?

    Well you're not going to stop your bullet if you have no conditions about it colliding with something...

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Jan 2009
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fast Loops pointless?

    But I do... I set all of the solid tiles and objects to a qualifier and then in the Frame events I tell the bullet to stop when it hits an object with that qualifier.

    Without the qualifier I would have to keep adding a new collision condition for each object that I make that's supposed to be solid.


  6. #6
    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)

    Re: Fast Loops pointless?

    If you think fast loops are pointless then you obviously don't know much about fast loops. :p They are a godsend in a lot of situations. You're just doing something wrong. Don't blame the fastloops, blame your lack of understanding.

    It's becoming apparent that you think you're doing it right... but it's not... so post up an example of your problem in the file archive, or better list your conditions and events here.

  7. #7
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fast Loops pointless?

    If you want your bullet to be destroyed during the execution of your fastloop, you have to make an overlapping test in the fastloop. If you don't the test will only be done after the fastloop's iterations are over.

  8. #8
    Clicker Multimedia Fusion 2

    Join Date
    Jan 2009
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fast Loops pointless?

    Yes I admit that I failed to include the 'Stop loop' action, but as I said before, it doesn't matter because the only reasonable thing I have to detect when to stop the loop is on collision with a qualifier, which I cannot put in the object's behaviors.

    However, if I put it in the frame's events, it could work, so perhaps I will try that some time later.

    Anyway thanks for the help. I just need to remember to put the collision detection events in with an "on loop" condition

  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)

    Re: Fast Loops pointless?

    You should also watch the definitive guide to fastloops: http://www.clickteam.com/website/usa/img/uploads/tutorials/download/fastlooptutorial.zip

    It's a little slow to start off, but it goes through the steps of setting up pixel perfect collision detection.

Similar Threads

  1. Fast Loops vs Grouped Fast Loops vs ForEach
    By Ryan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 6th August 2010, 12:22 PM
  2. Fast Loops
    By knpmaster in forum SWF/Flash Export Module Version 2.0
    Replies: 18
    Last Post: 6th April 2010, 11:49 PM
  3. Fast Loops - What, When And Why?
    By dmcclure in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 6th April 2010, 02:10 PM
  4. Help with fast loops
    By BenMo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th December 2006, 05:48 PM
  5. Fast loops
    By BenMo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th December 2006, 09:13 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
  •