Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pinball Molly
#12
Hi @PhilOfPerth Thank you for your feedback!

Yeah repetitive bounces even after I fixed Kickers with see: ba = line
Code: (Select All)
' collision Kickers
    For i = 0 To 2
        If _Hypot(by - k(i).y, bx - k(i).x) <= k(i).r + br Then ' left kick
            FC3 k(i).x, k(i).y, k(i).r + 15, &HFFFFFFFF
            _SndPlay bell
            score = score + 100
            ba = _Atan2(by - k(i).y, bx - k(i).x) + Rnd - .5 ' avoid infinite loops
            bx = k(i).x + (br + k(i).r) * Cos(ba)
            by = k(i).y + (br + k(i).r) * Sin(ba)
            bs = bs * 1.3
            bdx = bs * Cos(ba): bdy = bs * Sin(ba)
        End If
    Next

Rnd -.5 gives us a range of -.5 to .5 that's radians, in degrees that's close to 30 degrees, oh I thought it closer to 60, hmmm.

So without that line in there you'd still be testing the first game! You'd have a hell of a score Big Grin

The faster the flippers move up and ball drains downs, the more likely the ball jumps past contact with a flipper and hits bottom.

Have your noticed, sometimes the ball is past the flipper but will bounce back into play because it is not down the center enough to detect it near screen height, meanwhile the code that keeps ball inside the circle background takes effect and bounces ball back.

Pinball is tricky coding challenge Smile

I don't think it's been done before in Basic? except by Rod at JB & LB but he didn't use flippers? I am sure it's been attempted but flippers are difficult.
b = b + ...
Reply


Messages In This Thread
Pinball Molly - by bplus - 11-26-2024, 10:47 PM
RE: Pinball Molly - by Pete - 11-26-2024, 11:05 PM
RE: Pinball Molly - by bplus - 11-27-2024, 07:38 PM
RE: Pinball Molly - by Pete - 11-27-2024, 08:22 PM
RE: Pinball Molly - by bplus - 11-27-2024, 08:51 PM
RE: Pinball Molly - by bplus - 11-27-2024, 10:16 PM
RE: Pinball Molly - by SierraKen - 11-27-2024, 10:53 PM
RE: Pinball Molly - by bplus - 11-27-2024, 11:42 PM
RE: Pinball Molly - by SierraKen - 11-28-2024, 03:02 AM
RE: Pinball Molly - by bplus - 11-29-2024, 11:42 PM
RE: Pinball Molly - by PhilOfPerth - 11-30-2024, 10:16 AM
RE: Pinball Molly - by bplus - 11-30-2024, 02:23 PM
RE: Pinball Molly - by bplus - 11-30-2024, 04:52 PM
RE: Pinball Molly - by bplus - 11-30-2024, 05:55 PM
RE: Pinball Molly - by SierraKen - 11-30-2024, 09:24 PM
RE: Pinball Molly - by bplus - 11-30-2024, 09:46 PM



Users browsing this thread: 1 Guest(s)