User Tag List

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

Thread: Bouncing Ball Bug

  1. #1
    Clicker Multimedia Fusion 2 Developer
    Teh_Purple_d00d's Avatar
    Join Date
    Oct 2010
    Location
    Versailles, MO, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Bouncing Ball Bug

    Anyone else having trouble keeping objects using the bouncing ball movement from sticking to certain objects? I'm currently working on a Breakout style game and have added the various bricks you can smack the ball into. Most bricks are destroyed with a single hit (with the exception of the silver one, which takes two hits.) But the problem I'm having is when the ball collides with the side of the gold brick. Most of the time it works, but the rest of the time, it just sticks in place.



    I've fiddled with the settings of the bouncing ball itself. Turned off fine detection under collision settings. Etc. Etc. But nothing seems to help. I've included the source code for reference.

    Arrows move you left and right.
    D toggles Debug information.

    Block Breaker (WIP)

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Bouncing Ball Bug

    Looks like your using Pinball movement for the ball?

    That movement is a little flakey -- Perhaps just regular bouncing ball movement would work better?

    I can't get it to stick here but I am using a pre-release of build 252 so maybe that fixed it.

  3. #3
    Clicker Multimedia Fusion 2 Developer
    Teh_Purple_d00d's Avatar
    Join Date
    Oct 2010
    Location
    Versailles, MO, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bouncing Ball Bug

    The ball itself uses Bouncing Ball, not Pinball (That's used for the shattered brick effect.) I'd be open to using something else besides the Bouncing Ball movement, though. Are there any examples that have their own custom movements?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jun 2006
    Location
    Norway
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bouncing Ball Bug

    You could keep the movement setup you got now, but add a code that pushes the ball +1 on the Y axis. It would look like this:

    Ball is colliding with brick:
    * Bounce

    Ball is overlapping brick:
    * Set Y coordinate +1 related to ball.

  5. #5
    Clicker Multimedia Fusion 2 Developer
    Teh_Purple_d00d's Avatar
    Join Date
    Oct 2010
    Location
    Versailles, MO, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bouncing Ball Bug

    In theory, that WOULD work. However, if you look at the screenshot, the ball itself isn't exactly overlapping the brick itself. Here's another shot I took while testing out a couple more gold bricks.



    According to the debug stats, the Ball Speed (BALSPD) is still on 35 rather than 0, as if the ball hadn't stopped. Also, Ball Movement (BLMOVE) says the ball is still in motion (1 = Moving, 0 = Not Moving).

    Honestly, I'm thinking that I may get better results from the Vector movement instead of the Bouncing Ball. I would just need to figure out how to properly bounce the ball off walls and bricks using Advanced Directional Calculator or something. Anyone have any thoughts?

    EDIT: After some more testing, I found a way to trigger the glitch 100% of the time. The ball sticks to the gold brick after the first strike. However, an odd tidbit I noticed, is when you maximize or shrink the game window while the ball is stuck, the ball dislodges and moves like nothing was wrong. Very strange, and it's making me point the finger at the Bouncing Ball extension itself.

  6. #6
    Clicker Multimedia Fusion 2 Developer
    Teh_Purple_d00d's Avatar
    Join Date
    Oct 2010
    Location
    Versailles, MO, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bouncing Ball Bug

    Alright, I tried the Vector Movement using the Clickteam Movement Controller and it seems to solve MOST of my problems. However, I'm trying to find a decent way to make the ball bounce off the blocks accurately depending on which side is struck hopefully without using collision detectors for each brick (Lotta active objects if that's the case..). Sometimes, the ball bounces off like normal. Other times, the angle changes and the ball goes THROUGH the brick.

    EDIT: I'm such a dunce. I didn't even think about detectors for the ball itself. Jeez..

  7. #7
    Clicker Multimedia Fusion 2 Developer
    Teh_Purple_d00d's Avatar
    Join Date
    Oct 2010
    Location
    Versailles, MO, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bouncing Ball Bug

    Oi.. This is going to be a persistant little problem isn't it?

    I tried the vector movement using the Force Bounce function of the Clickteam Movement Controller. The problem I'm having is thus.

    (NOTE: I've tried this with and without collision detectors for the ball. I'd really like to avoid using them on the ball or the bricks if at all possible.)

    - Ball leaves the play field at top or bottom
    + Force Bounce at Angle 0 (Clickteam Movement Controller)

    - Ball leaves the play field at left or right
    + Force Bounce at Angle 90 (Clickteam Movement Controller)
    These two events? They work flawlessly regardless what angle the ball strikes them at.

    - (Ball) collides with (Bricks)
    + Force Bounce at Angle 0 (Clickteam Movement Controller)
    HERE is where I'm having trouble. I know I'll need at least two events depending on which side the ball strikes the brick. Is it possible to make this work without collision detectors? Using the above event, the ball bounces off the top and bottom of the bricks with no issue. However, when striking the brick from the SIDE causes them to either bounce off at a strange angle, or pass through the brick entirely. Any help would be greatly appreciated.

    I've included an example file for reference.
    Broken Vector Test

  8. #8
    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: Bouncing Ball Bug

    You can build the detectors into the ball animation, and each event loop change the animation to the detectors to check various side for collisions, then change it back to the ball animation before the end of the event loop. You will always see the ball on screen, and the detectors will be part of the ball and used in the collision checking events.
    Working as fast as I can on Fusion 3

  9. #9
    Clicker Multimedia Fusion 2 Developer
    Teh_Purple_d00d's Avatar
    Join Date
    Oct 2010
    Location
    Versailles, MO, USA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bouncing Ball Bug

    Care to elaborate how to do this? I haven't attempted it.

  10. #10
    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: Bouncing Ball Bug

    Step 1:
    Quote Originally Posted by LB
    build the detectors into the ball animation
    Step 2:
    Quote Originally Posted by LB
    each event loop change the animation to the detectors
    Step 3:
    Quote Originally Posted by LB
    check various side for collisions
    Step 4:
    Quote Originally Posted by LB
    change it back to the ball animation
    Step 0:
    http://www.LB-Stuff.com/MMF2/Bouncing.mfa

    Though it may be better to use the built-in bounce feature, although I have not tested it.
    Working as fast as I can on Fusion 3

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Bouncing Ball
    By lembi2001 in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 2nd February 2014, 09:25 AM
  2. Bouncing Ball
    By Angelfox in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th February 2009, 12:09 AM
  3. Bouncing Ball
    By Game_Master in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th December 2008, 07:01 PM
  4. bouncing ball
    By Higgins in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 25th April 2007, 05:39 PM
  5. a better bouncing ball?
    By frateroshi in forum Extension Development
    Replies: 35
    Last Post: 7th July 2006, 01:23 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
  •