Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pool - Cue Sports (Simple Physics)
#3
Yep, very well done, looks and feels awesome!

And I like this "naughty" code:

Code:
' Ball
visible Ball = []  ' Array to store all balls (cue ball + others)
Ball.r = 10        ' Ball radius
Ball.m = 15        ' Maximum power for shooting the cue ball
Ball.n = 9          ' The number of the balls
for i = 0 to Ball.n
    Ball[i] = []
    Ball[i].vx = 0
    Ball[i].vy = 0
next

, where you let the 'Ball' variable contain both regular fields and array indexes!
Reply


Messages In This Thread
RE: Pool - Cue Sports (Simple Physics) - by kevin - 04-03-2025, 09:49 AM
RE: Pool - Cue Sports (Simple Physics) - by Marcus - 04-03-2025, 05:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)