🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

pong ai

Started by
1 comment, last by sednihp 12 years, 1 month ago
I am building a very simple pong game using dx9 and c++.I want to build in some AI for the computer opponent.This is my first time working with AI and I want to know where to begin.I am new to this so go easy on me, please.
Advertisement
well, just think, what do you do when the ball is above you?, what about below you? that about sums up the ai for pong, with an extended possibility of doing ball prediction to create an unbeatable ai.
Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.
My pong ai:

When the ball is moving away from the computer, move back to the middle
When the ball is moving towards the computer and is over halfway, align the centre of the paddle with the centre of the ball

Gives pretty solid AI and is coded in < 20 lines.

This topic is closed to new replies.

Advertisement