Game Development Community

Simple AI Problem

by Viktor Rumanuk · in Torque X 2D · 10/07/2007 (12:15 pm) · 2 replies

I've just made a little pong clone that I'm fairly happy with, I just need to tweak the computer paddle's AI. I have it set up so that it checks if its position is higher or lower than the ball's position and adjusts its velocity accordingly. Works perfectly, too perfectly, its impossible to score. I wanted to see if any of you guys have any ideas before I start messing with the velocities.

Thanks, Viktor

#1
10/08/2007 (1:07 pm)
From my experience with pong, It is all about the velocity when playing against the computer. The player is able to hit the ball harder, which would cause the ball to travel faster than the computer paddle's AI could catch ..

Granted, it has been a very long time, but I don't think there is a way to add human error into the pong paddle, you just have to limit the paddle's max velocity and allow for the ball to increase it's velocity when hit in a certian manner.

-jeremy
#2
10/08/2007 (3:01 pm)
Thanks Jeremy, worked great.