I've recently been using a program to make small games, and I've been working out a version of PONG. There's just one problem: this program cannot use angles or slopes or do any easier method for finding a result. This is the issue:
-When the ball hits the paddle (either one), it needs to deflect off of the paddle at an inverse angle to the one it hit at. The only values I have to work with are the x-position, y-position, innumerable variables to set values to, and basic (and some advanced) operators (+, -, /, *, square root, trig functions...)
Here's the question: How, using what I have, can I find where the ball can go? (assuming it travels in the same direction until it hits something)
I've experimented with pythagorean theorem and other such things, but I'm not clear as to the mathematical boundaries of doing something more complex...Can anyone try to solve this out for me?
Thanks in advance,
RepInt
-When the ball hits the paddle (either one), it needs to deflect off of the paddle at an inverse angle to the one it hit at. The only values I have to work with are the x-position, y-position, innumerable variables to set values to, and basic (and some advanced) operators (+, -, /, *, square root, trig functions...)
Here's the question: How, using what I have, can I find where the ball can go? (assuming it travels in the same direction until it hits something)
I've experimented with pythagorean theorem and other such things, but I'm not clear as to the mathematical boundaries of doing something more complex...Can anyone try to solve this out for me?
Thanks in advance,
RepInt