BaconMuncher
Member
I am trying to make an advanced pong game where you can play another player local or against the AI.. or make the computer play against itself. So I have two paddles on the left and right side of the screen. The screen also has a lot of little walls and blocks it can bounce off of randomly placed all over the screen to make things interesting. I'm surprised I worked out the bounces of the ball to behave as you'd expect with a little randomness when it bounces off everything including the outside walls and inside obstacles.
Now is the tough part.
Right now all I have the AI paddle looking to see if the ball is within range and then moving its Y position up the the balls Y position in lower and move it down if the balls y position is higher.
But this doesn't work well at all because the AI looks like a dumb @$$! and it misses a lot of the balls. The balls takes different speeds as well based off the last color of obstacle it hit. So there is that too.
Does anyone have some code or a how to I can understand on how to make this AI paddle look smart and not like such a dumb @$$ ?? lol
thanks!
Now is the tough part.
Right now all I have the AI paddle looking to see if the ball is within range and then moving its Y position up the the balls Y position in lower and move it down if the balls y position is higher.
But this doesn't work well at all because the AI looks like a dumb @$$! and it misses a lot of the balls. The balls takes different speeds as well based off the last color of obstacle it hit. So there is that too.
Does anyone have some code or a how to I can understand on how to make this AI paddle look smart and not like such a dumb @$$ ?? lol
thanks!