PDA

View Full Version : Need help with psudo AI code...


Drakain Zeil
10-01-2004, 10:54 PM
Hey, it's been a while since I've posted here.

Anyway, what I need help with, is making AI for a variaton of pong I'm coding, mainly I'm making this because I'm bored to tears in my grade 11 programming class... we've only covered input, assignment statements, text output, and 2 types of loops (for, and the kind that have exit when) in the first month.

Back on topic, I have the engine i want for my game -- pong. However, I need to have a psudo-code system for AI paddles.

What I was thinking, is find the Y-point of the ball, track it with the mid point of the paddel, then use a random function to move 1X the paddels range outside of or inside of the range of the range that would allow the ball to bounce back, however I'm not quite sure how good this would be, and am open to many suggestions.