User Tag List

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

Thread: Pinball movement workaround?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Pinball movement workaround?

    Hi All,

    I'm working on a game for the xmas competition, so I'm hoping to get a quick solution to my problem. Part of my game has a pachinko style level, where the player drops objects onto slanted rooftops. I want the gifts to bounce when they hit the rooftops, and eventually bounce down the screen. I'm running into 2 issues:

    1. Since the objects are just set to "Bounce" and "Set Random Direction" I sometimes get issues where the object crawls on the roof surfaces when it chooses a direction into the surface it just hit. Is there a simple set of conditions that I can use to always bounce away from the surface I just hit? The object can hit the roof from any direction, including underneath.

    2. When the objects hit a surface, I have the surface light up for a frame (like a pinball bumper) by playing an animation that is just one frame long. But sometimes the animation gets stuck after a bunch of objects have hit it and the light is permanantly on. Can anyone think of a reason why this might happen? I have been testing the collision on a qualifier group so I don't know if that would be the cause of the problem.

    Any help would be appreciated,

    Mobichan

  2. #2
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pinball movement workaround?

    1. Are you using the "collision" or the "is overlapping" condition?

    2. You can do this with 2 events:
    A) always -> set animation frame to 0
    B) collision -> set anmation frame to 1

    Make sure event A is listed ABOVE event B.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Pinball movement workaround?

    I have tried both "collision" and "overlapping" and I get the same problem (animation sometimes gets stuck) , so I assume there is no difference in this case. Since I made a new animation for this, I was assuming that when the animation finishes, it automatically goes back to playing the "Stopped" animation. It doesn't reset back to "Stopped" on a fraction of the cases, but I am unable to determine why the glitch occurs at all.

    As for my first problem, I removed the "Set Random Direction" part of my code and just using "Bounce" seems to help with the glitchiness. But it still has the problem of my objects sometimes "crawling" through the objects they collide with instead of deflecting away. Anyone know how to get objects to deflect?

    Mobichan

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Pinball movement workaround?

    Sieg: thanks for the suggestion . It seems to have cleared up the second problem. (Although, I wish I knew why it doesn't work using the default behavior )

    As for the first problem, can anyone offer a solution to making the movment appear to deflect off of surfaces? I've searched, but can't find any examples or tutorials. I really just need to see some example of making an object bounce in a direction that is away from where it hit when it calls bounce. Or is this insanely complex?

    Mobichan

  5. #5
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pinball movement workaround?

    Bounce is supposed to do that automatically..
    You should not have to manually set it's new direction.
    And use collision instead of overlap.

    If it doesnt work maybe you should upload your .mfa so we can see what you are doing wrong.

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Pinball movement workaround?

    To deflect off a surface, just use "On Collision with present and house top: Bounce" and you are done! Just don't use overlaping comditions for bouncing.
    Working as fast as I can on Fusion 3

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Pinball movement workaround?

    So, my game is only using "Bounce" and "Set Speed" commands when a collision between the "gift" and "roof" is detected. The problem is that sometimes the "gift" will just sit idle on a spot and after some time it will suddenly jump off the spot and continue moving. I originally thought that the problem was setting the direction manually to a random direction(out of 32 directions) which was producing directions that forced the "gift" into the "roof" and therefore looked idle, when, in reality, the "gift" was waiting for the next frame to pick a new direction that wasn't blocked by the "roof."

    I should add that I am applying a rotation every frame as well to the "gift" objects so that might be causing problems, since I am using pixel collision (fine detection).

    I'll try and strip down my game to upload soon.

  8. #8
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pinball movement workaround?

    Why do you "set speed" when a collision occurs? That's not nescesary.

    Whether or not rotation affects the movement, I am not sure. You can try putting the rotate-event below the bounce-event. That way the rotated graphic will be updated before collision detection begins.
    I could be way wrong, but it's easy to try right?

    You can also make a new application, just put in 1 roof and 1 gift object and apply the movement and bouncing. In other words, recreate the problem in a clean application. If the problem occurs there aswell, you can upload it for us to see. (and the rest of your code remains private)

  9. #9
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Pinball movement workaround?

    I change the speed to a random value so that the bouncing objects appear a little more natural. And my rotations are applied every frame so I don't know if I can really change when they occur.

    Here is the file. Just press the arrow keys to drop gifts.

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=download&Number=3563&filename=2 4th_night_buggy.mfa

    I appreciate any help you guys can offer.

    Mobichan

  10. #10
    No Products Registered

    Join Date
    Jan 2008
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pinball movement workaround?

    I took a look at it, but haven't been able to find the problem.

    Someone with experience with the pinballmovement should have a look. This may just be a bug in MMF2, I'm not sure.


    Btw. The santa stops moving after going back and for a few times. Bug?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Pinball movement
    By netninja in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 17th February 2014, 06:46 AM
  2. Pinball movement
    By TedBoomerang in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 3rd April 2010, 12:08 AM

Posting Permissions

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