Actually, one that follows the ball is beatable. Your version can be hard.
Offline
Just have it follow the ball...but slowly. Don't just set the position to the ball position, instead use a velocity variable that changes sign (and maybe magnitude) depending on which side the ball is with respect to the paddle.
Offline
Paddle2See wrote:
Just have it follow the ball...but slowly. Don't just set the position to the ball position, instead use a velocity variable that changes sign (and maybe magnitude) depending on which side the ball is with respect to the paddle.
I'm confused...
Offline
coolhogs wrote:
Paddle2See wrote:
Just have it follow the ball...but slowly. Don't just set the position to the ball position, instead use a velocity variable that changes sign (and maybe magnitude) depending on which side the ball is with respect to the paddle.
I'm confused...
Have the AI's paddle follow the ball, but slowly, speeding up as it gains velocity.
Offline
when gf clicked set [y-vel] to (0) forever if<(y position) > ([y position] of [ball v]) > change [y-vel] by (-.3) else change [y-vel] by (.3) end change y by (y-vel) end
Last edited by MoreGamesNow (2012-03-09 21:08:45)
Offline
MoreGamesNow wrote:
when gf clicked set [y-vel] to (0) forever if<(y position) > ([y position] of [ball v]) > change [y-vel] by (-.3) else change [y-vel] by (.3) end change y by (y-vel) end
Thanks! Should I give credit to you?
Last edited by coolhogs (2012-03-09 21:24:53)
Offline
That would be nice, but not necessary
Last edited by MoreGamesNow (2012-03-09 22:16:45)
Offline
Closed by request.
Offline